MY TESTED ASP.NET CORE MVC DOCS
  • Tutorial
  • Testing Guide
  • API Reference
  • Troubleshoot
  • About
  • Troubleshoot
  • Type Initializer Exception
Show / Hide Table of Contents
  • Introduction
  • Type Initializer Exception
  • Visual Studio Random Results

When I run a test, I receive a type initializer exception without any descriptive message

MyTested.AspNetCore.Mvc uses a static constructor to bootstrap and prepare the test application. If your configuration is not valid, System.TypeInitializerException may be thrown. Depending on your test runner, you may not see a descriptive and helpful message.

In order to see more details about the problem, run the test in Debug mode and analyse the message of the InnerException.

Debugging Type Initializer Exception

  • Improve this Doc
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX