我刚刚将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” - FAILED。:(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的位置,但它表示它不在appbase中。
我从来没有遇到类似的东西,我的搜索让我无处可去。几天来一直在追逐这个,有没有人有解决方案?
答案 0 :(得分:0)
尝试在构建定义中强制MSBuild平台到X86,它应该可以解决您的问题。
希望它有所帮助。