The Last (Hopefully) NUnit Error: The Type Initializer for … Threw an Exception (And app.config)

After series of NUnit Error: The Type Initializer for … Threw an Exception: First One and Same One, I concluded (and hopefully this is the last post for the topic):

  1. If you open NUnit project with NUnit, the app.config file will have to be in the same folder as the NUnit project file and have the same name as the project file name:
    C:\Users\Documents\Nunit\ProjectTest.nunit
    C:\Users\Documents\Nunit\ProjectTest.config
  2. If you open Visual Studio .dll file, the app.config will have to be in the same folder as the project file and have the same name as the project file name (including the extension):
    C:\Users\Documents\Nunit\ProjectTest.dll
    C:\Users\Documents\Nunit\ProjectTest.dll.config
  3. If you open Visual Studio project (.csproj) or solution (.sln) file with your NUnit, the app.config will have to be in the same folder as the project file and have the same name as the project file name:
    C:\Users\Documents\Nunit\ProjectTest.csproj
    C:\Users\Documents\Nunit\ProjectTest.config
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s