Mixed mode error with Visual Studio NUnit extension

I get the classics:

System.IO.FileLoadException: a mixed-mode assembly is created against the runtime version "v2.0.50727" and cannot be loaded into runtime 4.0 without additional configuration information.

Error executing nunit tests. I am using the NUnit adapter for visual studio 2012.

I updated NUnit as per this post and it works great. I thought this might be similar to this question , but I made this fix and it still doesn't work.

I assume that there is some configuration file in which to add the flag useLegacyV2RuntimeActivationPolicy="true", but I do not know where it is located. Which file do I need to edit for this?

+4
source share
1 answer

I also had this problem.
My solution was to set useLegacyV2RuntimeActivationPolicy="true"to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\TE.ProcessHost.Managed.exe.config

+1
source

All Articles