Skip to content

feat: generate BuildResource for path-based kits; fix Aspire 17 migration guidance - #65

Merged
kieronlanning merged 1 commit into
mainfrom
feat/generated-buildresource
Nov 19, 2026
Merged

kieronlanning merged 1 commit into
mainfrom
feat/generated-buildresource

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

Summary

Generated BuildResource for path-based kits

  • A DotnetProjectResource, ViteAppResource or NextJsAppResource kit that declares ProjectPath/ResourcePath and writes no BuildResource now gets the AddDotnetProject/AddViteApp/AddNextJsApp registration generated from the declared path. Nothing is generated when the kit writes the override, or when an explicit base class implements it.
  • SG0044 (Info) reports an override that only repeats the generated call. Its code fix removes the override, moving the path onto the attribute first when the attribute has none.
  • SG0018 is skipped for generated registrations, since there is no hand-written call to compare.

Fix: the Aspire 17 migration guidance lost projects

Aspire.AppHost.Sdk set IsAspireProjectResource=true on every <ProjectReference>, and Aspire.Hosting.AppHost (still in 17.0.0) only generates Projects.* types from references that carry it. Microsoft.NET.Sdk sets no default, so after the SDK swap a plain reference silently stops producing its type. Because the reference was the only record of the project's path, a migrated kit could end up pointing at a Projects.X or AppHostProjects.X that does not exist.

  • skills/purview-resourcekit-migration: a required inventory step runs before the SDK changes. Each reference is converted to a <ResourceKitProject> item plus ProjectPath, or kept with IsAspireProjectResource="true", ReferenceOutputAssembly="false" and SkipGetTargetFrameworkProperties="true" (for example for AddAzureFunctionsProject<T>). The step also preserves the resource name and adds a build check.
  • docs/wiki/concepts/Project-Resources.md: replaces the claim that the legacy form "still works on Aspire 17" with a warning explaining the above.

Version bumped to 2.2.0; CHANGELOG updated.

Testing

  • Repository.UnitTests (net10.0 + net11.0): 68/68 passed after the docs and skill changes.
  • The full suite was not run locally; CI runs every project on both frameworks.

…tion guidance

A DotnetProjectResource, ViteAppResource or NextJsAppResource kit that
declares ProjectPath/ResourcePath and writes no BuildResource now gets the
AddDotnetProject/AddViteApp/AddNextJsApp registration generated from the
declared path. SG0044 (Info) reports an override that only repeats the
generated call, and its code fix removes it, moving the path onto the
attribute first when needed.

The Aspire 17 migration guidance lost projects. Aspire.AppHost.Sdk set
IsAspireProjectResource=true on every ProjectReference, and
Aspire.Hosting.AppHost only generates Projects.* types from references
that carry it. Microsoft.NET.Sdk sets no default, so after the SDK swap a
plain reference silently stops producing its type, and the reference was
the only record of the project's path. The migration skill now inventories
every reference before the SDK changes and converts each one to a
ResourceKitProject item or keeps it with the metadata restored. The
project-resources page drops the claim that the legacy form "still works
on Aspire 17".
@kieronlanning
kieronlanning merged commit df23f22 into main Nov 19, 2026
1 check passed
@kieronlanning
kieronlanning deleted the feat/generated-buildresource branch November 19, 2026 18:01
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.

1 participant