Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyNotFoundException when project is net4.0-client #1095

Closed
Stift opened this issue Sep 28, 2015 · 5 comments
Closed

KeyNotFoundException when project is net4.0-client #1095

Stift opened this issue Sep 28, 2015 · 5 comments
Labels
bug

Comments

@Stift
Copy link
Contributor

@Stift Stift commented Sep 28, 2015

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.

@forki

This comment has been minimized.

Copy link
Member

@forki forki commented Sep 28, 2015

mhm. not sure I understand the issue. can you provide me a repro sample?

@Stift

This comment has been minimized.

Copy link
Contributor Author

@Stift Stift commented Sep 28, 2015

mmh. Thought I explained it good enough. Find in the linked zip file everything you need to replay this
Link.
As I said before I debugged to the point that it crashes at the point mentioned above when it tries to find a match for TargetFrameworkProfile.

@forki

This comment has been minimized.

Copy link
Member

@forki forki commented Sep 28, 2015

Your instructions were good, but I didn't really see the root cause and I
assume a repro will help
On Sep 28, 2015 8:04 PM, "Christian Fiebrig" notifications@github.com
wrote:

mmh. Thought I explained it good enough. Find in the linked zip file
everything you need to replay this
Link https://www.dropbox.com/s/pizh76jiuz2v53q/PaketBugSample.zip?dl=0.
As I said before I debugged to the point that it crashes at the point
mentioned above when it tries to find a match for TargetFrameworkProfile.


Reply to this email directly or view it on GitHub
#1095 (comment).

@forki forki closed this in b8f87bd Sep 29, 2015
@forki

This comment has been minimized.

Copy link
Member

@forki forki commented Sep 29, 2015

thanks for the repro. I now understand much better ;-)

@forki forki added the bug label Sep 29, 2015
@Stift

This comment has been minimized.

Copy link
Contributor Author

@Stift Stift commented Sep 29, 2015

Works very fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.