Unit Test Generation Error: Module table is not valid.
-
Friday, February 03, 2012 9:43 AM
When I try to create unit tests for my class in VS2010 it shows unit test generation window, but immediately after that I get message box saying:
Unit Test Generation Error: Module table is not valid.
After clicking OK both windows just close.
There seems to be no information on this error anywhere.
Any ideas?
All Replies
-
Monday, February 06, 2012 5:54 AMModerator
Hi Samuel,
Thank you for posting in the MSDN forum.
I never meet this error.
Whether other projects have the same behavior when you create unit tests for the methods in some class?
If it is, then it would be the Visual Studio problem, then I suggest you try the following options:
You need locate to the IDE folder then run these commands, or you can set path to the system environment.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.
Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.
Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.
Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.
After these, you can create a new project in a new workspace to avoid if there’re any problems of the old workspace settings.
If this issue is also exists, I think you need to reinstall the vs2010.
1. Uninstall vs2010.
2. Clean the registry and files on disk.
3. Install vs2010.
4. Create the new solution in a new workspace.
If it only in this special project or class, can you share it to us? Please give us a screen shot about this error. We will try to check it with our computer
If there's any concern, please feel free to let me know.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
Tuesday, February 07, 2012 10:30 AM
Hi Jack,
It is definitely problem with project. I have 4 projects in solution (two are test projects) and only one of them have this error. It happens for any class in that project.
I tried moving affected project to new solution with the same result.
Since everything else works and I can create unit tests by hand, it is currently not big issue for me.
Thanks
Best regards
-
Wednesday, February 08, 2012 9:57 AMModerator
Hi Samuel,
Glad to receive your reply.
It is definitely problem with project. I have 4 projects in solution (two are test projects) and only one of them have this error. It happens for any class in that project.
I tried moving affected project to new solution with the same result.
Based on your description, do you mean that it is related to your specific project which you want to test? If so, we can make sure that it isn’t a Unit Test issue.
If we want to create a unit test for a method in a class, we should make sure that whether the method code is correct. You can tell us which language are you using? C# or C++ or others? So I can provide the correct forum for this issue, or you can share it with us, we will try to debug it with our PC.
Sincerely,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
- Edited by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Thursday, February 09, 2012 2:28 AM
-
Thursday, February 09, 2012 11:45 AM
Hi Jack,
problem was in one of third-party assemblies this project was referencing. I originally used prebuilt assembly I got from vendor.
After building assembly myself from source, problem disappeared.
Thanks
- Proposed As Answer by TejasJ Thursday, February 09, 2012 12:40 PM
- Marked As Answer by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Friday, February 10, 2012 2:22 AM
-
Friday, February 10, 2012 2:22 AMModerator
Hi Samuel,
Thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us

