Dotnet publish fails if dependencies are set
See original GitHub issueSteps to reproduce
- Create an ASP.NET Core Project with Docker Support. Use 1.1.1 Images as base.
- Add a Class Library, also 1.1.1
- Add the class library as a dependency of the docker-compose Project.
- Run dotnet publish, it will fail with /src/Upload/Upload.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file ‘/src/Upload/Upload.csproj.metaproj’.
Note that this works under Windows, but fails in Linux, e. g. the new docker build process.
Expected behavior
It should work
Actual behavior
- Run dotnet publish, it will fail with /src/Upload/Upload.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file ‘/src/Upload/Upload.csproj.metaproj’.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.1)
Product Information: Version: 1.0.1 Commit SHA-1 hash: 005db40cd1
Runtime Environment: OS Name: debian OS Version: 8 OS Platform: Linux RID: debian.8-x64 Base Path: /usr/share/dotnet/sdk/1.0.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
dll - 'dotnet publish' error referencing dependencies in non- ...
I am using dotnet restore && dotnet publish -c release -r ubuntu.16.04-x64 to build before scp-ing over to the server. The build and...
Read more >dotnet publish command - .NET CLI
dotnet publish - Publishes the application and its dependencies to a folder for deployment to a hosting system. Synopsis .NET CLI Copy.
Read more >Force 'dotnet publish' to publish dependencies using ...
There are two workarounds: 1) Edit the project file (csproj) for your web project and add an msbuild property for ...
Read more >Cannot publish ASP NET Core 3.1 API project. Circular ...
Running Publish in Rider causes a restore to run and then publish fails with a circular dependency error on Core project (which doesn't...
Read more >.NET SDK Support
The dotnet build command builds the project and its dependencies into a set of binaries. The binaries include the project's code in Intermediate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@livarcocc Sorry for my disappearance. The fix is checked in for netcore 2.0, so I think this bug can stay closed.
Can you share your csproj? I suspect your project has a dependency on the Docker SDK, which is only available on Windows with VS.
The Docker SDK is not supported/shipped cross-plat. You may want to move this issue to https://github.com/Microsoft/dockertools to see about any plans about making this SDK cross-plat.