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.

Unable to publish multiple projects at the same time.

See original GitHub issue

When 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:open
  • Created 7 years ago
  • Reactions:15
  • Comments:55 (12 by maintainers)

github_iconTop GitHub Comments

40reactions
cphillips83commented, Sep 26, 2019

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.

  1. What we need is to either have the -o append each project name (just like pack is doing) to create a sub folder for each project.
  2. Or allow us to add a variable argument to the output path that is replaced.

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.

11reactions
joelharkescommented, Apr 12, 2019

Closing issue, there is probably an alternative by now.

Read more comments on GitHub >

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

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