Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;win-arm64;linux-arm64;osx-arm64</RuntimeIdentifiers>
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RuntimeIdentifiers property should not be used together with PackAsTool=true. .NET global tools are designed to be framework-dependent and cross-platform. The RuntimeIdentifiers property is for creating runtime-specific self-contained executables, which conflicts with the dotnet tool packaging model.

When dotnet pack runs with both properties set, it may create multiple RID-specific tool packages instead of a single cross-platform tool package, or the tool may not install/run correctly.

Consider one of these approaches:

  1. Remove RuntimeIdentifiers from the project file and specify it only on the command line when running dotnet publish for self-contained builds (the release workflow already does this)
  2. Create a separate project specifically for the dotnet tool packaging without RuntimeIdentifiers

The release workflow already specifies --runtime explicitly for self-contained builds, so removing RuntimeIdentifiers from the project file shouldn't affect those builds.

Suggested change
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;win-arm64;linux-arm64;osx-arm64</RuntimeIdentifiers>

Copilot uses AI. Check for mistakes.
<RootProjectDirectory>$(MSBuildThisFileDirectory)..\..\</RootProjectDirectory>
<PackAsTool>true</PackAsTool>
<ToolCommandName>component-detection</ToolCommandName>
</PropertyGroup>

<ItemGroup>
Expand Down