Pack without explicit NETStandard.Library dependency
See original GitHub issueRepro steps:
- New project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<Version>0.1.0-dev</Version>
<Authors>Author</Authors>
<Description>Descriptor</Description>
<NeutralLanguage>en</NeutralLanguage>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.3.1" PrivateAssets="none"/>
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
</ItemGroup>
</Project>
- Build in VS
- Inspect package:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>PackRepro</id>
<version>0.1.0-dev</version>
<authors>Author</authors>
<owners>Author</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<description>Descriptor</description>
<dependencies>
<group targetFramework=".NETStandard1.3">
<dependency id="Microsoft.CodeAnalysis.CSharp" version="2.3.1" exclude="Build,Analyzers" />
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Getting the right dependency version when using a .NET ...
Project X has a dependency on an external nuget package "ENP" which has different versions for netstandard and netframework.
Read more >Dependencies and .NET libraries
The primary way of adding dependencies to a .NET library is referencing NuGet packages. NuGet package references allow you to quickly reuse ...
Read more >Managing Dependencies in .NET: .csproj, .packages.config ...
Get an overview of the artifacts involved in .NET dependency management, how they interact, and how to use them.
Read more >Using .NET Standard with Full Framework .NET - Rick Strahl
NET Framework that is fully .NET Standard 2.0 compliant without any additional dependencies. First Version to support .NET Standard 2.0 is 4.6.1.
Read more >The paket.dependencies file
The paket.dependencies file is used to specify rules regarding your application's dependencies. It contains top level dependencies from all projects in the ...
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
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
was what I asked about in https://github.com/dotnet/standard/issues/601 for .NET Standard 1.x projects in order to forgo supporting VS2015-no-build-extensions and suppress the<dependency>
element.I remember it working at one point.
I’m not able to repro this with preview 8 (3.0.100-preview8-013651). The implicit PackageReferences for NETStandard.Library and Microsoft.NETCore.App are still added during evaluation.