JIT system exception error

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
 
D

Dmitriy Lapshin [C# / .NET MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top