Skip to content

Commit

Permalink
Update to .NET Aspire 9 RC1
Browse files Browse the repository at this point in the history
- Update to RC1 of .NET Aspire 9.
- Resolve TODOs for the Cosmos emulator.
  • Loading branch information
martincostello committed Oct 16, 2024
1 parent 75952c2 commit 6b04c2b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 21 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ jobs:
~/.cache/ms-playwright
~/Library/Caches/ms-playwright
- name: Install .NET Workloads
shell: pwsh
run: dotnet workload restore --skip-manifest-update

- name: Build, test and publish
id: build
shell: pwsh
Expand Down
14 changes: 7 additions & 7 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Aspire.Azure.Security.KeyVault" Version="8.2.1" />
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="8.2.1" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="8.2.1" />
<PackageVersion Include="Aspire.Hosting.Azure.CosmosDB" Version="8.2.1" />
<PackageVersion Include="Aspire.Hosting.Azure.KeyVault" Version="8.2.1" />
<PackageVersion Include="Aspire.Hosting.Azure.Storage" Version="8.2.1" />
<PackageVersion Include="Aspire.Microsoft.Azure.Cosmos" Version="8.2.1" />
<PackageVersion Include="Aspire.Azure.Security.KeyVault" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Azure.CosmosDB" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Azure.KeyVault" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Azure.Storage" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Microsoft.Azure.Cosmos" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="AspNet.Security.OAuth.Amazon" Version="9.0.0-rc.2.24515.38" />
<PackageVersion Include="AspNet.Security.OAuth.Apple" Version="9.0.0-rc.2.24515.38" />
<PackageVersion Include="AspNet.Security.OAuth.GitHub" Version="9.0.0-rc.2.24515.38" />
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ To build and test the website run the following commands from your terminal of c
```powershell
git clone https://github.com/martincostello/alexa-london-travel-site.git
cd alexa-london-travel-site
# Restore Aspire workload on first usage (requires elevation on Windows if not installed)
dotnet workload restore
# Build and test the application
./build.ps1
```

Expand Down
3 changes: 3 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"version": "9.0.100-rc.2.24474.11",
"allowPrerelease": false,
"rollForward": "latestMajor"
},
"msbuild-sdks": {
"Aspire.AppHost.Sdk": "9.0.0-rc.1.24511.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="Aspire.AppHost.Sdk" />
<PropertyGroup>
<IsAspireHost>true</IsAspireHost>
<OutputType>Exe</OutputType>
Expand Down
10 changes: 5 additions & 5 deletions src/LondonTravel.Site.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
var cosmos = builder.AddAzureCosmosDB(Cosmos)
.RunAsEmulator((container) =>
{
// TODO Update persistence configuration when https://github.com/dotnet/aspire/issues/3295 released
container.WithEnvironment("AZURE_COSMOS_EMULATOR_PARTITION_COUNT", "1")
.WithEnvironment("AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE", "true")
.WithVolume("londontravel-cosmosdb", "/tmp/cosmos/appdata");
container.WithDataVolume("londontravel-cosmosdb")
.WithPartitionCount(1);
})
.AddDatabase("LondonTravel");

Expand All @@ -29,7 +27,9 @@
builder.AddProject<Projects.LondonTravel_Site>("LondonTravelSite")
.WithReference(blobs)
.WithReference(cosmos)
.WithReference(secrets);
.WithReference(secrets)
.WaitFor(blobs)
.WaitFor(cosmos);

var app = builder.Build();

Expand Down

0 comments on commit 6b04c2b

Please sign in to comment.