7

Just installed Visual Studio 15.5 Preview so that I can create an Azure Function targeting .NET Core. Without making any changes, I'm seeing a warning -- see below -- that reads:

Package Microsoft.AspNet.WebApi.Client 5.2.2 was restored using .NET Framework version 4.6.1 instead of the project target framework .NET Standard version 2.0. This package may not be fully compatible with your project.

Any idea how to fix this or do I ignore this warning? As I said, this is a brand new Azure Function project I created with no changes at all.

Here's what the warning looks like: enter image description here

Sam
  • 26,817
  • 58
  • 206
  • 383

2 Answers2

4

You can pretty much ignore it, in this case.

Microsoft.AspNet.WebApi.Client targets "Portable Class Library (.NETFramework 4.5, Windows 0.0, WindowsPhone 8.0, WindowsPhone 8.1, WindowsPhoneApp 8.1)" (or net45+win8+win81 as it's the target framework moniker called), which means it's fully compatible with .NET Core and .NET Standard (>= 1.2).

The warning comes, because it do not target the netstandard1.x or netstandard2.x moniker specifically. It just tell you "this might not be compatible on .NET Core/.NET Standard".

Tseng
  • 61,549
  • 15
  • 193
  • 205
3

Yes, you did nothing wrong: this is to be expected for now. Functions v2 are in beta now, so you'd have to live with this warning for a while. It should give you no functional issues.

Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107