My Windows Forms application was working earlier, however suddenly it stopped working. I am getting following exception:
I got the same error message and for my case the reason is my main program is set to build as 32 bit console app and I added a private variable logger which access a 64bit dll.
public class Program
{
public static readonly Logger logger = new Logger(typeof(Program));
After I changed the main program to be build as 64bit, the issue is fixed.