0

我刚刚将 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, Version=5.0.5.0, Culture=neutral, ublicKeyToken=7cec85d7bea7798e' 或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)

完成执行任务“ValidateXaml”——失败。(TaskId: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:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.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)\MSBuild\12.0\bin\MSBuild.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.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:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.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)\MSBuild\12.0\bin\MSBuild.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.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 所在的位置,但它说它在应用程序库之外。

我从来没有遇到过类似的事情,我的搜索让我无处可去。这几天一直在追,有人有解决办法吗?

4

1 回答 1

0

尝试在构建定义中将 MSBuild 平台强制为 X86,它应该可以解决您的问题。

希望能帮助到你。

于 2014-01-16T09:25:47.060 回答