When you move/create form files in subfolders (relative to project root) convetion based system fails to find associated resx file, because it clearly mangled the filename (see build error)
if you disable EmbeddedResourceUseDependentUponConvention in csproj this error goes away.
this is likely related to https://github.com/microsoft/msbuild/pull/4597
sample project
WindowsFormsDependentUponConventionTest.zip
assembly builds
build error:
Error MSB3041: Unable to create a manifest resource name for "Forms\Form1.resx". Could not find a part of the path 'C:\Users\Vladislav Richter\source\reposWindowsFormsDependentUponConventionTestWindowsFormsDependentUponConventionTest\Forms\Forms\Form1.cs'.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.CSharp.CurrentVersion.targets 100
VS 16.3.0 Preview 3.0
.NET Core 3.0 Preview 9
WinForms project
PS as this is likely related:
with EmbeddedResourceUseDependentUponConvention = false
when I have embedded resource file in subfolder with the same name as .cs file but with a different extension eg. .js it's name in the manifest is without this extension
example:
\subfolder
control.cs
control.js
in manifest:
subfolder.control
/cc @BenVillalobos, it was introduced in #4597 as far as I can see.
To help prioritization: this has a direct impact on projects that use Entity Framework 6.3 with migrations. Migration files (including resource files) are generated by default under a folder, as per https://github.com/aspnet/EntityFramework6/issues/1225.
@livarcocc @rainersigwald I went ahead and marked this for 16.3. Seems like this is must fix to me. Do you agree?
Is this supposed to work in RC1? Because we are still hitting this issue. The repro project I've provided still won't build under:
SDK 3.0.100-rc1-014190 x86
Build Engine version 16.3.0-preview-19455-02+4a2d77107 for .NET Core
@shutdown256 the fix unfortunately missed rc1 but is in the very latest daily builds. I just confirmed that the repro project works with 3.0.100-rc2-014265.
Looks like this issue is back with .NET 5.0 preview2...
@schuettecarsten could you explain in a bit more detail how you got this error again? I can't seem to repro it.
Steps I took:
git checkout ded7c259dc (commit where this issue started)msbuild /p:createbootstrap=true dotnet build.
Most helpful comment
@livarcocc @rainersigwald I went ahead and marked this for 16.3. Seems like this is must fix to me. Do you agree?