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
08:00:35 PM
3N116VZMQShow this entire thread in new window
Gratar Image based on email address
From:Stein Goering
To:Rick Strahl
Creating a aw3.exe.config file with the contents below and placing it in the folder containing aw3.exe did not help.

Installing .NET 2.0 eliminated the error.

Note: I did not try using the [4.0] parameter when instantiating the object since that would have meant generating a new exe for them.

--stein

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




Viewing all articles
Browse latest Browse all 10393

Trending Articles