我有一个。net框架解决方案,使用postsharp版本4.2.21.0。
我需要升级我们的newtonsoft。从11.0.2到13.0.1的Json包。升级后,解决方案无法构建,因为os这个帖子尖锐的错误
Severity Code Description Project File Line Suppression State
Error Unhandled exception (4.2.21.0, postsharp-net40-x86-srv.exe, CLR 4.0.30319.528449, Release):
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at ^e9p3FN6izlJE.^TxMhIJ+U(^EyL1LQX01Ck8 _0)
at PostSharp.Sdk.Binary.ModuleReader.ImportCustomAttributes()
at PostSharp.Sdk.Binary.ModuleReader.ImportCustomAttributes(MetadataDeclaration _0)
at PostSharp.Sdk.CodeModel.Collections.CustomAttributeDeclarationCollection.DoLazyLoading()
at PostSharp.Sdk.CodeModel.Collections.ElementCollection`1.^7qsXyJec()
at PostSharp.Sdk.CodeModel.Collections.ElementCollection`1.GetEnumerator()
at PostSharp.Sdk.Extensibility.Tasks.AnnotationRepositoryTask.^H9TZo5Th(TypeDefDeclaration _0)
at PostSharp.Sdk.Extensibility.Tasks.AnnotationRepositoryTask.^wwGmHrz+(IAnnotationInstance _0)
at PostSharp.Sdk.Extensibility.Tasks.AnnotationRepositoryTask.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).
当我降级newtonsoft。Json返回到11.0.2,解决方案构建良好。
有可能更新这个newtonsoft吗?Json没有得到尖锐的错误?
这当然是2015年发布的PostSharp 4.2中的一个错误,但目前不支持。请更新到支持的版本。