Skip to content

Unresolvable warnings due to NETStandard.Library versions #666

@AArnott

Description

@AArnott

Upgrading my package reference to sqlite-net-pcl 1.3.1 (the first one to officially support netstandard1.1) caused my build to emit this warning:

C:\Program Files\dotnet\sdk\1.0.0-rc3-004504\Microsoft.Common.CurrentVersion.targets(1912,5): warning MSB3243: No way to resolve conflict between "System.Net.Http, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Net.Http, Version=4.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.

I figured this was because my library is now trying to reference both NETStandard.Library 1.6.0 and 1.6.1. So I added a direct reference to NETStandard.Library 1.6.1 to resolve that warning. Which worked, except that now I get this warning on package restore:

C:\Program Files\dotnet\sdk\1.0.0-rc3-004504\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.targets(101,5): warning : A PackageReference for 'NETStandard.Library' was in
cluded 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.m
s/sdkimplicitrefs

How am I supposed to resolve this to not have any build warnings?

Repro steps:

git clone https://github.com/AArnott/MoneyMan.git
cd MoneyMan\src\Nerdbank.MoneyManagement
git checkout 68a41e1
dotnet restore
dotnet build
# first warning
git checkout cbde46a
dotnet restore
# second warning

Possibly similar to #514

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions