IB.
IB.

Reputation: 1039

Working with .net 4.0 on BizTalk 2006 R2

I am working on BizTalk 2006 R2 (With ESB guidance 1.0)

I recently ended a development of a new model (Dot net model) on VS 2010 with dot net framework 4.0, the new model uses 4.0 features and cannot be downgraded. I have found out that the GAC was changed in the new 4.0 framework and is placed in a different location (changes to gac in dot net framework 4.0)

One of my orchestrations uses the 4.0 assembly to extend functionality. I registered the assembly in the GAC (the new GAC) but i keep getting the error:

Could not load file or assembly 'MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0177fe918f6918aa' or one of its dependencies. The system cannot find the file specified.

Is it even possible to work with BizTalk 2006 R2 and call a dot net 4.0 assembly (using reference)?

P.S My alternative is to expose the 4.0 model as WCF service and call it from the BizTalk but I want to save it for last)

Upvotes: 1

Views: 615

Answers (2)

Charles Young
Charles Young

Reputation: 31

Simply, no.

Prior to the 2010 version, older versions of BizTalk Server have no knowledge of the new CLR 4.0 GAC and cannot, therefore, load assemblies from there. BizTalk Server 2010 is the first version to support CLR 4.0. For BizTalk Server 2006 R2, you would need to compile your assembly against an older version of the .NET Framework which, unfortunately, sounds like a non-starter in your scenario. You are caught between a rock and a hard place on this one. Upgrade BizTalk Server or find a way to downgrade your .NET 4.0 assembly.

Microsoft has managed to achieve a high degree of forward compatibility each time they version the .NET framework, but only within the confines of specific versions of the CLR. So, .NET 1.1 code was almost fully forwardly compatible with .NET 1.0, and .NET 3.5 is fairly forwardly compatible with .NET 2.0 code (the main issues tend to be lack of certain language features in older versions of compilers). However, each time the CLR is revved, all bets are off, I'm afraid. The CLR is the run-time environment, after all. This is why Microsoft think long and hard before bringing out a major new version of the CLR. CLR 4.0 is the first major revision since 2005. We must hope it is at least a decade before MS feels the need to rev the CLR again.

Upvotes: 3

Jon Skeet
Jon Skeet

Reputation: 1499660

Given the Biztalk roadmap I suspect that you'll need to wait for Biztalk 2010, where one of the new features is .NET 4.0. Presumably Biztalk 2006 R2 is running the CLR v2, so trying to load everything there.

If you absolutely need features of .NET 4.0, can you run your own server separately, and then talk to that from a proxying layer written in .NET 3.5?

Upvotes: 1

Related Questions