Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

When PackAsTool=true, nugetizer was not emitting the DotnetTool package type in the nuspec metadata, unlike the built-in .NET SDK Pack.

Changes

  • NuGetizer.PackageMetadata.targets: Added condition to set PackageTypes="DotnetTool" when PackAsTool=true and no explicit PackageType is specified
  • given_a_tool_project.cs: Added test to verify the package type is set correctly

Result

Projects with PackAsTool=true now correctly emit:

<packageTypes>
  <packageType name="DotnetTool" />
</packageTypes>

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:

  • pkg.kzu.app
    • Triggering command: /usr/bin/dotnet dotnet build (dns block)
    • Triggering command: /usr/bin/dotnet dotnet restore --ignore-failed-sources owner --uid-owner 0 -j ACCEPT (dns block)
    • Triggering command: /usr/bin/dotnet dotnet restore --no-cache (dns block)

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

Original prompt

When PackAsTool=true in a csproj using nugetizer, the DotnetTool package type is missing.

Expected:

<packageTypes>
  <packageType name="DotnetTool" />
</packageTypes>

in the nuspec/metadata, but it's not there.
if nugetizer is removed and the built-in .NET SDK Pack is used, it properly emits that element.


💡 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.

Co-authored-by: kzu <169707+kzu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing DotnetTool package type in nuspec metadata Set DotnetTool package type when PackAsTool=true Jan 14, 2026
Copilot AI requested a review from kzu January 14, 2026 20:58
@kzu kzu marked this pull request as ready for review January 14, 2026 21:06
@kzu kzu enabled auto-merge (rebase) January 14, 2026 21:06
@kzu
Copy link
Member

kzu commented Jan 14, 2026

307 passed 307 passed 1 skipped

🧪 Details on Microsoft Windows 10.0.26100

from dotnet-retest v1.0.0 on .NET 10.0.1 with 💜 by @devlooped

@kzu kzu merged commit 2d78835 into main Jan 14, 2026
3 checks passed
@kzu kzu deleted the copilot/fix-dotnet-tool-package-type branch January 14, 2026 21:15
agocke pushed a commit to serdedotnet/serde that referenced this pull request Jan 18, 2026
Updated [NuGetizer](https://github.com/devlooped/nugetizer) from 1.4.5
to 1.4.7.

<details>
<summary>Release notes</summary>

_Sourced from [NuGetizer's
releases](https://github.com/devlooped/nugetizer/releases)._

## 1.4.7

<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### 🔨 Other
* Set DotnetTool package type when PackAsTool=true by @​Copilot in
devlooped/nugetizer#681


**Full Changelog**:
devlooped/nugetizer@v1.4.6...v1.4.7

<!-- sponsors -->

<!-- avoid this section by leaving a nosponsors tag -->
## Sponsors

The following sponsors made this release possible: @​clarius,
@​MFB-Technologies-Inc, @​sandrock, @​drivenet, @​Keflon, @​tbolon,
@​kfrancis, @​unoplatform, @​rbnswartz, @​jfoshee, @​Mrxx99, @​eajhnsn1,
@​davidjenni, @​Jonathan-Hickey, @​KenBonny, @​SimonCropp,
@​agileworks-eu, @​arsdragonfly, @​vezel-dev, @​ChilliCream, @​4OTC,
@​v-limo, @​DominicSchell, @​adalon, @​Eule02, @​henkmartijn, @​torutek,
@​mccaffers, @​cleosia.

Thanks 💜

<!-- /sponsors -->



## 1.4.6

<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### 🐛 Fixed bugs
* Fix rendering in nugetize of multiple packages by @​kzu in
devlooped/nugetizer#672
### 🔨 Other
* Add support for SLNX format when running nugetize by @​kzu in
devlooped/nugetizer#671


**Full Changelog**:
devlooped/nugetizer@v1.4.5...v1.4.6

<!-- sponsors -->

<!-- avoid this section by leaving a nosponsors tag -->
## Sponsors

The following sponsors made this release possible: @​clarius,
@​MFB-Technologies-Inc, @​drivenet, @​Keflon, @​tbolon, @​kfrancis,
@​unoplatform, @​rbnswartz, @​jfoshee, @​Mrxx99, @​eajhnsn1,
@​davidjenni, @​Jonathan-Hickey, @​akunzai, @​KenBonny, @​SimonCropp,
@​agileworks-eu, @​arsdragonfly, @​vezel-dev, @​ChilliCream, @​4OTC,
@​v-limo, @​DominicSchell, @​jwendl, @​adalon, @​Eule02, @​henkmartijn,
@​torutek, @​mccaffers.

Thanks 💜

<!-- /sponsors -->



Commits viewable in [compare
view](devlooped/nugetizer@v1.4.5...v1.4.7).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=NuGetizer&package-manager=nuget&previous-version=1.4.5&new-version=1.4.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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