0

I saw a lot of topic about this error (especially this one). But i'm unable to correct this error.

I have a solution C# WPF that I manage with visual studio 2017. My main project use a second one project. The second one project use a DLL, stored in a folder. Something like this :

enter image description here

MyClass use classes contained in MyDll (added in References as Embeded ressource, with dllNamspace). In MyClass I have :

public MyClass()
{
    dllNamspace.DllClass item = new dllNamspace.DllClass();
}

When I got to definition for DllClass, it's ok. I can see all functions/methods. But when I run MainProject, I have an Exception :

The type initializer for 'MyClass' threw an exception

With InnerException

Could not load file or assembly or one of its dependencies 'dllNamspace'

I've try to reload MyDll, rebuild all, add reference in MainProject, copy dll in bin folder. I always have this exception.

A.Pissicat
  • 3,023
  • 4
  • 38
  • 93

0 Answers0