Aspire.ProjectTemplates 9.5.0

Prefix Reserved
dotnet new install Aspire.ProjectTemplates::9.5.0
                    
This package contains a .NET Template Package you can call from the shell/command line.

Aspire Templates

Templates are located at [repo_root]/src/Aspire.ProjectTemplates/. The Aspire.ProjectTemplates.csproj file builds the template package. The template content is in the templates sub-directory, with each sub-directory beneath that representing a separate project template.

Update instructions

Instructions to update the project templates for a new Aspire version.

Example versions used here are moving from Aspire 9.4 to 9.5. This means:

  • Old previous version = 9.3
  • New previous version = 9.4
  • Old current version = 9.4
  • New current version = 9.5

Updating template content

Each template has a content folder for the previous version and the current version (major.minor only). The content of the previous version is static (i.e. not updated by the build) and will never be updated again after this process. The content of the current version has placeholders for many of the versions represented that get replaced by the build. Note that some dependency versions are still static.

For each template:

  1. Delete content folder named for old previous version, e.g. ./9.3

  2. Copy content folder named for old current version to a new folder named for new current version, e.g. ./9.4./9.5

  3. Edit ./.template.config/template.json and replace instances of old latest version with new latest version, e.g. 9.49.5

  4. Edit ./.template.config/template.json and replace instances of old previous version with new previous version, e.g. 9.39.4

  5. If supported TFMs changed between old previous version and new previous version, or old current version and new current version, update AspireVersionNetX options appropriately. Note that the AspireVersion option maps to the net8.0 TFM.

  6. In all .csproj files in the content folder named for the new previous version, e.g. ./9.4/**/.csproj*:

    1. Update all versions for Aspire-produced packages (and SDKs) referenced to the new previous package version (major.minor.patch for latest patch), replacing the replacement token value with a static version value, e.g. !!REPLACE_WITH_LATEST_VERSION!!9.4.2

    2. Update all versions for non-Aspire packages to the version referenced by current released version of the template, replacing the replacement token value with the relevant static version value, e.g. !!REPLACE_WITH_ASPNETCORE_10_VERSION!!10.0.0-preview.7.25380.108. Some non-Aspire packages referenced don't use a replacement token and instead just use a static value. In these cases simply leave the value as is.

      Note: There's a few ways to determine the static version value:

      • Look at the contents of the latest released version of the templates package at https://nuget.info/packages/Aspire.ProjectTemplates and find the version from the relvant .csproj file in the template package content
      • Checkout the relevant release/X.X branch for the latest public release, e.g. release/9.4, and in the ./src/Aspire.ProjectTemplates/ directory, run the dotnet CLI command to extract the appropriate version from the build system, e.g. dotnet msbuild -getProperty:MicrosoftAspNetCorePackageVersionForNet9. The property name to pass for a given replacement token can be determined by looking in the ./src/Aspire.ProjectTemplates/Aspire.ProjectTemplates.csproj file, at the <WriteLinesToFile ...> task, which should look something like the following:
        <WriteLinesToFile File="%(TemplateProjectFiles.DestinationFile)"
                           Lines="$([System.IO.File]::ReadAllText('%(TemplateProjectFiles.FullPath)')
                                    .Replace('!!REPLACE_WITH_LATEST_VERSION!!', '$(PackageVersion)')
                                    .Replace('!!REPLACE_WITH_ASPNETCORE_9_VERSION!!', '$(MicrosoftAspNetCorePackageVersionForNet9)')
                                    .Replace('!!REPLACE_WITH_ASPNETCORE_10_VERSION!!', '$(MicrosoftAspNetCorePackageVersionForNet10)')
                                    .Replace('!!REPLACE_WITH_DOTNET_EXTENSIONS_VERSION!!', '$(MicrosoftExtensionsHttpResilienceVersion)')
                                    .Replace('!!REPLACE_WITH_OTEL_NET8_VERSION!!', '$(OpenTelemetryNet8Version)')
                                    .Replace('!!REPLACE_WITH_OTEL_EXPORTER_VERSION!!', '$(OpenTelemetryExporterOpenTelemetryProtocolVersion)')
                                    .Replace('!!REPLACE_WITH_OTEL_HOSTING_VERSION!!', '$(OpenTelemetryInstrumentationExtensionsHostingVersion)')
                                    .Replace('!!REPLACE_WITH_OTEL_ASPNETCORE_VERSION!!', '$(OpenTelemetryInstrumentationAspNetCoreVersion)')
                                    .Replace('!!REPLACE_WITH_OTEL_HTTP_VERSION!!', '$(OpenTelemetryInstrumentationHttpVersion)')
                                    .Replace('!!REPLACE_WITH_OTEL_RUNTIME_VERSION!!', '$(OpenTelemetryInstrumentationRuntimeVersion)') )"
                           Overwrite="true" />
        
  7. Updating the versions for non-Aspire packages referenced in all .csproj files in the content folder named for the new latest version, e.g. ./9.5/**/.csproj*, isn't covered as part of this process. These package versions should be updated by our regular process for updating the versions of our dependencies.

