microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.31k stars 2.21k forks source link

Why does dotnet publish not publish everything in a sln #1390

Open dgxhubbard opened 1 year ago

dgxhubbard commented 1 year ago

I have a sln that has an identity provider web app, and a blazor assembly. To publish I use this line:

dotnet publish MyApi.sln -c Release -o C:\My\Publish --self-contained false

This will publish MyApi but it never publishes the identity provider. On top of that I have had to add all dlls as project references to MyApi so they will all be published. The sln is setup to have all the dependencies it needs. I do not understand why publish does not honor what is there. It does not even copy a directory and its contents that are created as a build post event. How can I get everything in the sln and things built by post build into the publish directory?

dgxhubbard commented 1 year ago

I have this same issue on stackoverflow but in much more detail.

mairaw commented 1 year ago

As the issue template says, you shouldn't be filing issues in this repo.

Probably logging at https://github.com/dotnet/sdk would be a good start.

dgxhubbard commented 1 year ago

There are two web apps in my sln. The first is an identity provider, the second is a web api with blazor wasm. If I run dotnet publish from command line the identity provider is published but not the web api. If I run publish from visual studio 2022 17.6.3 then web api is published but not identity provider. Why doesn't publish produce both? To me this is a bug.

dgxhubbard commented 1 year ago

I can do that.