Skip to content
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

Warn on publishing solutions / path forward for publishing solutions #3650

Closed
dasMulli opened this issue Sep 17, 2019 · 3 comments
Closed

Warn on publishing solutions / path forward for publishing solutions #3650

dasMulli opened this issue Sep 17, 2019 · 3 comments
Milestone

Comments

@dasMulli
Copy link
Contributor

There are many issues with doing a publish on solution files.

I suggest emitting a Warning when trying to do so. I think this may be possible through solution extension points.

so dotnet publish the.sln would emit something like NETSDK999: Publishing whole solutions can lead to unintended side-effects.
This could then be disabled with dotnet publish the.sln -p:WarnOnPublishingSolutions=False.

While there are suggestions of allowing base paths for solution publishing to create folders for each project are possible, it has a few edge cases (same csproj names in different solution folders etc.).

@livarcocc livarcocc added this to the Backlog milestone Sep 17, 2019
@rainersigwald
Copy link
Member

#863 is related (and maybe sufficient?).

@dasMulli
Copy link
Contributor Author

It's one of the things that can go wrong. Another thing would be dependency trimming of things that ship in both Nuget packages and shared frameworks. If I have a library referencing e.g. Microsoft.Extensions.DependencyInjection and reference that from an asp.net core app, the app will not have the DLL in its output dir but if I publish the solution, the library publish output does have the DLL so the mixed output will have it and users could miss security patches if they deployed it.

@baronfel
Copy link
Member

Closing as this was fixed with #29065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants