-
Jun 28th, 2013, 06:50 AM
#1
Thread Starter
Lively Member
Type initializer for <Module> threw an exception
Hi,
When I launch VB2010 Express, I get an error message saying "Type initializer for <Module> threw an exception".
I think it has something to do with the .NET framework, but I'm not sure.
I have Windows 7 Ultimate 32 bit (.NET framework 4.0).
Does anybody know what could be the problem?
-
Jun 28th, 2013, 07:50 AM
#2
Re: Type initializer for <Module> threw an exception
Sounds like a broken .Net to me.
Tough break there. Starting with Vista Microsoft chose to preinstall several .Net versions as part of the OS, making them difficult to impossible to repair.
Could be time to reformat the hard drive and reinstall Windows from scratch.
See How to repair the .NET Framework 2.0 and 3.0 on Windows Vista. It applies to Win7 as well.
-
Jun 28th, 2013, 07:59 AM
#3
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
I already have installed Windows 7 from scratch.
-
Jun 28th, 2013, 08:07 AM
#4
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
Well, what i could try, is replacing the system32\mscoree.dll file with version 4.0.30319, my current .NET version.
Because when I install .NET 4.0 the system32\mscoree.dll file doesn't update to the right version.
But I can't find the mscoree.dll file version 4.0.30319 online.
Maybe you could help?
-
Jun 28th, 2013, 03:22 PM
#5
Re: Type initializer for <Module> threw an exception
Sorry, no answers here.
How can "version 4.0.30319" be your current .NET version if you can't get it anywhere?
Exact versions numbers are never stable anyway. .Net is such a gigantic malware attack surface that new security patches from 20MB to 120MB in size arrive monthly.
-
Jun 28th, 2013, 03:58 PM
#6
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
Sorry, I haven't been very clear.
See my previous thread (http://www.vbforums.com/showthread.p...-2908-amp-1935).
I had recently installed .NET framework 4.0 but system32\mscoree.dll didn't update, its version remained 2.0.
This also prevented me from installing VB2010.
Later I replaced mscoree.dll version 2.0 by mscoree.dll version 4.0, which I found on the internet.
That made the installation succeed.
But now, when I launch VB2010 it gives me the type initializer error.
So I thought maybe the error showed up because the downloaded mscoree.dll file has a slightly different version (4.0.40305) than my .NET (4.0.30319).
That's why I wanted to try to find the correct version, to see if that works.
Last edited by Superthijs; Jun 28th, 2013 at 04:03 PM.
-
Jun 28th, 2013, 08:55 PM
#7
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
So I thought maybe the error showed up because the downloaded mscoree.dll file has a slightly different version (4.0.40305) than my .NET (4.0.30319).
That's why I wanted to try to find the correct version, to see if that works.
The version of the "mscoree.dll" I have will VS2010 installed successfully on Windows 7 is "4.0.4.035.0". Although, I am unsure how I come by it.
Edit:
Looking at the uninstall list of programs on my pc I have
Microsoft .NET Framework 4 Client Profile
Microsoft .NET Framework 4 Extended
Microsoft .NET Framework 4 Multi-targeting pack
I am not sure which of those are responsible nor if those files are responsible at all.
Last edited by Nightwalker83; Jun 28th, 2013 at 09:08 PM.
Reason: Adding more!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jun 29th, 2013, 07:52 AM
#8
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
What should I do now?
I tried everything and nothing works...
-
Jun 29th, 2013, 09:03 PM
#9
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
What should I do now?
I tried everything and nothing works...
So you have tried installing the framework mentioned in the previous post?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jun 30th, 2013, 05:52 AM
#10
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
I can't find the .NET framework 4.0.4.035.0 installer, as mentioned in post #7.
-
Jun 30th, 2013, 07:20 AM
#11
Re: Type initializer for <Module> threw an exception
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jun 30th, 2013, 07:25 AM
#12
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
Didn't work either, tried that a couple of times a few days ago.
-
Jun 30th, 2013, 08:04 AM
#13
Re: Type initializer for <Module> threw an exception
I am installing VS2010 on a Virtual Machine running Vista which, currently has mscoree.dll version 2.0.50727.1434 installed.
Edit:
Just finished installing, and VS2010 loaded without any errors. It also updated mscoree.dll was updated to 4.0.31106.0. Also, the version of Windows Vista I was using was a completely new install, no other programs installed.
Last edited by Nightwalker83; Jun 30th, 2013 at 08:52 AM.
Reason: Adding more!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jun 30th, 2013, 11:22 AM
#14
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
But I'm using Windows 7, that's not the same as Vista.
-
Jun 30th, 2013, 07:33 PM
#15
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
But I'm using Windows 7, that's not the same as Vista.
Since you are only using the 32bit version of Windows 7 there wont be many differences if any at all.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 1st, 2013, 11:02 AM
#16
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
Wow. I have the same mscoree.dll version as you, and yet it doesn't work for me...
Could the problem be something else rather than mscoree.dll?
-
Jul 1st, 2013, 06:59 PM
#17
Re: Type initializer for <Module> threw an exception
When the error mentioned in the first post is thrown is there a more details button/link? If so it might offer some extra useful information in there.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 3rd, 2013, 12:38 PM
#18
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
No, only the error message itself and the OK and Cancel button.
-
Jul 3rd, 2013, 07:53 PM
#19
Re: Type initializer for <Module> threw an exception
Does the message mention the module name, if so what is it?
Edit:
See if The type initializer for '<Module>' threw an exception works.
Last edited by Nightwalker83; Jul 3rd, 2013 at 07:56 PM.
Reason: Adding more!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 4th, 2013, 03:32 PM
#20
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
No, the only text in the error box is "Type initializer for <Module> threw an exception".
-
Jul 4th, 2013, 06:40 PM
#21
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
No, the only text in the error box is "Type initializer for <Module> threw an exception".
Was the site I linked to in post #19 any help?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 5th, 2013, 01:09 PM
#22
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
Nope
-
Jul 5th, 2013, 07:32 PM
#23
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
I already have installed Windows 7 from scratch.
Was Visual Studios the first program you installed after this?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 6th, 2013, 11:16 AM
#24
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
No, could that be the cause of the problem?
-
Jul 6th, 2013, 08:53 PM
#25
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
No, could that be the cause of the problem?
Not sure! Might as well try it and see what happens.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 15th, 2013, 12:32 PM
#26
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
Sorry for the late reply!
Well, I've installed Windows 7 on a new partition.
First thing I did was run the Visual Basic 2010 Express installer.
After downloading all the necessary files it started installing, and when it tried to install 'Microsoft Visual Basic 2010 Express' this error came up:
Then the installer quit.
Last edited by Superthijs; Jul 15th, 2013 at 12:39 PM.
Reason: Wrong image...
-
Jul 16th, 2013, 01:48 AM
#27
Re: Type initializer for <Module> threw an exception
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 16th, 2013, 07:56 AM
#28
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
Didn't work
-
Jul 16th, 2013, 10:11 PM
#29
Re: Type initializer for <Module> threw an exception
Where did you download the installer from and how bigger is the one you downloaded compared to how big it says the file is suppose to be? It looks like you been to download it again.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 20th, 2013, 06:14 AM
#30
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
What do you mean by 'how big it says the file is supposed to be'?
-
Jul 20th, 2013, 06:46 PM
#31
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
What do you mean by 'how big it says the file is supposed to be'?
What the site says the size of the file is compared to the size of the file downloaded on to your computer.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 21st, 2013, 06:04 AM
#32
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
The website where I downloaded it from (http://www.microsoft.com/visualstudio/eng/downloads) doesn't mention the installer size.
But every Visual Studio install (2010, 2010 Express, 2012, 2012 Express, etc.) fails, it's not just this one.
-
Jul 21st, 2013, 06:50 AM
#33
Re: Type initializer for <Module> threw an exception
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 21st, 2013, 06:52 AM
#34
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
-
Jul 21st, 2013, 06:54 AM
#35
Re: Type initializer for <Module> threw an exception
Originally Posted by Superthijs
The link doesn't work?
I have edited the post now try the link.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 21st, 2013, 06:57 AM
#36
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
It says 'There are no known issues' under every Visual Basic 2010 express section.
-
Jul 21st, 2013, 07:17 AM
#37
Re: Type initializer for <Module> threw an exception
I am confused in post #6 the post you link to you say you finally got VB Express to install and it is broken again?
Originally Posted by Superthijs
It works!!!
Finally!
C:\WINDOWS\system32\mscoree.dll was the problem.
See, I have .NET framework 4.0 installed and the version of this file was not 4.0 but 2.0.
So, I fixed it as follows:
1. Downloaded a correct version of mscoree.dll
2. Booted from the Windows 7 installation disc
3. Started the command prompt
4. Renamed system32\mscoree.dll to something else (I did mscoree.dll.old)
5. Copied the downloaded mscoree.dll file to system32\
When I restarted the computer, logged in and (once again) ran the VB2010 Express installer, it worked!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 21st, 2013, 07:24 AM
#38
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
I made quite a mess of this thread I think
The link in post #6 describes my workaround for the installation problem in that thread.
After that VB2010 never worked because I kept getting this type initializer error when launching.
The other installation attempt in post #26 never even succeeded.
It's also kind of hard to explain things clearly in English because it isn't my native language... :S
Last edited by Superthijs; Jul 21st, 2013 at 10:32 AM.
Reason: Extra information
-
Jul 21st, 2013, 09:38 PM
#39
Re: Type initializer for <Module> threw an exception
Seeing as we don't have access to your computer I have downloaded the VB Express you link to (and I assume) you are using! I am attempting to install and run it to see if I face the same problems.
Edit:
Just tried the VB Express (web install 3.1MB) and it installed and run perfectly but still had a number of updates such as those mentioned in post #7 installed. Will try on a new (completely fresh) Windows 7 32 bit Virtual Machine and see what happens.
Again, I had no problem installing Visual Basic 2010 Express on Windows 7 Professional 32bit! I hate to say this but there is something suspicious about your set up.
Last edited by Nightwalker83; Jul 21st, 2013 at 11:24 PM.
Reason: Adding more!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 22nd, 2013, 06:10 AM
#40
Thread Starter
Lively Member
Re: Type initializer for <Module> threw an exception
So could it have something to do with my Windows 7 installation disc?
Because I did a fresh reinstall on an empty partition and VB threw errors.
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
|