JIT system exception error

  • Thread starter Thread starter JVince
  • Start date Start date
J

JVince

Hi y'all

upon compiling the code the application seems to be
running okay from the c:\app\bin folder. When I try to
distribute the application to a new folder (ie c:\prog)
I get the JIT compiler system.typeinitializationexception
error.

code for my startup file is a class as follows:

-------------------------
Public Class strt
Public Shared mainfrm As New Mainform()

Shared Sub main()
Application.Run(mainfrm)
End Sub
End Class
 
Hi,

1. Ensure the Mainform is in either the same assembly or in an assembly that
can be loaded from the folder where the application is deployed (this also
should be checked for any custom assemblies you may have)

2. Try moving the form instantiation inside the Main sub
 
Back
Top