Skip to content

Conversation

@robch
Copy link
Owner

@robch robch commented Dec 23, 2025

Problem

The DotnetToolSettings.xml Version="2" format was preventing installation on .NET SDK 9.0.306 (requires 9.0.400+). This issue was introduced in PR #87 when the publish loop was removed from pack.sh.

Root Cause

When dotnet pack runs without --no-build, it sees <RuntimeIdentifiers> in the .csproj and generates DotnetToolSettings.xml Version="2" format, which requires .NET SDK 9.0.400+.

Solution

Remove <RuntimeIdentifiers> property from all tool projects. The RIDs are only needed for self-contained publishing, where they're specified via -r <RID> flag in publish-self-contained.sh.

Changes

  • Remove <RuntimeIdentifiers> from cycod.csproj, cycodt.csproj, cycodmd.csproj, cycodgr.csproj
  • NuGet packages now generate DotnetToolSettings.xml Version="1" (compatible with SDK 9.0.306)
  • Self-contained publishing still works (RIDs specified on command line)

Testing

? Built and packed locally with version 1.0.0-alpha-20251222.2
? Verified DotnetToolSettings.xml uses Version="1"
? Successfully installed all tools: dotnet tool install -g <tool> --version 1.0.0-alpha-20251222.2
? Verified all tools run with correct version

Fixes

Installation error:

The settings file in the tool's NuGet package is invalid: Format version is higher than supported. This tool may not be supported in this SDK version. Update your SDK.

…ation

The DotnetToolSettings.xml Version="2" format was preventing installation on
.NET SDK 9.0.306 (requires 9.0.400+). Removing RuntimeIdentifiers from the
.csproj files forces Version="1" format which is compatible with SDK 9.0.306.

Changes:
- Remove <RuntimeIdentifiers> property from all tool projects
- RuntimeIdentifiers are still specified via -r flag in publish-self-contained.sh
- NuGet packages now generate DotnetToolSettings.xml Version="1"
- Tools can now be installed with: dotnet tool install -g <tool> --version <version>

This fixes the issue introduced when the publish loop was removed from pack.sh
in PR #87. The simplified pack approach triggered Version="2" format because
dotnet pack saw RuntimeIdentifiers in the .csproj files.

Fixes installation error:
'The settings file in the tool's NuGet package is invalid: Format version is
higher than supported. This tool may not be supported in this SDK version.'
@robch robch merged commit 7e20b71 into master Dec 23, 2025
1 check passed
@robch robch deleted the robch/fix-nuget-tool-settings-version branch December 23, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants