2
votes

I'm currently trying to create a Jenkins CI job on a build server (Windows Server R2), which has turned out to require a lot more work without installing Visual Studio. For this job, I am trying to build a Web package using the .csproj file from my Visual Studio project. Here's a look at my MSBuild action setup in Jenkins:

MSBuild Version: .NET 4.0
MSBuild Build File: MyProject\MyProj.Web\MyProj.Web.csproj
Command Line Arguments: /T:Build;Package /p:Configuration=Release;PackageLocation="C:\MyProj\MyProj.Web.zip";VisualStudioVersion=11.0

The error that occurs when I run the build is this:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2704,5): error : Package/Publish depends on Microsoft Web Deployment technology. Microsoft Web Deployment is not correctly installed on this machine. Please install from following link: For x86(32 bit): http://go.microsoft.com/fwlink/?LinkId=109365.For x64(64 bit): http://go.microsoft.com/fwlink/?LinkId=109366

I do have Web Deploy installed on the build machine, so I'm not quite sure what the issue could be. Any help would be greatly appreciated!

3

3 Answers

3
votes

My use case is the same as yours. Jenkins runs msbuild to run msdeploy

Instead of creating a package directly from msbuild, i used msdeploy.exe

so i have a msbuild target

<Target Name="PackageArtifacts">
<Exec Command='"@(MsDeploy)" -verb:sync -source:iisApp="$(Source)",includeAcls=true -dest:package="$(Destination)"'/>
</Target>

where msdeploy is the directory to msdeploy.exe source is the directory of your publishable website destination is your package name "{filepath}/package.zip"

0
votes

I uninstalled all versions of Web Deploy and Web Deployment Tool, then installed Web Deploy 3.5 using Web Platform installer. It fixed the issue.

0
votes

Try installing WebDeploy from your Visual Studio installation (e.g C:\software\VS\SW_DVD9_Visual_Studio_Pro_2010_English_Core_MLF_X16-76715\WCU\MSDeploy) on the build server.

Installing it via Web Platform Installer AND via download from http://www.iis.net/downloads/microsoft/web-deploy didn't work for me.