"error MSB3552: Resource file "**/*.resx" cannot be found" only in particular environments
See original GitHub issueI have a build that works on my computer but is failing in a continuous integration environment (AppVeyor) with this error:
Microsoft.Common.CurrentVersion.targets(2867,5): error MSB3552: Resource file “**/*.resx” cannot be found.
On my computer, the build output contains:
React.Core.csproj" (target "ResGen" depends on it):
Task "GenerateResource" skipped, due to false condition; ('%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2') was evaluated as ('Non-Resx' == 'Resx' and '' != 'false' and 'CLR4' != 'CLR2').
Task "GenerateResource" skipped, due to false condition; ('%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2') was evaluated as ('Non-Resx' == 'Resx' and '' != 'false' and 'CLR4' == 'CLR2').
Done building target "CoreResGen" in project "React.Core.csproj".
However, on the build server, it says:
React.Core.csproj" (target "ResGen" depends on it):
Using "GenerateResource" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "GenerateResource"
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2867,5): error MSB3552: Resource file "**/*.resx" cannot be found. [C:\projects\react-net\src\React.Core\React.Core.csproj]
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\resgen.exe" ........
It looks like EmbeddedResource.Type
is incorrectly set to Resx
rather than Non-Resx
, but I have no idea where that comes from 😦
I also noticed a few other messages that appear on the build server that do not appear on my local build:
Culture of "" was assigned to file "**/*.resx".
Done executing task "AssignCulture".
Task "AssignCulture"
Resource file '**/*.resx' doesn't depend on any other file.
Resource file '**/*.resx' gets manifest resource name 'React.Core.__.*'.
Done executing task "CreateCSharpManifestResourceName".
Task "CreateCSharpManifestResourceName"
Creating a separate AppDomain because of error parsing "**/*.resx". Illegal characters in path
Seems like there’s some strange globbing issue going on? I’m not sure.
Steps to reproduce
Clone https://github.com/reactjs/React.NET, checkout b2cd0a4f040da24d1ed2a46d454678fd58c6f8ec, run dev-build.bat
Expected behavior
It works
Actual behavior
Example build: https://ci.appveyor.com/project/Daniel15/react-net/build/217
Environment data
dotnet --info
output:
On my computer:
.NET Command Line Tools (1.0.0)
Product Information:
Version: 1.0.0
Commit SHA-1 hash: e53429feb4
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16188
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.0
On AppVeyor:
.NET Command Line Tools (1.0.3)
Product Information:
Version: 1.0.3
Commit SHA-1 hash: 37224c9917
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.3
Edit: Also tested with 1.0.4 on my computer, and it works properly on that version too.
.NET Command Line Tools (1.0.4)
Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16188
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4
Seems like something specific to the AppVeyor build.
Issue Analytics
- State:
- Created 6 years ago
- Comments:32 (6 by maintainers)
Getting similar error when trying to build on Docker microsoft/aspnetcore-build:2.0
/usr/share/dotnet/sdk/2.0.0/Microsoft.Common.CurrentVersion.targets(2924,5): error MSB3552: Resource file "**/*.resx" cannot be found. [/Web.csproj]
Try deleting “bin” and “obj” folder and rebuild project again. (I’m using macOS Sierra with VSCode)