Skip to content

Fix Linux/macOS native binary nesting in dotnet tool package#25

Closed
Copilot wants to merge 2 commits intofix-nugetfrom
copilot/sub-pr-24
Closed

Fix Linux/macOS native binary nesting in dotnet tool package#25
Copilot wants to merge 2 commits intofix-nugetfrom
copilot/sub-pr-24

Conversation

Copy link

Copilot AI commented Mar 10, 2026

When packing extension-less binaries (Linux/macOS cirup) with a PackagePath ending in the same name as the source file, MSBuild treats the final path segment as a directory, producing native/linux-x64/cirup/cirup instead of native/linux-x64/cirup. Windows was unaffected because cirup.exe carries an extension. This meant the dotnet tool silently installed but always failed to locate the native binary on Linux and macOS.

The same bug existed in both the old net10.0 RID-specific packages (0.4.0, 0.5.0) and in the new net8.0 single-package approach introduced in this PR.

Changes

  • nuget/tool/Devolutions.Cirup.Tool.csproj: Add trailing backslash to PackagePath for all Linux/macOS binary entries, which tells MSBuild to treat the destination as a directory and preserve the source filename:
<!-- Before: creates native/linux-x64/cirup/cirup (directory nesting bug) -->
<None PackagePath="tools\net8.0\any\native\linux-x64\cirup" ... />

<!-- After: creates native/linux-x64/cirup (correct file path) -->
<None PackagePath="tools\net8.0\any\native\linux-x64\" ... />

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ting

Co-authored-by: mamoreau-devolutions <242016029+mamoreau-devolutions@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 10, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.nuget.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix dotnet tool release compatibility and bump to 0.6.0 Fix Linux/macOS native binary nesting in dotnet tool package Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants