diff --git a/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx index 595402b0b..440f681f9 100644 --- a/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx +++ b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx @@ -72,6 +72,52 @@ Please remove the **aspire workload** with the following command: dotnet workload uninstall aspire ``` +## Upgrade test projects + +If your solution includes an Aspire test project (one that references [📦 Aspire.Hosting.Testing](https://www.nuget.org/packages/Aspire.Hosting.Testing)), you'll need to update it alongside your AppHost. + + + +1. **Update the `Aspire.Hosting.Testing` package** to match the version of your updated AppHost: + + ```bash title="Update the testing package" + dotnet add .csproj package Aspire.Hosting.Testing + ``` + + + +2. **Verify the project reference to the AppHost** exists in your test project: + + ```xml title="YourApp.Tests.csproj" + + + + ``` + + This reference is required for the `Projects` namespace to be generated, which is how `DistributedApplicationTestingBuilder.CreateAsync()` resolves your AppHost. + +3. **Run your tests** to verify everything still works: + + ```bash title="Run tests" + dotnet test + ``` + + + + + + +For more information, see [Testing overview](/testing/overview/). + + ## Verify the upgrade After upgrading, run your application to ensure everything works as expected: @@ -80,6 +126,12 @@ After upgrading, run your application to ensure everything works as expected: aspire run ``` +If your solution includes test projects, also run your tests to confirm they pass: + +```bash title="Run tests" +dotnet test +``` + ## Need help? - 🆘 Stuck? [Join the Discord community](https://discord.com/invite/raNPcaaSj8) for real-time support