NetStandardImplicitPackageVersion ignored for .NET Framework
See original GitHub issueFrom @AlexanderSher on August 27, 2017 3:21
Details about Problem
NuGet product used: VS UI NuGet version: 4.3.0 VS version: 15.3.1 OS version: Windows 10.0.15063
Detailed repro steps so we can see the same problem
- Create empty .net standard project.
- Change target frameworks to <TargetFrameworks>net46;netstandard1.6</TargetFrameworks>
- Add reference to any package that requires .NETStandard.Library, for example: Microsoft.Extensions.FileSystemGlobbing version 1.1.1
- Add
<NetStandardImplicitPackageVersion>2.0.0</NetStandardImplicitPackageVersion>
- Build
Actual: project.assets.json specifies “NETStandard.Library/1.6.1” as a dependency for “.NETFramework,Version=v4.6” target but “NETStandard.Library/2.0.0” for “.NETStandard,Version=v1.6” target. Expected: All targets should have “NETStandard.Library/2.0.0” dependency
Sample Project
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net46;netstandard1.6</TargetFrameworks>
<NetStandardImplicitPackageVersion>2.0.0</NetStandardImplicitPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="1.1.1" />
</ItemGroup>
</Project>
No content required.
Copied from original issue: NuGet/Home#5809
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to fix $(NETStandardImplicitPackageVersion) error ...
ArgumentException: '$(NETStandardImplicitPackageVersion)' is not a valid version string. ... NET Standard <version> under Target framework.
Read more >MSBuild reference for .NET SDK projects
Use the NetStandardImplicitPackageVersion property when you want to specify a framework version that's lower than the metapackage version. The ...
Read more >Troubleshoot .NET Framework targeting errors
This article provides resolutions for MSBuild errors that might occur because of reference issues.
Read more >NET project SDK overview
NET Standard 1.0 - 2.0, you can use the <NetStandardImplicitPackageVersion> property and set the version you need. Build events. In SDK-style ...
Read more >Multi-targeting for NuGet Packages
NET Framework versions from within a single NuGet package. ... has been deprecated and is ignored when using the PackagesReference format.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From @dasMulli on August 27, 2017 14:59
@AlexanderSher I’ve opened a PR to the document to clarify which target frameworks the respective properties apply to https://github.com/dotnet/docs/pull/3006
Closing as the documentation has since been patched.