NuGet package conflict

taustin's Avatar

taustin

16 May, 2017 09:39 PM

I have a C# project (VS2015, .NET 4.5.2) that has numerous NuGet package dependencies. I cannot update some of them and compile successfully because PostSharp throws an IndexOutOfRange exception. The problem seems to be with upgrading either the LanguageExt packages or the System.Reactive packages (which the LanguageExt packages depend on and therefore get updated when I update them). It's also possibly the System.ValueTuple package, which gets added when the System.Reactive packages update. I have attached a copy of my packges.config file.

Here is the exception output by the compiler:

Error Unhandled exception (4.3.33.0, postsharp-net40-x86-srv.exe, CLR 4.0.30319.394271, 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.CodeModel.Collections.CustomAttributeDeclarationCollection.Contains(IType type)
   at PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.^SgrhoGlQ(AssemblyRefDeclaration _0)
   at PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.^+GwnKh4ZYHu3()
   at PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.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). MyProject D:\MyProject\POSTSHARP

  1. 1 Posted by taustin on 17 May, 2017 03:05 PM

    taustin's Avatar

    packages.config file doesn't seem to have attached. Here are the contents:

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="FSharp.Core" version="4.1.17" targetFramework="net452" />
      <package id="IdentityServer3" version="2.6.0" targetFramework="net452" />
      <package id="LanguageExt.Core" version="1.9.3" targetFramework="net452" />
      <package id="LanguageExt.Parsec" version="1.9.3" targetFramework="net452" />
      <package id="LanguageExt.Process" version="1.9.3" targetFramework="net452" />
      <package id="Newtonsoft.Json" version="10.0.2" targetFramework="net452" />
      <package id="NLog" version="4.4.9" targetFramework="net452" />
      <package id="Owin" version="1.0" targetFramework="net452" />
      <package id="PostSharp" version="4.3.33" targetFramework="net452" />
      <package id="PostSharp.Patterns.Diagnostics" version="4.3.33" targetFramework="net452" />
      <package id="PostSharp.Patterns.Diagnostics.NLog" version="4.3.33" targetFramework="net452" />
      <package id="System.Collections.Immutable" version="1.3.1" targetFramework="net452" />
      <package id="System.Reactive.Interfaces" version="3.0.0" targetFramework="net451" />
      <package id="System.ValueTuple" version="4.3.1" targetFramework="net452" />
      <package id="Thinktecture.IdentityModel.Client" version="4.0.1" targetFramework="net451" />
    </packages>

  2. Support Staff 2 Posted by PostSharp Techn... on 18 May, 2017 08:29 AM

    PostSharp Technologies's Avatar

    Hello,

    thank you for the content of packages.config file.

    Unfortunately we are not able to reproduce the issue. Please, could you provide us a minimal example project?

    Please, do you use any obfuscator (for example SmartAssembly) or ILMerge?

    -jakub

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac