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 5.x references NETStandard.Library twice

See original GitHub issue

Description

While testing it I tried: Paket 5.1.0, 5.1.3, 5.1.4, 5.1.5 and 5.1.6

When using Paket 5.x it references NETStandard.Library twice (kind of).

Repro steps

mkdir solution && cd solution && dotnet new sln
curl -L -o paket.cmd http://bit.ly/2ooaInt
paket init
echo framework: netcoreapp1.1 >> paket.dependencies
echo nuget Grpc >> paket.dependencies
mkdir project && cd project && dotnet new classlib --framework netstandard1.6 && cd ..
dotnet sln solution.sln add project\project.csproj
echo Grpc > project\paket.references
paket install && dotnet restore

Now open this solution with Visual Studio, and:

  • Unfold “Dependencies”, “Nuget” and “SDK”. “NETStandard.Library” is in both, but in “Nuget” has yellow warning triangle;
  • All dependencies of NETStandard.Library as also referenced twice (from “Nuget” and “SDK”);
  • Visual Studio show warning on “Error List” tab: A PackageReference for 'NETStandard.Library' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs

Expected behavior

  • Only “Grpc” in “Nuget” dependencies (“NETStandard.Library” should be in SDK). This is also how Paket 4.8.8 behaves.

Actual behavior

Dependecies are referenced twice.

Known workarounds

Use Paket 4.8.8.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
isaacabrahamcommented, Oct 17, 2018

I’m seeing this with a netstandard dll project which is referenced by two netcore exes.

1reaction
TheAngryByrdcommented, Aug 8, 2018

What was the reasoning behind closing https://github.com/fsprojects/Paket/pull/2516?

Also I seemed to hit the same issue that altemann has.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong reference path in NETStandard.Library.targets #708
The referenced component 'C:\Users\xxx.nuget\packages\netstandard.library ... contains a double slash, actual path has only a single slash).
Read more >
c# - System.* reference troubles when introducing ...
Digging into the dependencies of the NETStandard. Library packages, we can see that the same issue also exists in these packages: System.
Read more >
Cross-platform targeting for .NET libraries
NET Standard lets you produce libraries that are constrained to use APIs that are in a given version of .NET Standard, which means...
Read more >
Referencing .NET Standard Assemblies from both .NET ...
The project has a C# library project (an assembly) that is written to the .NET Standard 2.0. You'll recall that the .NET Standard...
Read more >
Do I need to install NuGet package on .NET standard ...
Yes, you have to "install-package" on every project that's going to use ... Each project is going to have references added to it...
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