packet pack fails if paket.references contains an unknown reference #1514

Closed
michael-baker opened this Issue Mar 14, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@michael-baker

Very minor issue.

If you create a solution with two projects. Project A and B.
Project B depends on Project A.

If you attempt to run

paket.exe pack buildconfig "Debug" buildplatform "AnyCPU" output ..\..\Bin

against Project B where Project B has a paket.references defined as

nuget ProjectA

Then the packaging process will fail

Paket version 2.52.3.0
Paket failed with:
The given key was not present in the dictionary.

This is because the solution level paket.dependencies doesn't contain an entry for ProjectA.
It would be nice to have a friendly error message rather than the generic key not found exception in this case. However I do accept this is user error :)

zip which reproduces the issue is attached.

PaketDemo.zip

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Mar 14, 2016

Member

nuget ProjectA is actually not correct syntax in paket.references.
It would be correct to inly write ProjectA - but I see this as a common mistake and made the parser accept this.

So now you will see the correct error message.

Member

forki commented Mar 14, 2016

nuget ProjectA is actually not correct syntax in paket.references.
It would be correct to inly write ProjectA - but I see this as a common mistake and made the parser accept this.

So now you will see the correct error message.

@forki forki closed this in 4452fac Mar 14, 2016

@michael-baker

This comment has been minimized.

Show comment
Hide comment
@michael-baker

michael-baker Mar 14, 2016

True, I released my error with including the "nuget" prefix text shortly after posting.
Cool! Thanks for the tweak 👍

True, I released my error with including the "nuget" prefix text shortly after posting.
Cool! Thanks for the tweak 👍

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