TypeInitializationException error

I have created one DLL file and added it to the references of my projects.
And i tried to execute the my source code (in C Sharp) which calls up the dll file file.

Now i tried to execute without debugging and encountered with the following error :
"Unit Test Adapter threw exception: System.TypeInitializationException: The type initializer for 'Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ConsoleOutputRedirector' threw an exception. > System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.diagnostics: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Config\machine.config line 28) > System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)"

Can someone explain what could be the actual reason for the occurrence of the error?

[990 byte] By [Joshna] at [2007-12-16]
# 1
Hi,

Do you have any more details? What was the reference? Can you normally run unit tests (eg just the default unit test project)?

My initial gut reaction is that you have some sort of config section or something that you make use of a configuration section handler, and that it can't resolve that reference.

Some more details would be helpful in diagnosing this problem.

dhoptonMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 2
Hi,

yep Smile I have tried running a sample unit test using a small dll file and it was successfull in one of the machines and was not the same case in another machine.
Both the systems have the same configuration.

Please suggest the config file which needs to be changed to avoid this error?

Thanks,
Josh.

Joshna at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 3
So, running a simple DLL project fails on another system? Is this a system where you saw the initial error?
dhoptonMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 4
Yep Sad
Are there any chances to get rid of this error?
Joshna at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 5
I would suggest reinstalling VS on the effected machine -- it looks like a DLL is corrupt, or has gone missing.
dhoptonMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified