目标“MSDeployPublish"项目中不存在 [英] The target "MSDeployPublish" does not exist in the project

查看:25
本文介绍了目标“MSDeployPublish"项目中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题还有其他参考资料.但我没有从一个版本的 VS 升级到另一个版本.我目前正在使用 VS 2013.该项目构建良好,过去甚至已成功部署.这是一个全新的应用程序.所以它不是从另一个项目继承的东西.我可以从哪里开始寻找?我可以在这里发布什么可能对你们有帮助,希望能帮助我?这是一个 web api 2 站点.我在 VS2013 中使用发布命令.

I know there have been other references to this issue. But I didn't upgrade from one version of VS to another. I am currently using VS 2013. The project builds fine, and has even deployed successfully in the past. This is a brand new app. So it wasn't something inherited from another project. Where can I start looking? What can I post here that may be helpful for you guys to hopefully help me? It is a web api 2 site. I am using the publish command within VS2013.

推荐答案

将以下几行添加到我的 .csproj 文件似乎为我解决了同样的错误:

Adding the lines below to my .csproj file seems to solve the same error for me:

<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)MicrosoftVisualStudiov$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

作为尝试解决问题的一部分,我还安装了 MSBuild.Microsoft.VisualStudio.Web.targets Nuget 包.但我仍然不确定是否有必要解决这个问题.

As part of trying to resolve the issue, I've also installed the MSBuild.Microsoft.VisualStudio.Web.targets Nuget Package. But I'm still not sure it was necessary in order to resolve the issue.

这篇关于目标“MSDeployPublish"项目中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