question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paket 4: Paket.Restore.targets mess up dependencies for `dotnet pack`

See original GitHub issue

Description

potnet pack incorrectly calculate NuGet package dependencies after adding Paket.Restore.targets into fsproj.

Repro steps

Here https://github.com/fsprojects/FsUnit/tree/master everything works as expected.

  • build.fsx uses paket.template to create FsUnit.nuget for net45
  • then it uses dotnet pack to create package for netstandard
  • note that both project files in the same folder
  • then script uses dotnet-mergenupkg to merge two packages into one

Resulting package has correct dependencies: screen shot 2017-03-16 at 6 51 38 pm 1

Execute following steps to reproduce the bug (or use branch from https://github.com/fsprojects/FsUnit/pull/104)

  1. call paket install .paket\paket.exe install
  2. prev step update paket to version 4 and add Paket.Restore.targets to all netstandard and netcore projects (see https://github.com/fsprojects/FsUnit/pull/104)
  3. after that execute build.cmd BuildPackage
  4. resulting nuget package bin\FsUnit.3.0.0.nupkg will have very strange dependencies

screen shot 2017-03-16 at 6 52 56 pm

Expected behavior

Only 3 dependencies fro .NET Standard 1.6 framework:

  • .NET Framework 1.6.*
  • FSharp.Core 4.1.*
  • NUnit 3.6.*

Actual behavior

Direct dependencies to lots of netframework packages

Known workarounds

No

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:28 (25 by maintainers)

github_iconTop GitHub Comments

3reactions
forkicommented, Mar 30, 2017

Ok paket 4.1.3 works with dotnet cli 2.0.0-preview1-005683

yay!

0reactions
enricosadacommented, Apr 3, 2017

Not having NETStandard.Library is not correct. But is added by default by normal template so is not an urgent bugfix afaik

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't get paket to work for the simplest case : r/fsharp
I think you need to run `dotnet paket restore`; this will ensure that the package is actually restored and available to your app....
Read more >
paket restore
A dependency manager for .NET with support for NuGet packages and git repositories.
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
Package Restore tries to install all package dependencies to the correct state matching the package references in your project file ...
Read more >
Cannot restore NuGet packages using Paket in Azure ...
I'm trying to define a pipeline that builds for .NET Core solution. Dependencies are managed by Paket. A dependency is downloaded from Azure ......
Read more >
Dotnet pack - include referenced projects
Well, the problem here is that a dependency in a nuspec file == a nuget package. The dependencies element within metadata contains any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found