1. 程式人生 > >專案裡不同版本之間呼叫DLL,引發的問題

專案裡不同版本之間呼叫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)]