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

"paket.exe pack" with "include-referenced-projects" and "minimum-from-lock-file" does not work when project references have a paket.template file #1586

Rcomian opened this Issue Apr 8, 2016 · 2 comments


None yet
2 participants

Rcomian commented Apr 8, 2016


Packing nuget packages does not work when you have this situation:

  • Project references to other nuget packages
  • the switch include-referenced-projects
  • the switch minimum-from-lock-file

Repro steps

  • Create a solution with 2 c# projects PackageA & PackageB
  • Give both projects a minimally working paket.template file with the line type project
  • Add a reference from PackageB to PackageA
  • run the command .paket\paket.exe pack output . include-referenced-projects minimum-from-lock-file

Expected behavior

  • 2 Packages, PackageA.nupkg & PackageB.nupkg
  • PackageB.nupkg includes a reference to PackageA.nupkg but not its assembly

Actual behavior

Command fails with:

Paket failed with:
        The input sequence was empty.
Parameter name: source

With the -v switch we get the stack trace:

     at Microsoft.FSharp.Collections.SeqModule.Head[T](IEnumerable`1 source)
   at Paket.PackageMetaData.findDependencies@294-4.Invoke(Tuple`2 tupledArg)
   at[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x)
   at Paket.PackageMetaData.findDependencies[a](DependenciesFile dependenciesFile, String config, String platform, TemplateFile template, ProjectFile project, Boolean lockDependencies, Boolean minimumFromLockFile, FSharpMap`2 map, Boolean includeReferencedProjects, FSharpOption`1 version, a specificVersions)
   at Paket.PackageProcess.allTemplates@172.Invoke(Tuple`2 tupledArg)
   at )
   at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.Generator.Microsoft-FSharp-Collections-Generator-Generator-1-get_Apply@542-1.Invoke(Unit unitVar0)
   at Microsoft.FSharp.Collections.Generator.appG[a](Generator`1 g)
   at Microsoft.FSharp.Collections.Generator.EnumeratorWrappingLazyGenerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at Paket.PackageProcess.Pack[a](String workingDir, DependenciesFile dependenciesFile, String packageOutputPath, FSharpOption`1 buildConfig, FSharpOption`1 buildPlatform, FSharpOption`1 version, IEnumerable`1 specificVersions, FSharpOption`1 releaseNotes, FSharpOption`1 templateFile, FSharpOption`1 excludedTemplates, Boolean lockDependencies, Boolean minimumFromLockFile, Boolean symbols, Boolean includeReferencedProjects, FSharpOption`1 projectUrl)
   at Paket.Program.handler@350-21.Invoke(ParseResults`1 results)
   at Paket.Program.processWithValidation[T](FSharpFunc`2 validateF, FSharpFunc`2 commandF, Command command, String[] args)
   at Paket.Program.processCommand@61-1.Invoke(Command command, String[] args)
   at Paket.Program.main()

Known workarounds

  • Remove switch include-referenced-projects
  • Remove switch minimum-from-lock-file
  • Remove the reference between the two projects
  • Remove the paket.template from PackageA

However, all of these options affect the output nupkg.
The least damaging is probably removing the minimum-from-lock-file flag.

Related information

  • Windows 7
  • Main release
  • .NET Runtime 4.5

@forki forki closed this in 87b42be Apr 8, 2016

@forki forki added the bug label Apr 8, 2016


This comment has been minimized.

Show comment
Hide comment

forki Apr 8, 2016


please retry


forki commented Apr 8, 2016

please retry


This comment has been minimized.

Show comment
Hide comment

Rcomian Apr 11, 2016

Amazing response. Thank you, yes that worked.

Rcomian commented Apr 11, 2016

Amazing response. Thank you, yes that worked.

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