We are trying to build one project from a Visual Studio solution in VSTS with .NET Core task. We are able to "dotnet build" that project. But when we try to "dotnet publish" it tries to publish all projects from the solution. Even if we use "dotnet custom", it tries to publish all projects.
Is there a way to use .NET Core task to publish only one project or projects that were built? Or should we run a custom command line task?
Reason for this is that we have a project that won't build and we don't need/want to publish it. So we would like to build and publish one project and not all projects.
You can use dotnet publish <Path to .csproj>
. This will build and publish only the specified project and projects it depends on.
In order to specify a project in the '.Net Core' task with the command 'publish' you have to uncheck 'Publish Web Projects'.
If you un-check the 'Publish Web Projects' you will see a field appear that allows you to enter the project (csproj) you want to target.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With