0
votes

I have a VS 2012 solution(ASP.NET) that contains three projects. I'm trying to deploy/publish the site via MsBuild command line without installing Visual Studio on our build machine. I am using:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild Myproject.csproj /p:DeployOnBuild=true /p:PublishProfile= pubfile.pubxml /p:Password=user1 /p:AllowUntrustedCertificate=true

MY Command line output show only "build successfully" of the solution but nothing about the publish profile. The same solution and batch file run successfully on my local machine.

Please suggest If any option for publishing without install VS on build Machine

2

2 Answers

0
votes

I had to add the following to my command line

/p:VisualStudioVersion=11.0 

or you might have to install Web Deploy on your build machine.

The other thing I had to do was publish from VS and save a publish profile and then used that on the command line. I see you have pubfile.xml, but all I had to do was reference the profile name, not the file name. QA being my profile name from the project. Try removing the .xml on the end of yours.

/p:PublishProfile=QA
0
votes

Add C:\Windows\Microsoft.NET\Framework\v4.0.30319\ to your %PATH% system environment variable and invoke your command:

msbuild Myproject.csproj /p:DeployOnBuild=true /p:PublishProfile= pubfile.pubxml /p:Password=user1 /p:AllowUntrustedCertificate=true