Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Unable to load CLR Instance

$
0
0
Re: Unable to load CLR Instance
VFP and .NET Interop
Re: Unable to load CLR Instance
11/08/2012
04:16:30 AM
3N1095VBLShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Stein Goering

If .NET 4.0 is installed and .NET 2.0 isn't you need to explicitly override the version number in a config file.

Create YourApp.exe.config in the same folder as the EXE and add:

<configuration><startup><supportedRuntimeversion="v4.0.30319"/><!-- supportedRuntime version="v2.0.50727"/ ---></startup><runtime><loadFromRemoteSources enabled="true"/></runtime></configuration>

wcdocs:_36e0qyz8i.htm

This is an explicit override that forces .NET to load version 4.0 if no version is specified (wwSmtp doesn't specify a version).

This is a lame 'feature' in the .NET runtime loading mechanism - it defaults to .NET 2.0 if you don't specify a version. The runtime loader APIs changed with .NET 4.0 and the old APIs weren't updated, so they continue to default to .NET 2.0 unless an explicit override exists in the .config file.

I have never tested this, but that's how it's supposed to work. Let me know if this works.

+++ Rick ---


Recently upgraded a customer with latest framework and DLLs, now getting this error when calling my mail routine which invokes wwDotNetBridge:

Unable to load wwDotNetBridge: Unable to load Clr Instance. Version %d.%d is not a compatible version

The reference to version %d.%d is literally what we get. They are running Server 2003, and a check shows it had only .NET 1.1 installed. So it seemed that all we'd need would be to upgrade .NET. But after installing .NET 4.0 we still get the same error.

What do we need to do to get this resolved?

--stein



Rick Strahl
West Wind Technologies


from Maui, Hawaii

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles