Make .NET SDK check in aspire doctor based on apphost language#15018
Make .NET SDK check in aspire doctor based on apphost language#15018JamesNK merged 4 commits intorelease/13.2from
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15018Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15018" |
da619c1 to
38004f0
Compare
There was a problem hiding this comment.
Pull request overview
Updates aspire doctor’s .NET SDK prerequisite check to be language-aware by attempting to locate the AppHost and skipping the SDK check when the AppHost is identified as non-.NET (polyglot) to avoid false failures in those scenarios.
Changes:
- Extend
DotNetSdkCheckto useIProjectLocator+ILanguageDiscoveryto detect a non-.NET AppHost and skip the SDK check. - Add unit tests covering “no apphost”, “non-.NET apphost”, “.NET apphost”, “multiple apphosts”, and “unknown language” behaviors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Aspire.Cli/Utils/EnvironmentChecker/DotNetSdkCheck.cs | Adds AppHost discovery + language detection to decide whether to skip the .NET SDK check for polyglot scenarios. |
| tests/Aspire.Cli.Tests/Commands/DotNetSdkCheckTests.cs | Introduces unit coverage for the new skip/fallthrough behaviors. |
38004f0 to
c37813f
Compare
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22946085239 |
|
I think we should consider removing this check. |
|
Remove it because we don't check other runtimes for polyglot (rule of consistency?) |
Update DotNetSdkCheck to detect the apphost project (same pattern as aspire run) and skip the .NET SDK check when the apphost is a non-.NET project (TypeScript, Python, Go, etc.). Fixes #14404 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip the .NET SDK check entirely when no settings.json is found or when the apphost is non-.NET. Previously the check would fall through and run whenever we couldn't determine the language. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bce7f42 to
9916ca0
Compare
We can add checks for more tools/runtimes in the future for other languages. |
Description
Make the .NET SDK check in
aspire doctoraware of the AppHost language. When the detected AppHost is a non-.NET project (TypeScript, Python, Go, etc.), the .NET SDK check is skipped since it's not required for polyglot scenarios.Uses the same
IProjectLocatorpattern asaspire runto find the AppHost, then checks its language viaILanguageDiscovery.GetLanguageByFile(). Falls through to the normal .NET SDK check when no AppHost is found, multiple are found, or the AppHost is a .NET project.Fixes #14404
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: