项目里不同版本之间调用DLL,引发的问题

如:Assembly 'SPPD.Backend.DataAccess.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception. 这种提示。

解决方法:AssemblyInfo.cs里加句[assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)]

猜你喜欢

转载自blog.csdn.net/hezudao25/article/details/53336607