Unable to publish multiple projects at the same time.
See original GitHub issueWhen i publish with dotnet
cli, the output is:
publish: Published to …/output/project1 Published 1/1 projects successfully
Which indicates i could publish multiple projects at te same time (why else say: 1/1)
so i tried this.
Steps to reproduce
dotnet publish project1 project2 -o ../output
Expected behavior
I expect 2 projects to be published in this output folder (each in there own folder, having the same name as the project folder).
Actual behavior
Unrecognized command or argument project2
Environment data
.NET Command Line Tools (1.0.0-preview2-1-003155)
Product Information:
Version: 1.0.0-preview2-1-003155
Commit SHA-1 hash: d7b0190bd4
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:15
- Comments:55 (12 by maintainers)
Top Results From Across the Web
Publishing multiple .NET Core applications in a single ...
What I have learned is that publish does not work at all, for anything other than ASP.NET projects, when you try to build...
Read more >Question: Publishing multiple projects in the same solution ...
I essentially want to publish every web project that exists in the solution, as there are multiple. I know how to publish from...
Read more >c# - publish two projects in same solution
You can only publish a Project. When you do that, only the project and all its dependencies are built & published. if your...
Read more >Publish multiple Web Projects in Solution on build - TFS 2015
Now select the option Builds (can't find Build, use the home icon at the top of the Team Explorer pane). Then click the...
Read more >How to publish a solution with 4 projects in one web app ...
I have a Visual Studio Solution with 4 Projects, I am able to publish one project but the other 3 cannot be publish...
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
This is a 3 year old issue that should be trivial to fix, so I’m not sure why this is still lingering around? Several suggested solutions have been presented and even the referencing issues to this one outline how this mistake came to be.
-o
append each project name (just like pack is doing) to create a sub folder for each project.It does not make sense to dump everything to a single folder when publishing a solution and I would argue that when it would, this feature would be the minority and you would want a flag to enable it as the amount of issues this can cause has been outlined in other issues.
For now, I have choosen to build tooling around my tooling and removed the
-o
param and have instead wrote a script to recursively find all the publish folders generated under each project and to move them to a root level folder.Closing issue, there is probably an alternative by now.