4
votes

I'm getting the classic:

System.IO.FileLoadException: Mixed mode assembly is build against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

Error when running nunit tests. I'm using the NUnit test adapter for visual studio 2012.

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

I assume there's some config file I need to add the useLegacyV2RuntimeActivationPolicy="true" flag to, but I don't know where it is. Which file do I need to edit for this?

1

1 Answers

1
votes

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