title: The NUnit 3 driver encountered an error while executing reflected code (NUnit.Engine.NUnitEngineException)
body: <p>I have a simple Nunit project which contains only a single test. I want to execute my code using command, so I have installed ‘Nunit-console.exe’ on my Windows 10 machine. After installation, executed the code on command prompt using below command</p>
  <pre><code>nunit3-console.exe &quot;G:\LiveProjects\NUnitTestProject2\NUnitTestProject2\bin\Debug\netcoreapp3.1\NUnitTestProject2.dll&quot;
  like so
  </code></pre>
  <p>After executing this command, I have discovered below error message:</p>
  <pre><code>NUnit.Engine.NUnitEngineException : The NUnit 3 driver encountered an error while executing reflected code.
    ----&gt; System.InvalidCastException : Unable to cast transparent proxy to type 'System.Web.UI.ICallbackEventHandler'.
  --NUnitEngineException
  The NUnit 3 driver encountered an error while executing reflected code.
  like so
  </code></pre>
  <p>Please refer my below code:</p>
  <pre><code>[TestFixture]   
      public class Tests
      {
          [SetUp]
          public void Setup()
          {
  
              Console.WriteLine(&quot;Welcome setup&quot;);
  
          }
  
          [Test]
          public void Test1()
          {
            
              Console.WriteLine(&quot;Welcome first Test &quot;);
              Assert.Pass();
          }
      }
  like so
  </code></pre>
  <p><strong>Configuration details of my project:</strong></p>
  <ol>
  <li><strong>Microsoft.NET Framework</strong> version 4.7.0</li>
  <li><strong>OS:</strong> window 10</li>
  <li><strong>IDE:</strong> Visual studio 2019</li>
  <li>Use <strong>Nunit framework</strong> for unit testing</li>
  <li><strong>NUnit3TestAdapter</strong> (Version) 3.16.1</li>
  <li><strong>Microsoft.NET.Test.Sdk</strong> (Version) 16.5.0</li>
  <li><strong>NUnit.Console</strong> (Version) 3.11.1</li>
  <li><strong>Target .NET framework</strong> (Version)  3.1</li>
  </ol>
  <p>Also, I have tried to disable the ‘code coverage’ option in visual studio 2019, however - I am not able to see it in. Can anyone suggest - where is ‘code coverage’ option available in visual studio 2019.</p>