msbuild - 从命令行使用 C++ WinRT 组件构建 Windows Phone 8 项目

标签 msbuild visual-studio-2012 windows-phone windows-phone-8

我正在尝试构建一个 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 项目。有谁知道如何解决这个问题,或者是否有可能解决这个问题?

最佳答案

您需要将项目更改为 WP8。右键单击您的项目,选择属性。在“应用程序”选项卡下,将类型从 WP7 更改为 WP8。希望有效。

关于msbuild - 从命令行使用 C++ WinRT 组件构建 Windows Phone 8 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13454847/

相关文章:

msbuild - 在msbuild中过滤项目的元数据

c# - WP8中如何引用System.Net.Http?

c# - 如何为 VS2012 C# 项目执行自定义构建步骤?

msbuild - 您如何在Atlassian OnDemand上构建C#项目?

c++ - 从 this->class 构造函数调用类构造函数(不同的参数)?

sqlite - 更新VS2012项目后无法编译,SQLite未安装错误

c# - 组合来自不同 URL 的 2 个 JSON 源

c# - Xamarin Forms,在 Visual Studio 上删除 WinPhone 目标平台

c - 应用程序关闭时保存参数

c# - 在 Microsoft Build Framework 中使用自定义构建任务时出错