Operation could destabilize the runtime
See original GitHub issue- NUnit Adapter 3.10.0.21
- TFS 16.131.27701.1
- Code coverage enabled = true
NUnit Adapter 3.10.0.21: Test execution started
2018-06-18T12:18:41.2125333Z Running all tests in E:\Agent\_work\209\s\src\*****.Tests.Unit.dll
2018-06-18T12:18:42.8180637Z Exception NUnit.Engine.NUnitEngineException, Exception thrown executing tests in E:\Agent\_work\209\s\src\**************.Tests.Unit.dll
2018-06-18T12:18:42.8180637Z The NUnit 3 driver encountered an error while executing reflected code.
2018-06-18T12:18:42.8620107Z at NUnit.Engine.Drivers.NUnit3FrameworkDriver.CreateObject(String typeName, Object[] args)
2018-06-18T12:18:42.8620107Z at NUnit.Engine.Drivers.NUnit3FrameworkDriver.Load(String testAssemblyPath, IDictionary`2 settings)
2018-06-18T12:18:42.8620107Z at NUnit.Engine.Runners.DirectTestRunner.LoadDriver(IFrameworkDriver driver, String testFile, TestPackage subPackage)
2018-06-18T12:18:42.8629873Z at NUnit.Engine.Runners.DirectTestRunner.LoadPackage()
2018-06-18T12:18:42.8629873Z at NUnit.Engine.Runners.TestDomainRunner.LoadPackage()
2018-06-18T12:18:42.8629873Z at NUnit.Engine.Runners.DirectTestRunner.EnsurePackageIsLoaded()
2018-06-18T12:18:42.8629873Z at NUnit.Engine.Runners.DirectTestRunner.Explore(TestFilter filter)
2018-06-18T12:18:42.8629873Z at NUnit.Engine.Runners.MasterTestRunner.Explore(TestFilter filter)
2018-06-18T12:18:42.8629873Z at NUnit.VisualStudio.TestAdapter.NUnit3TestExecutor.RunAssembly(String assemblyPath, TestFilter filter) in D:\repos\nunit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnit3TestExecutor.cs:line 229
2018-06-18T12:18:42.8629873Z Innerexception: System.Security.VerificationException: Operation could destabilize the runtime.
2018-06-18T12:18:42.8629873Z at NUnit.Framework.Api.FrameworkController..ctor(String assemblyNameOrPath, String idPrefix, IDictionary settings) in C:\src\nunit\nunit\src\NUnitFramework\framework\Api\FrameworkController.cs:line 68
Issue Analytics
- State:
- Created 5 years ago
- Comments:41 (19 by maintainers)
Top Results From Across the Web
Operation could destabilize the runtime?
When this is run, I get a System.Security.VerificationException: "Operation could destabilize the runtime." I found the solution here, which is ...
Read more >VerificationException: “Operation could destabilize the runtime ...
I want to make good things happen to both good and bad people. The last thing I want to do is destabilize the...
Read more >Operation could destabilize the runtime error profiling ASP. ...
This is because the error concerns a failure by the runtime to validate Intermediate Language code at a very low-level.
Read more >"Operation could destabilize the runtime" and PEVerify ...
After compiling my app in VS2019 RC (no changes from the 2017 version, and same .NET target) I started getting “Operation could destabilize...
Read more >System.Security.VerificationException: Operation could ...
Tests using "AutoMapper" now fail with VerificationException: Operation could destabilize the runtime . There are several issues in github in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Seems to be fixed with the combination of: Latest Newtonsoft.Json 12.0.2 (doesn’t work with 12.0.1) Latest stable Test platform: 16.2 (should be >16.0.2) Latest VSTest task 2.156.2 (should be >2.153.0)
The following seems to be related: https://github.com/Microsoft/vstest/issues/1950 I had the error after switching to Newtonsoft.Json version 12. Turning off code coverage or using another json serializer are workarounds.