fix: pack the dotnet new template so a tagged release publishes something - #4
Merged
Merged
Conversation
…hing CI ran `dotnet pack` over a solution whose only project is a non-packable Worker SDK app, and Meraki.Cli.nuspec listed no files, so no .nupkg was produced and a release tag would have had nothing to push. - add package/Meraki.Cli.Template.csproj (PackageType=Template) that packs content/ and carries the old nuspec metadata; it sits in a subfolder because a project next to the .slnx makes a bare `dotnet restore` ambiguous. The standard CI pack step now works unchanged. - delete the superseded Meraki.Cli.nuspec (it also hardcoded version 10.0.0) - version.json 1.0 -> 10.0: nuget.org already has up to 7.0.8, so 1.0.x would never be picked up as the latest - ship Directory.Packages.props with the template: the content csproj has no package versions of its own, so a generated project could not restore - leave content.sln out of the package: next to the generated .csproj it made a bare `dotnet build` fail with MSB1011 Verified: restore/build/pack from the root gives one package; installing it into an isolated template hive, generating a project with --apiKey and building it gives 0 warnings, 0 errors. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Meraki.Cli is a
dotnet newtemplate package, but CI never produced a package.dotnet packran over a solution whose only project is a non-packable Worker SDK app, andMeraki.Cli.nuspeclisted no files, so no.nupkgwas created. On a release tag the publish job would have had nothing to push.Changes
package/Meraki.Cli.Template.csproj(PackageType=Template) packscontent/and carries the metadata from the old nuspec. It lives in a subfolder because a project next to the.slnxmakes a baredotnet restorefail with "more than one project or solution file". The standard CI pack step now works unchanged and produces exactly one package.Meraki.Cli.nuspec: superseded, and it hardcoded version10.0.0.version.json1.0->10.0: nuget.org already hasMeraki.Cliup to7.0.8(the nuspec's10.0.0was never published). At1.0.x, new releases would be lower than the existing latest and never picked up bydotnet new install Meraki.Cli. Release-affecting: please confirm10.0is the version line you want.Directory.Packages.propswith the template:content/Meraki.Cli.csprojhas no package versions of its own (central package management), so a generated project could not restore outside this repository.content.slnout of the package: next to the generated.csprojit made a baredotnet buildfail withMSB1011.Verification
dotnet restore,dotnet build -c Release(0 warnings, 0 errors) anddotnet pack -c Release --no-buildproduce exactly one package.--debug:custom-hive, so nothing touched the machine's template cache), randotnet new meraki -n Demo.App --apiKey=abc, confirmed the key was substituted, anddotnet buildof the generated project: 0 warnings, 0 errors.🤖 Generated with Claude Code