Repository navigation
feat: generate BuildResource for path-based kits; fix Aspire 17 migration guidance - #65
Merged
Merged
Conversation
…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".
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.
Summary
Generated
BuildResourcefor path-based kitsDotnetProjectResource,ViteAppResourceorNextJsAppResourcekit that declaresProjectPath/ResourcePathand writes noBuildResourcenow gets theAddDotnetProject/AddViteApp/AddNextJsAppregistration generated from the declared path. Nothing is generated when the kit writes the override, or when an explicit base class implements it.Fix: the Aspire 17 migration guidance lost projects
Aspire.AppHost.SdksetIsAspireProjectResource=trueon every<ProjectReference>, andAspire.Hosting.AppHost(still in 17.0.0) only generatesProjects.*types from references that carry it.Microsoft.NET.Sdksets 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 aProjects.XorAppHostProjects.Xthat does not exist.skills/purview-resourcekit-migration: a required inventory step runs before the SDK changes. Each reference is converted to a<ResourceKitProject>item plusProjectPath, or kept withIsAspireProjectResource="true",ReferenceOutputAssembly="false"andSkipGetTargetFrameworkProperties="true"(for example forAddAzureFunctionsProject<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.