I\'m trying to replicate the Visual Studio 2010 \"Publish...\" command (applicable to Web Application projects) where I would in the UI choose Publish Method: \"File System\".>
As per my answer from Using MSBuild, how do I build an MVC4 solution from the command line (applying Web.config transformations in the process) and output to a folder?
msbuild ProjectFile.csproj /p:Configuration=Release ^
/p:Platform=AnyCPU ^
/t:WebPublish ^
/p:WebPublishMethod=FileSystem ^
/p:DeleteExistingFiles=True ^
/p:publishUrl=c:\output
Or if you are building the solution file:
msbuild Solution.sln /p:Configuration=Release ^
/p:DeployOnBuild=True ^
/p:DeployDefaultTarget=WebPublish ^
/p:WebPublishMethod=FileSystem ^
/p:DeleteExistingFiles=True ^
/p:publishUrl=c:\output
You can also target the project via the solution using the /t:SolutionFolder/Project:Target
syntax:
msbuild Solution.sln /t:SolutionFolder/ProjectFile:WebPublish ^
/p:Configuration=Release ^
/p:WebPublishMethod=FileSystem ^
/p:DeleteExistingFiles=True ^
/p:publishUrl=c:\output