【发布时间】:2012-11-19 13:30:54
【问题描述】:
我正在尝试构建一个 Windows Phone 8 项目,其中包含对用 C++ 编写的 WinRT 组件项目的引用。该项目从 VS2012 IDE 构建,但不使用 MSBuild (c:\Windows\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe) 从命令行构建。它抛出这个错误:
WindowsPhoneRuntimeComponent1\WindowsPhoneRuntimeComponent1.vcxproj(185,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v7.0\Microsoft.Cpp.WindowsPhone.7.0.targets" was not found. Confirm that
the path in the <Import> declaration is correct, and that the file exists on disk.
我对所需目标文件的判断是它试图为 WP7 构建一个 WP8 项目。有谁知道如何解决这个问题,或者是否有可能解决这个问题?
【问题讨论】:
-
发布您尝试的完整 msbuild 命令行。如果您尝试通过解决方案文件构建,对于升级的 WP7 项目,您很可能引用了错误的 .NET 版本。
标签: msbuild visual-studio-2012 windows-phone windows-phone-8