So I copied the exe on a laptop where it failed as well, this time with:
Code: Select all
Description: The process was terminated due to an unhandled exception.
Exception Info: System.MissingMethodException
at <Module>.$AppInit()
at MyProgram,Exe.Functions.Start()
I then copied the full VS program/solution directories from the Pc to the laptop to debug it there. Originally it didn't compile there because it needed a reference to System.Windows.Forms (it's a WPF program with some Winforms command). No idea why it worked without on my Pc (there is a System.Windows reference which I'd say should be enough) but: adding the reference helped and the program compiled and the exe, once copied to the working directory, worked.
So I added this same reference to the Pc solution, which should make it equal to the laptop solution and thought this issue would somehow be caused by this "missing" reference. I copied the resulting exe from the Pc to the laptop, but got the same System.MissingMethodException again. This while the exe created on the laptop, which should be the same as the one created on the Pc (and copied to the same location with the same DLL's), works.....
EDIT/NOTE: I think I just solved it, at least the reason my Pc version didn't work on the laptop. I realized that the laptop's X# was a few versions behind. I installed the same versions as on my Pc and saw that the option Register runtime DLLs in the GAC (recommended !) was still checked. I unchecked it, installed, recreated the exe (on the Pc) which worked as it did, then copied the exe from the PC and now it worked. Next to check is Kees' system (I'll let you know)
So I lost (again, I see that I had this earlier) time because of that piece of Microsoft shit called the GAC. I can recommend not to recommend to check this box.
Dick