0

I developed a project targeting .net v4.6, but I need to use a package only contains dll targeting .net v4.6.1. Can I use this package in my project without change my targeting version?

  • 1
    A try will give the answer I suppose – apomene Oct 12 '17 at 12:06
  • 1
    I wouldn't *expect* you to be able to, no. How would it handle members introduced in .NET 4.6.1? (See https://github.com/Microsoft/dotnet/blob/master/releases/net461/dotnet461-changes.md for changes.) – Jon Skeet Oct 12 '17 at 12:07

1 Answers1

4

NuGet will look for a match of the highest version that is less than or equal to your target version.

If a match is not found, NuGet copies the assembly for the highest version that is less than or equal to the project's target framework, if available

You can consume packages that have an older version, but not packages that only have a newer version.

Fenton
  • 241,084
  • 71
  • 387
  • 401