"error MSB3552: Resource file "**/*.resx" cannot be found" only in particular environments

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:32 (6 by maintainers)

github_iconTop GitHub Comments

35reactions
hkaraskcommented, Sep 9, 2017

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]

20reactions
tarntanatecommented, Jan 13, 2018

Try deleting “bin” and “obj” folder and rebuild project again. (I’m using macOS Sierra with VSCode)

Read more comments on GitHub >

github_iconTop Results From Across the Web

"error MSB3552: Resource file "**/*.resx" cannot be found ...
I have a build that works on my computer but is failing in a continuous integration environment (AppVeyor) with this error: Microsoft.
Read more >
Resource file "**/*.resx" cannot be found. (MSB3552) on ...
I was running dotnet core on osx and had the same issue. The problem was that I generated a folder using a windows...
Read more >
Error MSB3552: Resource file "**/*.resx" cannot be found.
Hi. I use VS for Mac 2019 in my Mac. After I pull the latest code from our Master branch , I can...
Read more >
Fixing "error MSB3552: Resource file "**/*.resx" cannot be ...
The way to "fix" this is by reducing the nesting of your folders. If you're using npm, upgrading to a newer version (or...
Read more >
My Project\Resources.resx" cannot be found. ...
I went into the Project Properties\References tab and clicked 'This project does not contain a default resources file. Click here to create one....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found