We have just converted a large VB6 desktop app to VB.NET 2008. First via the VB 2005 (open project), then days of fixing errors, etc. Then opened the VB 2005 in VB 2008 so now it is a 2008 solution.
The more we try to test the worse it gets. It did start and crash with typical errors but now it does not even get off the ground.
Message InvalidOperationException was unhandled.
... The type initializer for .... threw an error.
Have seen many searches via google but no solution that I can understand.
App framework is enabled, it is using .net 3.5.
The more we try to fix the earlier it crashes. The 1st form load does not even start (break point not stopped on but it did before and failed on AppFrameWorkOn = True where AppFramWorkOn is just a boolean in another module. Except same code works in other programs.
We have written several dozen other VB.Net 2005 programs but this one just doesn't make sense.
There is also no Configuration Manager in the Build menu. Can't understand that either.
There are no errors when we do a build.
There are about 30 forms with code behind and about 40 other modules.
Help!!!! Bring back VB6.
It seems to be related to forms such as
Public FormMain as frmMain = frmMain
This technique worked in many other programs but not this one. Not sure why.