Search code examples
visual-studiovisual-studio-2017nuget

Visual Studio not creating nuget package on build


I have a class library targeting net471 and I have set up the information in Properties->Package. Generate nuget package on build is also checked.

I'm also trying to create package manually by right-clicking on the project and selecting Generate nuget package.

When I build the project, no package is created.

Am I missing something?

Note: I'm using the latest version of Visual Studio Community 2017 (15.6.2)


Solution

  • The csproj and the following section which should be deleted:

    <ItemGroup>
      <PackageReference Include="NuGet.Build.Packaging" Version="0.1.227" />
    </ItemGroup>
    

    Once this is deleted, creating nuget packages works.