4

我尝试借助 NAnt 下的任务在 VisualStudio2012 下构建我的第一个 windows phone 库。

错误:不支持使用 MSBuild 64 位构建 Windows Phone 应用程序。

对于 WindowsPhone 7 项目,我应该使用 32 位版本的 MSBuild 对吗?

4

1 回答 1

6

是的你是对的。如果您使用的是 TFS 构建定义,请将 MSBuild 平台更改为x86。在 VS 2012 中编辑构建定义时,选择Process并进入Advanced Settings选项并将 MSBuild Platform 下拉列表从Auto更改为x86。当使用 32 位版本的 MSBuild 时,所有这些 32 位工具将毫无问题地生成您的 Windows Phone 8 库。

或者,如果您通过 cmd 使用 MSBuild:

C:/WINDOWS/Microsoft.NET/ Framework /v4.0.30319/MSBuild.exe”而不是“C:/WINDOWS/Microsoft.NET/ Framework64 /v4.0.30319/MSBuild.exe” ( /p:PlatformTarget=x86 )

于 2013-07-04T03:04:12.087 回答