【发布时间】:2011-06-09 14:08:16
【问题描述】:
我有一个干净的 Windows 7 x64 机器设置来构建和运行 Windows Phone 7 项目。我按照MSDN App Hub 页面安装了Windows Phone Developer Tools 7.0、2011 年 1 月更新和 Windows Phone Developer Tools Fix。我的 WP7 应用程序在 VisualStudio 中构建良好,但是当我尝试使用 MSBuild.exe 时,即使在最简单的 Visual Studio 项目中也是如此
c:\Windows\Microsfot.NET\Framework64\v4.0.30319\MSBuild.exe .\SimpleWP7.sln
我收到以下错误(为了便于阅读,在行之间添加了空格)
...详细输出...
C:\程序文件 (x86)\MSBuild\Microsoft\Silverlight 为了 电话\v4.0\Microsoft.Silverlight.Common.targets(185,9): 错误 MSB4018:“CompileXaml”任务 意外失败。\r [C:\Users\alasdair.mccall\vs_workspace\SimpleWP7\SimpleWP7\SimpleWP7.csproj]
C:\程序文件 (x86)\MSBuild\Microsoft\Silverlight 为了 电话\v4.0\Microsoft.Silverlight.Common.targets(185,9): 错误 MSB4018: System.IO.FileLoadException:不能 加载文件或程序集 'PresentationCore,版本=3.0.0.0, 文化=中性, PublicKeyToken=31bf3856ad364e35' 或 它的依赖项之一。给定的 程序集名称或代码库无效。 (来自 HRESULT 的异常:0x80131047)\r [C:\Users\alasdair.mccall\vs_workspace\SimpleWP7\SimpleWP7\SimpleWP7.csproj]
C:\程序文件 (x86)\MSBuild\Microsoft\Silverlight 为了 电话\v4.0\Microsoft.Silverlight.Common.targets(185,9): 错误 MSB4018:文件名: 'PresentationCore,版本=3.0.0.0, 文化=中性, PublicKeyToken=31bf3856ad364e35'\r [C:\Users\alasdair.mccall\vs_workspace\SimpleWP7\SimpleWP7\SimpleWP7.csproj]
...
我在这里缺少什么?我安装了 Silverlight 3 和 4,并且安装了 App Hub 上记录的所有内容。如果需要任何其他信息,请告诉我。
干杯, 阿拉斯代尔。
【问题讨论】:
-
查看第二个帖子:forums.create.msdn.com/forums/p/75679/460407.aspx#460407 确保您使用的是 VS CMD 提示符
标签: visual-studio-2010 windows-phone-7 msbuild