docs: add "Add project references" step to C# add-Aspire-to-existing-app guide#471
Conversation
…uide Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a critical missing step to the "Add Aspire to existing app" getting started guide. The C# path was previously missing documentation about the requirement for AppHost projects to have project references to orchestrated C# projects. These references are essential because they trigger the code generation that produces the Projects.* marker types required by AddProject<T>. Without this step documented, users who manually add projects beyond what aspire init scaffolds would encounter confusing build errors.
Changes:
- Added new "Add project references" section to the C# path (both English and Japanese versions)
- Section placed strategically between "Install hosting packages" and "Model your resources"
- Includes explanation of why references are needed (marker type generation), notes that
aspire inithandles this automatically, and provides both CLI commands and XML examples for manually adding references
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/frontend/src/content/docs/get-started/add-aspire-existing-app.mdx | Adds "Add project references" section with CLI commands and XML examples for C# projects in English |
| src/frontend/src/content/docs/ja/get-started/add-aspire-existing-app.mdx | Adds "Add project references" section with CLI commands and XML examples for C# projects in Japanese |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| <Pivot id="csharp"> | ||
|
|
||
| AppHost で `AddProject<T>` を使用するには、AppHost プロジェクトがオーケストレーション対象の各 C# プロジェクトへのプロジェクト参照を持っている必要があります。これらのプロジェクト参照が、`AddProject<T>` で使用される `Projects.YourProject` マーカー型を生成します。 |
There was a problem hiding this comment.
I think there is a subtle grammatical error here
The C# path of the "Aspireify an existing app" guide was missing a critical step: the AppHost project must have
<ProjectReference>entries for every C# project it orchestrates, because those references are what generate theProjects.Foomarker types required byAddProject<T>. Without this, users hit confusing build errors after manually expanding beyond whataspire initscaffolded.Changes
### Add project referencessection (C# pivot only) inserted between "Install hosting packages" and "Model your resources in the AppHost" in both the English and Japanese docsaspire inithandles this automatically for initially selected projectsdotnet add referencecommands for adding projects later:.csprojXML for users who prefer editing the project file directlyOriginal prompt
💡 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.