question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NetStandardImplicitPackageVersion ignored for .NET Framework

See original GitHub issue

From @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

  1. Create empty .net standard project.
  2. Change target frameworks to <TargetFrameworks>net46;netstandard1.6</TargetFrameworks>
  3. Add reference to any package that requires .NETStandard.Library, for example: Microsoft.Extensions.FileSystemGlobbing version 1.1.1
  4. Add <NetStandardImplicitPackageVersion>2.0.0</NetStandardImplicitPackageVersion>
  5. 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:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rohit21agrawalcommented, Aug 29, 2017

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

0reactions
livarcocccommented, Nov 18, 2017

Closing as the documentation has since been patched.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found