开发者

.NET 3.5 issue with TFS 2010 build service

开发者 https://www.devze.com 2023-02-27 08:05 出处:网络
I\'ve got a TFS build service that builds a VS2008 / .NET 3.5 project The produced dlls looks fine in Reflecor, referencing System.Drawing V2.0.50727

I've got a TFS build service that builds a VS2008 / .NET 3.5 project

The produced dlls looks fine in Reflecor, referencing System.Drawing V2.0.50727

Unfortunately, I can't load these dlls on a test .NET 3.5 box, as a 'Post-policy reference' seems to enforce the .NET 4 version of system.drawings.

  • I tried to reference with 'Specific Version' set to true

  • I even tried to ship the System.drawing V2, with no luck.

I guess it's开发者_如何学运维 caused by TFS 2010 using the .NET 4 version of MSBuild, but I can't find any way to fix this issue so far...

By the way, a solution built under VS2008 on my station works just fine.

Here is the load failure log. Could not find any 4.0 reference, within the code, or within the binaries through Reflector.

=== Pre-bind state information ===
LOG: User = foo\bar
LOG: DisplayName = System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/foobar/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\foobar\baz.dll.config
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:\foobar\System.Drawing.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.


Long story short, I ended up building my .NET 3.5 solution against the .NET 3.5 framework, which kinda makes sense.

So I don't know what the issue was, but I got rid of it anyway.

Note: to build against the 3.5 framwork with TFS 2010 is painfull: you'll have to extract the msbuild command line, to skip its TFS logs arguments, and to put in in an InvokeProcess box in your build template xaml file.

0

精彩评论

暂无评论...
验证码 换一张
取 消