Search code examples
.netnuget.net-standard

Trying to pack a .NET standard class library project into a NuGet package results in a loop


I'm trying to create a NuGet package from a .NET standard class library project. I'm running dotnet pack in the VS developer console, and it results in a loop:

**********************************************************************
** Visual Studio 2022 Developer PowerShell v17.10.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS C:\Users\m0084800\source\repos\TestProjectNetStandard> dotnet pack
  Determining projects to restore...
  All projects are up-to-date for restore.
  TestProjectNetStandard -> C:\Users\m0084800\source\repos\TestProjectNetStandard\TestProjectNetStandard\bin\Release\netstandard2.0\TestProjectNetStandard.dll
  Publicando paquete NuGet...
    Determining projects to restore...
    All projects are up-to-date for restore.
    TestProjectNetStandard -> C:\Users\m0084800\source\repos\TestProjectNetStandard\TestProjectNetStandard\bin\Release\netstandard2.0\TestProjectNetStandard.dll
    Publicando paquete NuGet...
      Determining projects to restore...

This is a new, blank project containing only the default Class1.cs file. Why could this be happening?


Solution

  • I've ended using true inn the .csproj to generate the package automatically. It's available as a checkbox on the properties GUI of VS.