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

KeyNotFoundException when project is net4.0-client #1095

Description

@Stift

We have a project that has in its csproj file the following settings
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile>

paket install --verbose fails with the following exception and stacktrace

Paket failed with:
        Exception of type 'System.Collections.Generic.KeyNotFoundException' was thrown.
StackTrace:
     at Microsoft.FSharp.Collections.ListModule.Pick[T,TResult](FSharpFunc`2 chooser, FSharpList`1 list)
   at Paket.BindingRedirects.applyBindingRedirects(FSharpFunc`2 bindingRedirects, String configFilePath)
   at Paket.BindingRedirects.applyBindingRedirectsToFolder@148-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.Install@148.Invoke(Unit unitVar0)
   at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
   at Paket.Program.handler@295-10.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()

I was able to break this issue down to https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/FrameworkHandling.fs#l360 where is no PortableProfile with a 'Client' definition.
I hope I provided the right information to solve this issue, else I'm open for questions.

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