4

I've got a NetStandard20 project Microsoft.Bot.Builder.Azure that pulls in storage dependencies to Azure (CosmosDB, Storage.Common, Blob). I'm on the latest version of each of those dependencies.

No matter what I've tried, I get this warning on build:

Warning NU1701  Package 'Microsoft.Azure.KeyVault.Core 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.    Microsoft.Bot.Builder.Azure C:\git\botbuilder-dotnet\libraries\Microsoft.Bot.Builder.Azure\Microsoft.Bot.Builder.Azure.csproj

Now, from what I can tell, the Nuget package for Microsoft.Azure.Storage.Common seems to support NetStandard2. Via Nuget.Org:

.NETStandard 2.0
Microsoft.Azure.KeyVault.Core (>= 1.0.0)
NETStandard.Library (>= 2.0.1)
Newtonsoft.Json (>= 10.0.2)

Likewise, Keyvault.Core says it supports NetStandard > 1.6.1 (Nuget Link here)

This has been bugging me for ages! What am I doing wrong, and how can I fix this?

Chris M.
  • 1,731
  • 14
  • 15

2 Answers2

2

As the warning shows that you install the package Microsoft.Azure.KeyVault.Core 1.0.0 which has no dependencies.

I suggest that you could install Microsoft.Azure.KeyVault.Core at version 3.0.3 to follow SEMVER conventions.

For more details, you could refer to this issue.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30
  • The problem is that I don't install the package. My project has no direct reference. It's a transitive dependency being pulled through from the Azure dependencies. – Chris M. Jan 29 '19 at 19:17
  • 1
    This is the best solution until a new version is released which uses a more recent version of `Microsoft.Azure.KeyVault.Core` – infl3x Apr 04 '19 at 23:01
1

The KeyVault.Core package ( GitHub Repo here ), picked up as a transitive dependency of the Azure Storage libraries doesn't yet support NetStandard20. I confirmed with the Azure Storage team that this warning is fine, and can be suppressed.

[12:20 PM] (Azure SDK Owner) So, our only dependency on that is the definitions of two interfaces, which are stable. Not the implementation. The warning should be ignorable in that case.

It does appear the Azure SDK team is "in-process" of supporting NetStandard20 as seen in this Commit.

We cannot apply the no-warn suppression directly to the package links below as they're not picked up across transitive dependencies. See this GitHub Issue for details.

The result: I've had to suppress this warning for the entire assembly:

<PropertyGroup>
  <NoWarn>$(NoWarn);NU1701</NoWarn>
</PropertyGroup>
Chris M.
  • 1,731
  • 14
  • 15