Sitelet https://github.com/fsprojects/Paket/issues/1074
Skip to content

NullReferenceException in applyBindingRedirects during "update nuget package" #1074

Description

@vbfox

Just hapenned to me on 2.3.0.0

c:\Code\project>paket update nuget stidgen
Paket version 2.3.0.0
Updating stidgen in c:\Code\project\paket.dependencies group Main
Resolving packages for group Main:
 - stidgen 0.5.0
Locked version resolution written to c:\Code\project\paket.lock
Downloading stidgen 0.5.0

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at <StartupCode$Paket-Core>.$ProjectFile.framework@684.Invoke(FSharpOption`1 o)
   at Microsoft.FSharp.Collections.IEnumerator.map@111.DoMoveNext(b& )
   at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.TryHead[T](IEnumerable`1 source)
   at Paket.ProjectFile.GetTargetProfile()
   at Paket.BindingRedirects.applyBindingRedirects(FSharpFunc`2 bindingRedirects, String configFilePath)
   at Paket.BindingRedirects.applyBindingRedirectsToFolder@146-3.Invoke(String configFilePath)
   at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc`2 action, IEnumerable`1 source)
   at Paket.InstallProcess.InstallIntoProjects(InstallerOptions options, DependenciesFile dependenciesFile, LockFile lockFile, FSharpList`1 projects)
   at <StartupCode$Paket-Core>.$PublicAPI.UpdatePackage@192-3.Invoke(Unit unitVar0)
   at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
   at Paket.Program.handler@300-15.Invoke(ParseResults`1 results)
   at Paket.Program.processWithValidation[T](FSharpFunc`2 validateF, FSharpFunc`2 commandF, Command command, String[] args)
   at Paket.Program.processCommand@66-1.Invoke(Command command, String[] args)
   at Paket.Program.main()
   at <StartupCode$paket>.$Paket.Program.main@()

Part of the paket.dependencies :

framework: >= net40

#############################################################################
# Official NuGet package repository
source https://nuget.org/api/v2

nuget stidgen

Binding redirect aren't enabled anywhere, we do it by hand for now (Still didn't change after #1042 was fixed)

I plan to investigate a little more if I have time but I wanted to get the bug report out there in case anyone know where it come from.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions