Paket 4: Paket.Restore.targets mess up dependencies for `dotnet pack`
See original GitHub issueDescription
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
usespaket.template
to createFsUnit.nuget
fornet45
- then it uses
dotnet pack
to create package fornetstandard
- 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:
Execute following steps to reproduce the bug (or use branch from https://github.com/fsprojects/FsUnit/pull/104)
- call paket install
.paket\paket.exe install
- prev step update paket to version 4 and add
Paket.Restore.targets
to allnetstandard
andnetcore
projects (see https://github.com/fsprojects/FsUnit/pull/104) - after that execute
build.cmd BuildPackage
- resulting nuget package
bin\FsUnit.3.0.0.nupkg
will have very strange dependencies
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:
- Created 7 years ago
- Comments:28 (25 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok paket 4.1.3 works with dotnet cli 2.0.0-preview1-005683
yay!
Not having NETStandard.Library is not correct. But is added by default by normal template so is not an urgent bugfix afaik