Loading dll using Assembly.Load(byte[], byte[]) different behaviour between Visual Studio 2013 and 2015
I though I left VS2013 behind when I started using VS2015 RTM. However I noticed a very odd thing that could be a setting problem or a just a bug.
I have implemented my own NUnit testrunner to be able to test addons (class libraries) for an Application (called Revit). This testrunner sits as its own addon in Revit. It in turn loads the test assemblies using Assembly.Load(byte[], byte[]) and lets me run the tests. Now in VS2013 I could debug my test classes, but using the exact same dlls (both for the testrunner, tests and tested dll) but debugging using VS2015 I cant debug the tests. VS2015 think its external code and just skips it. Using both VS2013 and VS2015 I can see that the pdbs are loaded correctly.
Has anyone seen anything like this? Is there a setting in VS2015 that prevents me from debugging Tests or any other setting? If I check the stacktrace I can see that VS believes that it called external code when it called my testmethod.
Thanks in advance!
Okay, I solved it!
The default value for Managed compatibility mode in the debugging settings of VS was off (naturally). Turning this on did the trick!