Duracell
Duracell

Reputation: 93

dotnet publish - set outputpath in csproj

I want to know if their is any tag to set the output path of the dotnet publish within the .csproj-file. I know I can use something along the lines of publish "someproject.csproj" --output "..\mypubfolder" from the command line. But I want to specify a (default) publish folder within the .csproj-file

Upvotes: 9

Views: 4931

Answers (1)

Martin Ullrich
Martin Ullrich

Reputation: 100581

You can set the PublishDir property which is used for the Publish target:

<PropertyGroup>
  <PublishDir>..\mypubfolder</PublishDir>
</PropertyGroup>

Upvotes: 15

Related Questions