Closed mInternauta closed 8 years ago
.NET 4.5 works just fine with wwDotnetBridge. .NET 4.5 (and 4.6) are all just an in place upgrade for version 4.0. If you have v4.5.1 installed and you load V4
you get 4.5.1 because that's the only version available on the machine.
Rick, :'( . I performed some testing and wwDotnetBridge doesnt load my assemblies unless I compile them as .NET 4.
I'm using .NET 4.6 and compiling within the VS2015.
The message is: Could not load file or assembly 'file: /// mydll.dll' or one of its dependencies. Unable to load this assembly because it was compiled on a newer runtime that loaded.
I use 4.6 compiled assemblies all the time. In fact, HTML Help Builder (http://helpbuilder.west-wind.com) use a number of 4.5 compiled assemblies without issues.
The problem is you're likely loading the wrong runtime. You have to explicitly load with v4:
loBridge = CREATEOBJECT("wwDotnetBridge","V4")
if you don't specify V2 is used and that's when you run into problems. You need to restart VFP after making this change.
Yes Yes. I put the parameter in the constructor. But not really tried to compile with .NET 4.6. Maybe it's something specific to 4.5.2. I will do this...
Thanks for the tip!
There may be something else going on. You may be missing a dependency assembly...
There's no difference between 4.0, 4.5, 4.5.1, 4.5.2, 4.6 etc. as far as the runtime loader is concerned. As far as it knows it's all .NET 4.0 because all those versions are the same runtime with the
I suggest you do this:
DO wwDotnetBridge
loBridge = CreateObject("wwDotnetBridge","V4")
? loBridge.GetDotnetVersion()
This should show you the actual version of the runtime that's loaded. If it's 4.0.xxxxx the right runtime is loaded. The only difference between all those 4.x version is the build number.
You're right, In fact I dont understand why is not working. I'll do more tests, but really weird. Sent. from my iPhone
Em 27/05/2016, ?s 21:31, "Rick Strahl" notifications@github.com<mailto:notifications@github.com> escreveu:
There may be something else going on. You may be missing a dependency assembly...
There's no difference between 4.0, 4.5, 4.5.1, 4.5.2, 4.6 etc. as far as the runtime loader is concerned. As far as it knows it's all .NET 4.0 because all those versions are the same runtime with the
I suggest you do this:
DO wwDotnetBridge
loBridge = CreateObject("wwDotnetBridge","V4")
? loBridge.GetDotnetVersion()
This should show you the actual version of the runtime that's loaded. If it's 4.0.xxxxx the right runtime is loaded. The only difference between all those 4.x version is the build number.
You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/RickStrahl/wwDotnetBridge/issues/3#issuecomment-222279590, or mute the threadhttps://github.com/notifications/unsubscribe/AB1pGwWANGKsczZuy-9VEpHWKHHdftKpks5qF4zegaJpZM4IoiFC.
@RickStrahl . After several tests. happens , compiling the assembly to Framework 4.5.2 the wwDotNetBridge for some reason cant load the assembly, But if I compile in .NET 4.6, the wwDotNetBridge can load my assembly.
:+1:
My guess is you have a dependency in your code somewhere that's requiring a component that needs something in the very specific version of .NET. I'm not sure how that could be a problem since these runtimes are in-place updates unless the exact version, build and subbuild numbers are used for the assembly.
Anyway if it works with 4.6 that points at a problem other than wwDotnetBridge.
Could add support for newer versions of the CLR?
I looked, I believe you have to convert it to use the CLRCreateInstance instead of CorBindToRuntimeEx. Please @RickStrahl