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 causes build warnings by adding references to NETStandard.Library #2852

Closed
yaakov-h opened this Issue Oct 18, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@yaakov-h
Contributor

yaakov-h commented Oct 18, 2017

Description

When adding Paket to a project which either:

  • targets .NET Standard exclusively, or
  • multi-targets, and one of those targets is .NET Standard,

the project immediately gets two build warnings. In a strict environment, this fails the build.

Repro steps

Please provide the steps required to reproduce the problem

  1. Clone https://github.com/yaakov-h/PaketTargetFrameworkRepro
  2. Run dotnet restore
  3. Optionally, also run dotnet build.

Expected behavior

The build completes with zero warnings and zero errors.dotnet

Actual behavior

C:\Temp\PaketTargetFrameworkRepro>dotnet restore && dotnet build
C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.targets(199,5): warning : 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 [C:\Temp\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro.csproj]
C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.targets(199,5): warning : 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 [C:\Temp\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro.csproj]
  Restore completed in 16.34 ms for C:\Temp\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro.csproj.
C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.targets(199,5): warning : 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 [C:\Temp\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro.csproj]
C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.targets(199,5): warning : 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 [C:\Temp\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro.csproj]
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  PaketTargetFrameworkRepro -> C:\Temp\PaketTargetFrameworkRepro\PaketTargetFrameworkRepro\bin\Debug\netstandard1.3\PaketTargetFrameworkRepro.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.62

C:\Temp\PaketTargetFrameworkRepro>

Known workarounds

  1. Target net and/or netcoreapp explicitly instead of netstandard, or
  2. Add <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> to the project file.

Additional Information

.NET Command Line Tools (2.0.2)

Product Information:
 Version:            2.0.2
 Commit SHA-1 hash:  a04b4bf512

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.2\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

@yaakov-h yaakov-h changed the title from Paket causes build warnings by adding implicit references to NETStandard.Library to Paket causes build warnings by adding references to NETStandard.Library Oct 18, 2017

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 18, 2017

Member

Looks like this is .NET Command Line Tools (2.0.2) behaviour.
Will try to work around

Member

forki commented Oct 18, 2017

Looks like this is .NET Command Line Tools (2.0.2) behaviour.
Will try to work around

@forki forki closed this in 25643f1 Oct 18, 2017

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 18, 2017

Member

BTW: you commited 8MB version of paket into the repro. Usually you want to commit the bootstrapper renamed as paket.exe. Then it's only couple of KB

Member

forki commented Oct 18, 2017

BTW: you commited 8MB version of paket into the repro. Usually you want to commit the bootstrapper renamed as paket.exe. Then it's only couple of KB

@yaakov-h

This comment has been minimized.

Show comment
Hide comment
@yaakov-h

yaakov-h Oct 18, 2017

Contributor

Thanks!

And yeah, I know. Simple dirty repro... didn't know you could rename the bootstrapper though, thanks for the tip.

Contributor

yaakov-h commented Oct 18, 2017

Thanks!

And yeah, I know. Simple dirty repro... didn't know you could rename the bootstrapper though, thanks for the tip.

@forki

This comment has been minimized.

Show comment
Hide comment
Member

forki commented Oct 18, 2017

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 18, 2017

Member

mhm for some reason this breaks VS integration. reverting for now

Member

forki commented Oct 18, 2017

mhm for some reason this breaks VS integration. reverting for now

@forki forki reopened this Oct 18, 2017

@forki forki closed this in fdd2eea Oct 18, 2017

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 18, 2017

Member

looks it wasn't the issue for broken VS integration

Member

forki commented Oct 18, 2017

looks it wasn't the issue for broken VS integration

@yaakov-h

This comment has been minimized.

Show comment
Hide comment
@yaakov-h

yaakov-h Oct 18, 2017

Contributor

Wrong bisect?

Contributor

yaakov-h commented Oct 18, 2017

Wrong bisect?

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 18, 2017

Member

no I don't really know yet. It's VS isn't really stable and therefore it's all manual testing..

Member

forki commented Oct 18, 2017

no I don't really know yet. It's VS isn't really stable and therefore it's all manual testing..

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