question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dotnet publish fails if dependencies are set

See original GitHub issue

Steps to reproduce

  1. Create an ASP.NET Core Project with Docker Support. Use 1.1.1 Images as base.
  2. Add a Class Library, also 1.1.1
  3. Add the class library as a dependency of the docker-compose Project.
  4. 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

  1. 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:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ChristianSauercommented, Apr 29, 2017

@livarcocc Sorry for my disappearance. The fix is checked in for netcore 2.0, so I think this bug can stay closed.

1reaction
livarcocccommented, Mar 23, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

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