BizTalk 2010, .Net 4.5, and System.Runtime.CompilerServices.ExtensionAttribute

[Update: BizTalk 2010 support for .Net 4.5 is added in CU7. If you encounter the below error, install the cumulative update.]

Recently, I did Windows updates on a BizTalk 2010 server and let it install the .Net 4.5 Framework. A short time later, I was moving some existing code over and noticed a compiler warning when I ran a build on a project.

'System.Runtime.CompilerServices.ExtensionAttribute' in assembly 
System.Core is already defined; the first definition is in 
assembly mscorlib

Apparently, Microsoft moved the ExtensionAttribute class from  System.Core.dll to mscorlib.dll and it’s basically a breaking change for BizTalk 2010 builds.

The workarounds suggested on the site don’t seem to work with BizTalk projects and the BizTalk forums have nothing worthwhile to add, so the fix seems to be uninstalling .Net 4.5 and then reinstalling .Net 4.

This entry was posted in BizTalk, Windows 2008 and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s