Error: (Type initializer threw an exception)

F

Florian

Hi,

I have written an application in VB 2005 (XP).. Now we want to upgrade to
Vista and VB 2008 + Framework 3.5, but while testing our applications the
Debugger shows following exception:

An unhandled exception of type 'System.InvalidOperationException' occurred
in App.exe
Additional information: Fehler beim Erstellen des Formulars. Weitere
Informationen finden Sie in Exception.InnerException. Fehler: Der
Typeninitialisierer für "App.ModuleMain" hat eine Ausnahme verursacht..

Apart from the buttons "Break" and "Continue" there is no more information
to view (NO InnerException!)

Only in the Debug-Output window shows messages that a dll-file is loaded
again and again, but unloaded each time:

'App.exe': Loaded
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.8' 2.6001.18000_none_886786f450a74a05\comctl32.dll'
'App.exe': Unloaded
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.8' 2.6001.18000_none_886786f450a74a05\comctl32.dll'

That's it...

I've checked all paths and filenames in the solution and found no issue.

The solution contains 4 projects: 1 app and 3 class libraries which are
included by the app. The applications starts with a Splash form, but the
error raises before the applications runs any line of (my) code
 
C

Cor Ligthert[MVP]

Florian,

In my idea you have a failure in either running your program in the new
Visual Studio or either running your programm in Vista.

Can you not first try what it does by installing VS2008 on the XP and debug
it then in that environment.
Now you make in my idea searching much to wide.

(Dit you know that there was a perfect VB newsgroup for the German Visual
Studio Environment.)
news\\:microsoft.public.de.german.entwickler.dotnet.vb

Most here are probably using the English version.

Cor


microsoft.
 
F

Florian

Hi Cor,

you're right.
I already tried running the application under different conditions and
established that the application only breaks on Vista!

Yes, I know, but in most cases the answers in an Englisch Forum is more
efficient than in a German Forum.

Regards
 

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