0
votes

I have an MVC Web application built with VS 2013. For deploying it, I've created a web deploy package publish profile with all the required settings (like MSDeployParameterValue, _CustomFiles etc.) and can publish to a package by using the publish dialog. What I need is to make the build process to be automatic. I have not found any option to provide the MSBuild with my publish profile (.pubxml) in order to use the publish profile settings.

Is there any option to do this?

The command line I use to build the project is as follows: "C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" C:\Projects\MyProject.csproj /P:Configuration=Debug /P:DeployOnBuild=true /P:DeployTarget=Package /P:_PackageTempDir=C:\packages /P:CreatePackageOnPublish=True /P:VisualStudioVersion=12.0

Thank you very much.

1

1 Answers

0
votes

Got it. The correct parameter is PublishProfile and its value should be an existing profile name. See the correct example:

"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" C:\Projects\MyProject.csproj /P:Configuration=Debug /P:DeployOnBuild=true /P:DeployTarget=Package /P:PublishProfile=MyProfile /P:_PackageTempDir=C:\packages /P:CreatePackageOnPublish=True /P:VisualStudioVersion=12.0