FoxPro and .NET Interop
wwDotNetBridge Error
Gravatar is a globally recognized avatar based on your email address. wwDotNetBridge Error
  Bill Plander
  All
  Dec 18, 2018 @ 06:20pm

Hi Rick,

Got this nasty error when trying to open a DLL (32bit .Net) in wwDotNetBridge

It Errors on loBridge.LoadAssemblyFrom()

"An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information."

The DLL are "unblocked" but that didn't help.

thanks Bill

Gravatar is a globally recognized avatar based on your email address. re: wwDotNetBridge Error
  Bill Plander
  Bill Plander
  Dec 19, 2018 @ 08:51am

In the actual design I am loading a wrapper class which uses this DLL. When I load the wrapper I get this error:

Could not load file or assembly 'file:///c:\taxcontrols\taxbridge\taxwrapper.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Maybe there is something I can change in Wrapper?

thanks, Bill

Gravatar is a globally recognized avatar based on your email address. re: wwDotNetBridge Error
  Rick Strahl
  Bill Plander
  Dec 19, 2018 @ 11:04am

Make sure all dependencies (if any) are available in the same folder and that the version of the CLR is not newer. Make sure you're loading .NET 4.

Check with loBridge.GetDotnetVersion()...

+++ Rick ---

© 1996-2019