Skip to content

paket pack fails with "Unable to find Debug output path node" on SDK-style projects targeting net11.0-windows (regression from Paket 8) #4504

Backlog

Description

@jam40jeff

Description

After upgrading from .NET 8 + Paket 8 to .NET 11 + Paket 12.0.0, running dotnet paket pack on an SDK-style .csproj targeting net11.0-windows (or multi-targeting net472;net11.0-windows) fails with:

Unable to find Debug output path node in file <path/to/Project.csproj> for any known platforms

The stack trace points to /src/Paket.Core/PaketConfigFiles/ProjectFile.fs:line 1695.

While #4439 added recognition for net11.0-windows monikers in Paket 12, ProjectFile.GetOutputDirectory appears to miss the SDK-style output directory resolution for net11.0-windows and falls through to the legacy <OutputPath> XML lookup on line 1695. This worked without explicit <OutputPath> nodes in Paket 8 when targeting net8.0-windows.

Repro Steps

  1. Create an SDK-style .csproj with no explicit <OutputPath> nodes:
    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFrameworks>net472;net11.0-windows</TargetFrameworks>
        <Version>1.0.0</Version>
      </PropertyGroup>
    </Project>
  2. Build the project (dotnet build -c Debug), confirming output is generated in bin\Debug\net472\ and bin\Debug\net11.0-windows\.
  3. Run dotnet paket pack ./nupkgs --interproject-references min.

Expected Behavior

dotnet paket pack resolves the SDK-style output directories (bin\Debug\net472\ and bin\Debug\net11.0-windows\) automatically without requiring explicit <OutputPath> nodes in the .csproj, matching Paket 8 behavior with net8.0-windows.

Actual Behavior

dotnet paket pack fails at ProjectFile.fs:line 1695 with Unable to find Debug output path node in file ... for any known platforms.

Workaround

Adding explicit legacy <OutputPath> property groups directly inside each net11.0-windows .csproj (not Directory.Build.props) satisfies the line 1695 fallback:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  <OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <OutputPath>bin\Release\</OutputPath>
</PropertyGroup>

Environment

  • Paket version: 12.0.0
  • .NET SDK: .NET 11
  • OS: Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions