升级到 TFS 2013 后,Silverlight 项目的 TFS 版本中断



我刚刚将 TFS 从 2012 升级到 2013 年,构建定义不再有效。

我们的解决方案中有一些 Silverlight 5 项目,这些项目在开发计算机上构建良好,并且也用于在 TFS 2012 上构建,但现在失败了。我还安装了VS 2013,Silverlight开发人员运行时和Silverlight 5 SDK。

失败的任务是 ValidateXAML,下面是一段 MSBuild 日志文件:

C:\Builds\4\path\to\project\Shared\PresentationUtility\Controls\AssetListControl.xaml : 错误: 无法解析引用程序集。请检查参考程序集。不能 加载文件或程序集"System.Core,版本=5.0.5.0,区域性=中性,ublicKeyToken=7cec85d7bea7798e" 或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。(HRESULT的例外:0x80131040)

完成执行任务"验证Xaml" -- 失败。(任务 ID:1514) 在项目"PresentationUtility.csproj"中完成构建目标"ValidateXaml" -- 失败:(TargetId:2112)

当然,System.Core 以正确的版本存在于服务器上的正确位置,所以我使用绑定日志查看器来追求它,它给了我这个:

<meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre>
*** Assembly Binder Log Entry  (11/7/2013 @ 9:23:05 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from:  C:WindowsMicrosoft.NETFrameworkv4.0.30319clr.dll
Running under executable  C:Program Files (x86)MSBuild12.0binMSBuild.exe
--- A detailed error log follows. 
=== Pre-bind state information ===
LOG: DisplayName = System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MSBuild.exe
Calling assembly : Microsoft.Expression.Drawing, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:Program Files (x86)MSBuild12.0binMSBuild.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFrameworkv4.0.30319configmachine.config.
LOG: Post-policy reference: System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
LOG: GAC Lookup was unsuccessful.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core/System.Core.EXE, because the location falls outside of the appbase.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core/System.Core.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core/System.Core.EXE.
LOG: All probing URLs attempted and failed.

*** Assembly Binder Log Entry  (11/7/2013 @ 9:23:05 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from:  C:WindowsMicrosoft.NETFrameworkv4.0.30319clr.dll
Running under executable  C:Program Files (x86)MSBuild12.0binMSBuild.exe
--- A detailed error log follows. 
=== Pre-bind state information ===
LOG: DisplayName = System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MSBuild.exe
Calling assembly : Microsoft.Expression.Drawing, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:Program Files (x86)MSBuild12.0binMSBuild.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFrameworkv4.0.30319configmachine.config.
LOG: Post-policy reference: System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
LOG: GAC Lookup was unsuccessful.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core/System.Core.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Libraries/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Expression/Blend/Silverlight/v5.0/Prototyping/Libraries/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/RIA Services/v1.0/Libraries/Silverlight/System.Core/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///C:/Program Files (x86)/Microsoft SDKs/Silverlight/v5.0/Libraries/Client/System.Core/System.Core.EXE, because the location falls outside of the appbase.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core/System.Core.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.Core/System.Core.EXE.
LOG: All probing URLs attempted and failed.
</pre></html>

关键行是第一个 WRN:

WRN: Not probing location file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0/System.Core.DLL, because the location falls outside of the appbase.

这实际上是System.Core所在的地方,但它说它在应用程序库之外。

我从未遇到过类似的事情,我的搜索也无处可去。已经追了好几天了,有人有解决方案吗?

尝试在

生成定义中强制 MSBuild 平台使用 X86,它应该可以解决你的问题。

希望对您有所帮助。

最新更新