Could you please verify that this simple test crashes NCrunch:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var _appDomain = AppDomain.CreateDomain(string.Format("App_{0}", Guid.NewGuid()));
}
}
}
If I choose to build test project as 4.0 .NET Framework then everything works fine, but when I choose 4.5.2. .NET Framework then NCrunch keeps showing System.AccessViolationException. BTW MSTest runs this test without any problem.
Got it. That's because third party cryptographic library. Interestingly though, that I've marked method with HandleProcessCorruptedStateExceptionsAttribute and SecurityCriticalAttribute and still couldn't intercept it, which points that exception is thrown somewhere in NCrunch.
Don't know about NUnit. But if I run tests under Resharper test system (which suspiciously looks like NCrunch by the way) I also get AccessViolationException. The only way to pass test is run it under native MSTest VS runner.
I agree. It looks like issue related to that third party crypto library.