不明确的程序集绑定策略

时间:2018-06-14 12:25:05

标签: postsharp

最近,我们在构建其中一个项目时遇到了以下异常。

为什么Postsharp会抱怨绑定,因为绑定(视觉上)相同?

Whe曾尝试升级到5.0.51(Essentials),但由于许可我们无法升级。

此致 Guido Hermans

Severity    Code    Description Project File    Line    Suppression State
Error       Unhandled exception (4.1.15.0, postsharp.srv.4.0-x86.exe, CLR 4.0.30319.461808, Release): PostSharp.Sdk.CodeModel.BindingException: Ambiguous assembly binding policies: Assembly 'newtonsoft.json, version=9.0.0.0, culture=neutral, publickeytoken=30ad4fe6b2a6aeed' redirects both to 'newtonsoft.json, version=9.0.0.0, culture=neutral, publickeytoken=30ad4fe6b2a6aeed' and 'newtonsoft.json, version=9.0.0.0, culture=neutral, publickeytoken=30ad4fe6b2a6aeed'.
   at PostSharp.Sdk.CodeModel.AssemblyBindingPolicyManager.EvaluatePolicy(IAssemblyName assemblyName, Boolean evaluateSystemPolicies)
   at PostSharp.Sdk.CodeModel.CompareExtensions.^4+F3cylo(IAssemblyName _0, IAssemblyName _1, AssemblyBindingPolicyManager _2, BindingOptions _3, Boolean _4)
   at PostSharp.Sdk.CodeModel.ModuleDeclaration.FindAssembly(IAssemblyName assemblyName, BindingOptions bindingOptions)
   at PostSharp.Sdk.CodeModel.ModuleDeclaration.^nQbUijLO(String _0, IAssemblyName _1, BindingOptions _2)
   at PostSharp.Sdk.CodeModel.ModuleDeclaration.FindType(Type reflectionType, BindingOptions bindingOptions)
   at PostSharp.Sdk.Extensibility.Tasks.DisableMessagesTask.Execute()
   at PostSharp.Sdk.Extensibility.Project.ExecutePhase(String phase)
   at PostSharp.Sdk.Extensibility.Project.Execute()
   at PostSharp.Hosting.PostSharpObject.ExecuteProjects()
   at PostSharp.Hosting.PostSharpObject.InvokeProject(ProjectInvocation projectInvocation). .......

0 个答案:

没有答案