For the aspire-empty template:

  1. Edit ./aspire-empty/.template.config/template.json and ensure the tags contains correct values to encode valid TFMs for template's supported Aspire version, e.g.:
    "tags": {
      "language": "C#",
      "type": "solution",
      "editorTreatAs": "solution",
      "aspire-9.4-tfms": "net8.0;net9.0;net10.0",
      "aspire-9.5-tfms": "net8.0;net9.0;net10.0"
    },
    

Updating localization files

Build the templates package project to ensure localization files are updated to match all changes by running dotnet pack on the ./src/Aspire.ProjectTemplates/Aspire.ProjectTemplates.csproj project, e.g.:

dotnet pack ./src/Aspire.ProjectTemplates/Aspire.ProjectTemplates.csproj

Updating tests

In the [repo_root]/tests/Aspire.Templates.Tests/NewUpAndBuildSupportProjectTemplatesTests.cs file:

  1. Replace instances of old latest version with new latest version, e.g. 9.49.5
  2. Replace instances of old previous version with new previous version, e.g. 9.39.4

Running templates tests is a bit involved and requires building packages for the entire repo and installing different versions of the .NET SDK required to verify template behavior. You can follow the directions in [repo_root]/tests/Aspire.Templates.Tests/README.md to do this locally if desired, or simply send a PR and observe the test output there.

  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.5.0 3,233 9/25/2025
9.4.2 10,029 9/2/2025
9.4.1 9,100 8/12/2025
9.4.0 5,120 7/29/2025
9.3.1 16,085 6/10/2025
9.3.0 9,375 5/19/2025
9.2.1 8,914 4/24/2025 9.2.1 is deprecated because it is no longer maintained.
9.2.0 6,509 4/10/2025 9.2.0 is deprecated because it is no longer maintained.
9.1.0 16,660 2/25/2025 9.1.0 is deprecated because it is no longer maintained.
9.0.0 22,231 11/12/2024 9.0.0 is deprecated because it is no longer maintained.
9.0.0-rc.1.24511.1 1,583 10/15/2024 9.0.0-rc.1.24511.1 is deprecated because it is no longer maintained.
9.0.0-preview.3.24210.17 3,064 4/11/2024 9.0.0-preview.3.24210.17 is deprecated because it is no longer maintained.
9.0.0-preview.2.24162.2 1,152 3/12/2024 9.0.0-preview.2.24162.2 is deprecated because it is no longer maintained.
9.0.0-preview.1.24113.3 1,342 2/13/2024 9.0.0-preview.1.24113.3 is deprecated because it is no longer maintained.
8.2.2 1,304,832 10/24/2024 8.2.2 is deprecated because it is no longer maintained.
8.2.1 126,375 9/26/2024 8.2.1 is deprecated because it is no longer maintained.
8.2.0 114,971 8/29/2024 8.2.0 is deprecated because it is no longer maintained.
8.1.0 117,593 7/23/2024 8.1.0 is deprecated because it is no longer maintained.
8.0.2 49,806 6/28/2024 8.0.2 is deprecated because it is no longer maintained.
8.0.1 74,556 5/21/2024 8.0.1 is deprecated because it is no longer maintained.
8.0.0 1,240 5/21/2024 8.0.0 is deprecated because it is no longer maintained.
8.0.0-preview.7.24251.11 18,632 5/7/2024 8.0.0-preview.7.24251.11 is deprecated because it is no longer maintained.
8.0.0-preview.6.24214.1 11,742 4/23/2024 8.0.0-preview.6.24214.1 is deprecated because it is no longer maintained.
8.0.0-preview.5.24201.12 13,531 4/9/2024 8.0.0-preview.5.24201.12 is deprecated because it is no longer maintained.
8.0.0-preview.4.24156.9 16,702 3/12/2024 8.0.0-preview.4.24156.9 is deprecated because it is no longer maintained.
8.0.0-preview.3.24105.21 15,402 2/13/2024 8.0.0-preview.3.24105.21 is deprecated because it is no longer maintained.
8.0.0-preview.2.23619.3 14,132 12/20/2023 8.0.0-preview.2.23619.3 is deprecated because it is no longer maintained.
8.0.0-preview.1.23557.2 60,086 11/14/2023 8.0.0-preview.1.23557.2 is deprecated because it is no longer maintained.