ASP.NET: How to publish in a folder with commandline

Viewed 454

I want to publish an ASP.NETFramework v4.6.1 project to a local folder. No zip. No profile.

Just a publication like this:

msbuild MySolution.sln /t:MyProject /p:Configuration=DEBUG /p:publishDir=".\To\Folder" /p:WebPublishMethod=FileSystem

It compiles well but I get nothing in the destination folder. I forgot an instruction? The documentation doesnt help me.

1 Answers

There are a couple extra parameters that should get this going. In particular, the publishdir needs to change to OutDir, but the other ones are probably necessary as well.

/p:DeployOnbuild=True /p:GenerateProjectSpecificOutputFolder=true
/p:OutDir=.\To\Folder /p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false
Related