I'm trying to reference a .Net 4.6.1 compiled DLL (MCData.dll) for use in a .Net Core 2.1 console app (WebApi) but keep getting the following error as soon as I try to access the DLL :
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'MCData.MCDataSettings' threw an exception.
Source=MCData.v6.11.0.0
StackTrace:
at MCData.MCDataSettings.set_AppDirectory(String value)
at WebAPI.Controllers.MembersController.Authenticate(String EmailAddress, String Password, String UserName) in T:\APIs\WebAPI\WebAPI\Controllers\MembersController.cs:line 64
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
Inner Exception 1:
DllNotFoundException: Unable to load DLL 'mscorwks.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The dll it can't find is in the .Net Framework v2 directory and can't be added as a reference.
I'm stumped!
User contributions licensed under CC BY-SA 3.0