Where is MsDeployPublish located?

自闭症网瘾萝莉.ら 提交于 2019-11-29 06:10:04

I realise this question is quite old at this point, but:

MsDeployPublish is installed with the Web Application targets as part of Visual Studio. If you have only installed Server + Web Deploy, you'll need to either copy them from your developer installation or install Visual Studio. The targets can be copied from %programfiles(x86)%\MSBuild\Microsoft\VisualStudio

As an aside, there are some features that were added after the release of Visual Studio 2012, namely those that relate to Publishing Profiles (.pubxml). Those can be added to VS2010 by installing the Azure SDK and will be installed to %programfiles(x86)%\MSBuild\Microsoft\VisualStudio\v10.5\Web

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" />

This worked for me, i had to add the line to import Microsoft.WebApplication.targets Got that from a good VS2013 project.

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!