fix(#350): repair Aspire startup on fresh-machine clone#351
Conversation
- Update Directory.Packages.props to centralize all NuGet versions - Fix AppHost.csproj project references and package pins - Refactor MongoDbResourceBuilderExtensions for cross-platform container config - Update aspire.config.json with correct resource names and endpoints - Fix Web.csproj package references to align with centralized versions - Update README with fresh-machine setup prerequisites - Update .copilot/mcp-config.json for environment portability - Record Boromir and Sam agent history for this repair session Closes #350 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
There was a problem hiding this comment.
Pull request overview
This PR addresses “fresh machine clone” failures that prevent Aspire/AppHost orchestration and local builds from starting cleanly, primarily by fixing Aspire config wiring, improving Web build self-healing for Tailwind, and aligning some Aspire package/apphost versions.
Changes:
- Fixes Aspire CLI configuration to reference the correct AppHost
.csproj. - Adds an MSBuild target in
Web.csprojto restore npm packages automatically whennode_modulesis missing (fresh clone scenario). - Refactors MongoDB AppHost dev commands logging/await patterns and updates Aspire package/AppHost SDK versions.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Web/Web.csproj |
Adds an EnsureNpmPackages target to auto-restore npm deps before Tailwind build on non-CI machines. |
src/AppHost/MongoDbResourceBuilderExtensions.cs |
Refactors logging to source-generated delegates and adds .ConfigureAwait(false) plus invariant formatting. |
src/AppHost/aspire.config.json |
Fixes the AppHost project path used by Aspire CLI. |
src/AppHost/AppHost.csproj |
Bumps Aspire AppHost SDK patch version. |
README.md |
Updates fresh-machine npm install guidance (npm ci). |
Directory.Packages.props |
Updates Aspire package versions (partial). |
.squad/agents/sam/history.md |
Adds work-history entries related to Issue #350. |
.squad/agents/boromir/history.md |
Adds work-history entries related to Issue #350. |
.copilot/mcp-config.json |
Updates the GitHub MCP server package reference. |
| <!-- On a fresh machine, node_modules won't exist. Auto-run npm install before Tailwind builds. --> | ||
| <Target Name="EnsureNpmPackages" BeforeTargets="BuildTailwind" | ||
| Condition="'$(CI)' != 'true' AND !Exists('$(MSBuildProjectDirectory)/../../node_modules')"> | ||
| <Message Importance="high" Text="node_modules not found — running npm install..." /> | ||
| <Exec Command="npm install" WorkingDirectory="$(MSBuildProjectDirectory)/../.." /> | ||
| </Target> |
| <PackageVersion Include="Aspire.Hosting.Redis" Version="13.3.3" /> | ||
| <PackageVersion Include="Aspire.Hosting.MongoDB" Version="13.3.5" /> | ||
| <PackageVersion Include="Aspire.Hosting.Redis" Version="13.3.5" /> | ||
| <PackageVersion Include="Aspire.Hosting.Testing" Version="13.3.3" /> |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #351 +/- ##
==========================================
- Coverage 80.14% 79.86% -0.28%
==========================================
Files 68 68
Lines 1682 1659 -23
Branches 201 201
==========================================
- Hits 1348 1325 -23
Misses 244 244
Partials 90 90
🚀 New features to boost your workflow:
|
Summary
Fixes Aspire startup failures when cloning on a fresh machine.
Changes
src/AppHost/aspire.config.json— corrected.csprojreference fromMyBlog.AppHost.csproj->AppHost.csprojsrc/AppHost/MongoDbResourceBuilderExtensions.cs— refactored MongoDB resource builderDirectory.Packages.propssrc/AppHost/AppHost.csprojandsrc/Web/Web.csprojValidation
Closes #350