Why do my tests fail with System.Security.VerificationException?

后端 未结 3 1238
醉梦人生
醉梦人生 2020-12-18 10:23

I\'m in the process of migrating one of my projects from VS2008 to VS2010. Now that I converted all of my projects in the solution to .NET 4.0 (Client Profile) when I run th

3条回答
  •  伪装坚强ぢ
    2020-12-18 11:09

    The problem seems to be related to the Code Coverage you activated. Disabling code coverage solves the issue. You could put the following in your AssemblyInfo.cs:

    [assembly: SecurityRules(SecurityRuleSet.Level1, SkipVerificationInFullTrust = true)]
    

    and reactivate code coverage.

提交回复
热议问题