【发布时间】:2013-11-12 03:40:41
【问题描述】:
我正在通过命令行而不是在 Visual Studio 2013 中构建项目。请注意,我已将项目从 Visual Studio 2012 升级到 2013。该项目在 IDE 中构建良好。另外,我先完全卸载了VS2012,重新启动,安装了VS2013。我拥有的唯一 Visual Studio 版本是 2013 Ultimate。
ValidateProjects:
39>path_to_project.csproj(245,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
39>Done Building Project "path_to_project.csproj" (Clean target(s)) -- FAILED.
以下是有问题的两行:
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
原来的第二行是 v10.0,但我手动将其更改为 v12.0。
$(VSToolsPath) 从我看到的内容延伸到 v11.0 (VS2012) 文件夹,该文件夹显然不再存在。路径应该是 v12.0。
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\
我尝试在我的系统环境变量表中指定 VSToolsPath,但外部构建实用程序仍使用 v11.0。我尝试在注册表中搜索,但没有找到任何结果。
遗憾的是,我没有看到任何简单的方法来获得使用的确切命令行。我使用构建工具。
想法?
【问题讨论】:
-
就我而言,我必须在使用 WebPublish 目标构建的构建事件中指定正确的 VisualStudioVersion。
标签: c# web-applications visual-studio-2013 build visual-build-professional