Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.67 KB

using-latest-daily.md

File metadata and controls

70 lines (49 loc) · 2.67 KB

Set up your machine to use the latest Aspire builds

These instructions will get you set up with the latest build of Aspire. If you just want the last release of .NET Aspire, the packages are on nuget.org, and install Visual Studio 2022 version 17.10 or later for the tooling.

Prepare the machine

See machine-requirements.md.

(Optional) Create a local nuget.config file

Since dogfooding will require using nightly build feeds, you may not want to add feeds globally which could alter how other code on your machine builds. To avoid this happening, you can create a local nuget.config file by running the following command in the root of your repository:

dotnet new nugetconfig

Add necessary NuGet feeds

The latest builds are pushed to a special feed, which you need to add:

dotnet nuget add source --name dotnet8 https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json

If you use Package Source Mapping, you'll also need to add the following mappings to your NuGet.config

<packageSourceMapping>
  <packageSource key="dotnet8">
    <package pattern="Aspire.*" />
    <package pattern="Microsoft.Extensions.ServiceDiscovery*" />
  </packageSource>
</packageSourceMapping>

Install the nightly .NET Aspire templates

To be able to create aspire projects, you will need to install the latest Aspire templates. You can do this by running the following command:

dotnet new install Aspire.ProjectTemplates::9.0.0-preview.* --force

Note: The --force parameter is required if you also have the legacy .NET Aspire Workload installed. The new templates have the same name as the old ones, so this command would override those.

Create a new Project

Create an empty .NET Aspire project on the command line:

dotnet new aspire

Alternatively, to create a .NET Aspire project using the Starter template:

dotnet new aspire-starter

These will create a .sln file and at least two projects.

Assuming the NuGet feed you added above is visible -- for example you added it globally or it's in a NuGet.config in this folder - you can now build that .sln

dotnet restore
dotnet build

And then run it (make sure that Docker desktop is started):

dotnet run --project "<directoryname>.AppHost"

Alternatively, if you are using Visual Studio, you can instead create a new Blazor Web App project and check the Enlist in Aspire orchestration box while creating it. Then use F5 to debug or Ctrl+F5 to launch without debugging.