-
Notifications
You must be signed in to change notification settings - Fork 84
[docs] Document new experimental APIs from Aspire.Hosting.Dotnet decoupling (ASPIREPROJECTS001) #1511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
David Pine (IEvangelist)
merged 5 commits into
release/13.5
from
docs/pr-18918-32072883250-1-993e2ce4d13b6c01
Aug 18, 2026
+69
−0
Merged
[docs] Document new experimental APIs from Aspire.Hosting.Dotnet decoupling (ASPIREPROJECTS001) #1511
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bb6350b
docs: add ASPIREPROJECTS001 diagnostic page; update ASPIREEXTENSION00…
aspire-repo-bot[bot] f740cb6
Correct generated diagnostic documentation
IEvangelist c44ff30
Correct diagnostics overview ordering
IEvangelist 218a9ef
Register projects diagnostic topic
IEvangelist 353b7d2
Document project launch args override API
IEvangelist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
62 changes: 62 additions & 0 deletions
62
src/frontend/src/content/docs/diagnostics/aspireprojects001.mdx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| --- | ||
| title: Compiler Warning ASPIREPROJECTS001 | ||
| seoTitle: "ASPIREPROJECTS001: Project launch defaults APIs are for" | ||
| description: Learn what causes the Aspire compiler warning ASPIREPROJECTS001 and how to fix it so your AppHost builds cleanly. | ||
| --- | ||
|
|
||
| import { Badge } from '@astrojs/starlight/components'; | ||
|
|
||
| <Badge | ||
| text="Version introduced: 13.5" | ||
| variant="note" | ||
| size="large" | ||
| class:list={'mb-1'} | ||
| /> | ||
|
|
||
| > Project launch defaults types and members are for evaluation purposes only and are subject to change or removal in future updates. Suppress this diagnostic to proceed. | ||
|
|
||
| This diagnostic warning is reported when using experimental project launch defaults APIs in Aspire, including: | ||
|
|
||
| - `WithProjectDefaults<T>` extension method | ||
| - `ProjectLaunchDefaultsAnnotation` | ||
| - `ProjectLaunchArgsOverrideAnnotation` | ||
|
|
||
| These APIs let a resource opt into the same launch-profile, Kestrel endpoint, and `ASPNETCORE_URLS` wiring that Aspire applies to `AddProject` resources. The resource must carry `IProjectMetadata`. They exist primarily so language integration packages (such as `Aspire.Hosting.Dotnet`) can reuse this behavior for resources that are launched through the .NET SDK. | ||
|
|
||
| ## Example | ||
|
|
||
| The following code generates `ASPIREPROJECTS001`: | ||
|
|
||
| ```csharp title="AppHost.cs" | ||
| var builder = DistributedApplication.CreateBuilder(args); | ||
| var options = new ProjectResourceOptions(); | ||
|
|
||
| builder.AddResource(new MyDotnetResource("resource")) | ||
| .WithProjectDefaults(options); | ||
| ``` | ||
|
|
||
| ## To correct this warning | ||
|
|
||
| Suppress the warning with either of the following methods: | ||
|
|
||
| - Set the severity of the rule in the _.editorconfig_ file. | ||
|
|
||
| ```ini title=".editorconfig" | ||
| [*.{cs,vb}] | ||
| dotnet_diagnostic.ASPIREPROJECTS001.severity = none | ||
| ``` | ||
|
|
||
| For more information about editor config files, see [Configuration files for code analysis rules](/diagnostics/overview/#suppress-in-the-editorconfig-file). | ||
|
|
||
| - Add the following `PropertyGroup` to your project file: | ||
|
|
||
| ```xml title="C# project file" | ||
| <PropertyGroup> | ||
| <NoWarn>$(NoWarn);ASPIREPROJECTS001</NoWarn> | ||
| </PropertyGroup> | ||
| ``` | ||
|
|
||
| ## See also | ||
|
|
||
| - [ASPIREEXTENSION001](/diagnostics/aspireextension001/) - Related experimental debug support APIs | ||
| - [Custom hosting integrations](/integrations/custom-integrations/hosting-integrations/) - Learn about creating custom integrations | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.