Skip to content

Nugetizer packs reference assemblies into NuGet package #5800

@chkn

Description

@chkn

Details about Problem

NuGet product used: Nugetizer 3000

NuGet version (x.x.x.xxx): 4.3.0.4199

dotnet.exe --version (if appropriate): 2.0.0

VS version (if appropriate): Visual Studio for Mac 7.3 Preview (7.3 build 302)

OS version (i.e. win10 v1607 (14393.321)): OS X 10.12.5 (16F73)

Worked before? If so, with which NuGet version:

Detailed repro steps so we can see the same problem

  1. In VS for Mac, create a new .NET Standard 2.0 library project.

  2. Open Project Options -> NuGet Package -> Build and check "Create a NuGet package when building the project"

  3. Go to the Metadata page and enter a package ID, version, and description.

  4. Build the project. If you get an error, you may need to update the NuGet.Build.Packaging package.

  5. Find the built package in the project output directory. Rename the ".nupkg" extension to ".zip" and unzip it.

  6. Inside the package, under the lib/netstandard2.0 directory, note that there are a ton of System.*.dll reference assemblies.

Expected result: These assemblies should not be packaged in the NuGet package.

Workaround: The reference assemblies are not packaged if you add an explicit PackageReference to NETStandard.Library in the csproj:

<PackageReference Include="NETStandard.Library" Version="2.0.0" />

However, this causes a build time warning telling you that you shouldn't do this.

Sample Project

Project created using the above steps:
NETStandard20Test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions