【问题标题】:Mixed mode error with NUnit visual studio extensionNUnit Visual Studio 扩展的混合模式错误
【发布时间】:2013-10-16 16:34:44
【问题描述】:

我得到了经典:

System.IO.FileLoadException:混合模式程序集是针对运行时版本“v2.0.50727”构建的,如果没有其他配置信息,则无法在 4.0 运行时中加载。

运行 nunit 测试时出错。我正在使用 Visual Studio 2012 的 NUnit 测试适配器。

我已将 NUnit 本身更新为 per this post,它工作正常。我认为它可能类似于this question,但我进行了修复,但它仍然无法正常工作。

我假设有一些配置文件需要添加useLegacyV2RuntimeActivationPolicy="true" 标志,但我不知道它在哪里。我需要为此编辑哪个文件?

【问题讨论】:

    标签: c# visual-studio nunit visual-studio-extensions


    【解决方案1】:

    我也遇到过这个问题。
    我的解决方案是将useLegacyV2RuntimeActivationPolicy="true" 设置为
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\TE.ProcessHost.Managed.exe.config

    【讨论】:

    • 对我的问题进行了排序。两个 cmets:a) 完整的子句是 <startup useLegacyV2RuntimeActivationPolicy="true"> </startup> b) 要在 Windows Notepad++ 中编辑文件,您需要在其他地方编辑它并将其粘贴回文件夹中,因为文件已签名。
    猜你喜欢
    • 1970-01-01
    • 2019-06-24
    • 2014-10-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-31
    • 1970-01-01
    相关资源
    最近更新 更多