-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"error MSB3552: Resource file "**/*.resx" cannot be found" only in particular environments #8239
Comments
I tried removing all references to |
So I figured this out. This is due to an annoying long-standing MSBuild issue whereby it doesn't expand wildcards at all if any paths are longer than the old-school max path length in Windows (260 characters) dotnet/msbuild#406 This meant that the MSBuild scripts were treating The only "fix" for this is to reduce the length of the paths. In my case, the build server was using a very old version of |
The wildcard that breaks everything for folders with long paths is in
|
…net/cli/issues/6561 and dotnet/msbuild#406), and run correct test command
* Upgrade to Visual Studio 2017 + csproj tooling * Include workaround for NuGet/Home#4337 (explicitly specify version when restoring NuGet packages) * Work around dotnet/cli-migrate#11 * Upgrade to .NET Core 1.1.x * Remove VersionPrefix from all csproj files * Legacy NuGet restore is no longer needed * Disable CS1701 warning for sample projects * Turns out we actually do need the legacy NuGet restore * Use VS2017 AppVeyor image * Remove project dependencies to work around NuGet/Home#5193 and NuGet/Home#4578 * Use MSBuild 15 on AppVeyor * Enforce .NET Core tools 1.0.0 in global.json * Use newer npm on AppVeyor (as a workaround for https://github.com/dotnet/cli/issues/6561 and dotnet/msbuild#406), and run correct test command
i am in OSX and getting this problem even when i move the project to a short folder, any help or ideas? |
Getting similar error when trying to build on Docker microsoft/aspnetcore-build:2.0 |
dont know if this helps but i saw that msbuild or vscode (or something) was trying to create a hidden keys folder ( ".keys") but was instead creating ".\keys" every time i run a build, i make sure to delete ".\keys" and things seem ok... |
VM Ubuntu 17.04 dotnet build throws same issue. basically i cannot deploy to production. i don't see any '.keys' folder. Thanks in advance, |
I am also seeing the same thing on ubuntu: dotnet --info
|
Getting same problem, but on second build. First time
|
Not sure but it could be a problem with migration from .net core 1 to .net core 2. If I start a new project (asp.net web/api) than everything is fine |
We also experience this problem with **/*.resx. It did build fine a couple of times, but then this started to occur and cleaning solution first does not work. It's really annoying! |
I'd like to reopen this. This is not ok. Not only does moving things around to shorten the path not work for a lot of is, it isn't a solution. If there's a setting that needs to be changed, then I need to know what it is, or this straight up needs to be fixed. I cannot build my projects on a mac at all. |
There is a bug in MSBuild tracking this and as the fix needs to happen there, I would comment there and follow it. Pasting the issue again here: dotnet/msbuild#406. |
@livarcocc perfects. Thanks much |
Try deleting "bin" and "obj" folder and rebuild project again. |
@tarntanate - Yep, we saw the same thing on ubuntu and fedora. |
I have a .net core project are run on Windows but when I try to run the project on macOs I got the error message "error MSB3552: Resource file "**/*.resx" cannot be found". In my project, I have a config to store the log files in the folder
At the first time I run the project, this config can run on windows and create a folder have name "Logs" but when I run on macOs it will create a folder have name ".\Logs" and it's a hidden folder. So this is a problem, after that the project will get that error when building. The solutions are changing the config to:
Basically, cause windows use the backslash in the directory path, but macOs use the slash so when you need to build the project which coding in Windows on macOs, you should check all the code have related to files, folder, path (ex: the code to create the folder to save log files, create the folder to save upload files..etc). For the answer of cellvia, I think he got the same problem like me. The .keys folder are created by his code and he can hotfix by the way create a keys folder already before building the project. Hope it helps. |
Same problem with windows paths. I noticed the following when I deleted with Thank you @mrhocuong and @cellvia. |
Same here on mac os. I suddenly had a |
Getting this in Docker build for Razor Pages app.
Base Image
|
Delete the bin folder and anything inside of the wwwroot folder prior to doing to a build or publish |
In my case I had one folder that was being created to a configuration I had on startup. |
I had
The problem was because I had in my Dockerfile COPY / ./
RUN dotnet run --project tests.fsproj After I changed to COPY / ./tests
RUN dotnet run --project tests/tests.fsproj The problem disappeared. |
Thanks to those above who pointed out the windows path issue - I just got this when I had a merge cause my build machine to start creating some funky directories from Windows path settings. Appears the presence of such a folder is all that is needed to trigger this issue. I'll raise this as a new bug, as it seems it's not resolved. (Update: logged as dotnet/cli#10995) Reproduction steps below:
Removal of the folder resolves the issue:
More info - versions etc.
|
Same problem for me with MacOs and Rider. To resolve :
I don't try to rebuild with rider |
Side note: I got this error due to stackify creating logs on Mac. Removing these allowed the build and run to complete without issue: c:\temp\stackifymiddleware_settings.log The moral to this is to look for c: in your application directory. I had to close VS before the log was created. Researching stackify issue now... |
I had this issue building dotnet app in an Ubuntu container. I was being lazy and copying the files directly into the file system root. Would work fine for any other language, but dotnet seems to do some kind of recursive search from the build folder and some of the unexpected file types trigger this error. I solved the problem by moving to an app folder. |
FWIW I triggered this error when using runsettings for vstest that contained 🔥 Before removing it copy all other content from the directory to a different location. Removing it from Explorer will cause it to crash, because it attempts to remove recursively. Remove it from PowerShell instead, without the Remove-Item -Force "C:\Projects\temp\XUnitTestProject12\XUnitTestProject12" |
I hit this using dotnet 5.0 on Raspberry Pi 4 64-bit Ubuntu. The issue was a folder that had been created by accident called 'd:\Music', i.e. a folder name containing what would have been a drive letter on Windows. Deleting that folder fixed the issue. |
Just like @Alex2357 it was my I had,
I needed,
I figured this out by finding the lastest |
If you are building using Docker, make sure to set an appropriate |
I encountered this on a Linux machine today, dotnet 6.0. I probably had a folder with a |
i get this problem on my macos,use the visual studio for mac。open the project dictionary,i find there is a windows dictionary "r/\xx\projects",delete it ,it works。 |
This worked for me. Fixed my issue trying to run a .NET project via docker in GitHub Actions. |
I have a build that works on my computer but is failing in a continuous integration environment (AppVeyor) with this error:
On my computer, the build output contains:
However, on the build server, it says:
It looks like
EmbeddedResource.Type
is incorrectly set toResx
rather thanNon-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:
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:
On AppVeyor:
Edit: Also tested with 1.0.4 on my computer, and it works properly on that version too.
Seems like something specific to the AppVeyor build.
The text was updated successfully, but these errors were encountered: