Force NETStandard.Library 1.6.0 on NuGet links without assembly warning

I have a .NET Core 1.0 application that I created for AWS Lambda. However, AWS only supports Standard.Library 1.6.0, not 1.6.1.

I was able to explicitly reference .NETStandard.Library 1.6.0 using NuGet - and it successfully works this way in AWS.

However, for most of my NuGet links, I get tons of build warnings that say: "Detected package downgrade: NETStandard.Library from 1.6.1 to 1.6.0. Link to the package directly from the project to select a different version." And I get tons of yellow warning signs on my NuGet links that I would rather not ignore.

I tried to add each of the following separately to the .csproj file, but nothing works ...

<PropertyGroup>
    <NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup>
    <PackageReference Update="NETStandard.Library" Version="1.6.0" />
</ItemGroup>

<ItemGroup>
    <NetStandardImplicitPackageVersion Include="NetStandardLibrary" Version="1.6.0" />
</ItemGroup>

. , . - ? , ?

.

+4
1

NetStandardImplicitPackageVersion - . SDK.NET Core 2.0.0 1.0, NuGet NoWarn :

<PropertyGroup>
  <NoWarn>$(NoWarn);NU1605</NoWarn>
</PropertyGroup>
+2

Source: https://habr.com/ru/post/1684496/


All Articles