System.Security.VerificationException操作可能会破坏运行时的稳定性

时间:2013-10-24 20:59:13

标签: c# unit-testing

当我尝试在我的解决方案下从一个文件夹运行单元测试时,我收到此错误

单元测试运行器无法运行测试 System.Security.VerificationException操作可能会破坏运行时的稳定性

当我为整个解决方案运行单元测试时,所有测试加上这些测试运行正常。我试过了 将规则集设置为level1 [assembly:SecurityRules(SecurityRuleSet.Level1)],但这不起作用

我的assemblyinfo看起来像

[assembly: AssemblyTitle("CommonTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]


[assembly: Guid("d30f8726-fc9f-4cd0-986e-a2ed5ea0a5cd")]

和globalassemblyinfo.cs看起来像

[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.MainAssembly)]

[assembly: CLSCompliant(false)]

0 个答案:

没有答案