我正在通过命令行而不是在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.
Run Code Online (Sandbox Code Playgroud)
以下是有问题的两条线:
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
Run Code Online (Sandbox Code Playgroud)
原来的第二行是v10.0,但我手动将其更改为v12.0.
$(VSToolsPath)从我看到的扩展到v11.0(VS2012)文件夹,显然已不存在了.路径应该是v12.0.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\
Run Code Online (Sandbox Code Playgroud)
我尝试在系统环境变量表中指定VSToolsPath,但外部构建实用程序仍使用v11.0.我尝试在注册表中搜索,但没有提到任何内容.
遗憾的是,我没有看到任何简单的方法来获得使用的确切命令行.我使用构建工具.
思考?
c# web-applications build visual-build-professional visual-studio-2013
有没有人看到这个错误,知道如何解决它?
无法从程序集C:\ Program Files(x86)\ MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.Tasks.dll加载"TransformXml"任务.
无法加载文件或程序集'file:/// C:\ Program Files(x86)\ MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.Tasks.dll'或其依赖项之一.该系统找不到指定的文件.
确认声明是否正确,程序集及其所有依赖项是否可用,以及该任务是否包含实现Microsoft.Build.Framework.ITask的公共类.
我在别处读到问题是你没有安装SQL Server.但我确实安装了带有SP1的SQL Express 2012 x64.我也在运行VS 2013 Professional.
我在VS 2012 Express中运行了这个完全相同的解决方案,没有任何问题.