-
August 9th, 2010, 12:34 AM
#1
type intitializer error in C# module
Hello,
I have a C# application created using VS 2008 , then those DLLs areimported to another application created using VS 2005. There were no build errors at all for all the application module.When I created an installer & distributed to non-development m/c's I got an error message saying "Error: the type initializer for <module> threw an exception" the module it points to is a C# DLL.
Please let me know what care I should take to work it properly?
-
August 9th, 2010, 01:03 AM
#2
Re: type intitializer error in C# module
Is .NET framework is present on the non-development PC?
Last edited by vcdebugger; August 9th, 2010 at 06:10 AM.
-
August 9th, 2010, 02:04 AM
#3
Re: type intitializer error in C# module
Yes,all required .NEt frameworks are present on Development & QA m/c's
-
August 9th, 2010, 02:12 AM
#4
Re: type intitializer error in C# module
Are all dependant DLLs present there ? i.e. the DLLs that you imported.
Regards,
Ramkrishna Pawar
-
August 9th, 2010, 02:15 AM
#5
Re: type intitializer error in C# module
Yes,All the DLL's are present .our development m/c has .Net framework 3.5 SP1 & QA m/c has .NET framework SP2 .is this anyway responsible for the issue?
-
August 9th, 2010, 02:20 AM
#6
Re: type intitializer error in C# module
This error is only seen when some of the DLLs are not passed on to machine where you are trying to run the app. So check again and make sure that these dlls are there.
Regards,
Ramkrishna Pawar
-
August 9th, 2010, 03:24 AM
#7
Re: type intitializer error in C# module
I checked availability of DLL's as well, all the required DLL'd are present still facing same issue.Kindly advice on the ways to troubleshoot this issue.
-
August 9th, 2010, 03:54 AM
#8
Re: type intitializer error in C# module
You need to use a tool like process explorer to see loaded DLLs on the source comp and then see on target comp for the application that you are running.
Regards,
Ramkrishna Pawar
-
August 9th, 2010, 04:45 AM
#9
Re: type intitializer error in C# module
Originally Posted by forstudy3
Hello,
I have a C# application created using VS 2008 , then those DLLs areimported to another application created using VS 2005. There were no build errors at all for all the application module.When I created an installer & distributed to non-development m/c's I got an error message saying "Error: the type initializer for <module> threw an exception" the module it points to is a C# DLL.
Please let me know what care I should take to work it properly?
Do you know the missing C# dll? Is it a VS2008 dll or a VS2005 dll? Can you spot it both on the developer and target machine?
In case it is VS2008 dll it might use types that were not available (or not right version) on the target system. You then would need to install VS2008 redistributables to the target system.
Regards, Alex
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|