Where is MsDeployPublish located?

Kulvis picture Kulvis · Oct 10, 2013 · Viewed 7.4k times · Source

When trying to deploy my site using TeamCity and Web Deploy I get this error:

error MSB4057: The target "MsDeployPublish" does not exist in the project.

Is there something I have to install on a build server? It's a clean Windows Server 2012 with Web Deploy 3.5 installed.

Answer

Buthrakaur picture Buthrakaur · Jun 16, 2014

Or you can use this NuGet package with portable version of the targets: https://www.nuget.org/packages/MSBuild.Microsoft.VisualStudio.Web.targets and modify your csproj file to include it like this:

<Import Project="..\packages\MSBuild.Microsoft.VisualStudio.Web.targets.12.0.1\tools\VSToolsPath\WebApplications\Microsoft.WebApplication.targets" />