2

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!

4

3 回答 3

3

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"

于 2013-06-21T07:24:19.417 回答
0

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.

于 2014-02-09T13:17:58.013 回答
0

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.

于 2014-02-11T01:48:26.780 回答