Skip to content

Commit cb1a3e1

Browse files
committed
updated to Aspire 9.2
1 parent c0dbcfe commit cb1a3e1

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

hostedss/AspireApp1.AppHost/AspireApp1.AppHost.csproj

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<Sdk Name="Aspire.AppHost.Sdk" Version="9.1.0" />
3+
<Sdk Name="Aspire.AppHost.Sdk" Version="9.2.0" />
44

55
<PropertyGroup>
66
<OutputType>Exe</OutputType>
77
<TargetFramework>net9.0</TargetFramework>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>enable</Nullable>
10-
<IsAspireHost>true</IsAspireHost>
1110
<UserSecretsId>0d58b20c-2afc-4388-a733-4c2057e0a27b</UserSecretsId>
1211
</PropertyGroup>
1312

1413
<ItemGroup>
15-
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.1.0" />
16-
<PackageReference Include="Aspire.Hosting.SqlServer" Version="9.1.0" />
14+
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.2.0" />
15+
<PackageReference Include="Aspire.Hosting.SqlServer" Version="9.2.0" />
1716
</ItemGroup>
1817

1918
<ItemGroup>

hostedss/AspireApp1.AppHost/Program.cs

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22

33
var sqlPassword = builder.AddParameter("sqlsrv-password");
44

5-
var sqlSrv = builder.AddSqlServer("sqlsrv", sqlPassword, port:1435).
6-
WithLifetime(ContainerLifetime.Persistent);
5+
var sqlSrv = builder.AddSqlServer("sqlsrv", sqlPassword, port:1435)
6+
.WithLifetime(ContainerLifetime.Persistent);
77

88
//var db = sqlSrv.AddDatabase("db");
99
var db = sqlSrv.AddDatabase("db", databaseName: "tempdb");
1010

1111
builder.AddProject<Projects.WebApplication1>("webapi")
12+
.WithUrlForEndpoint("http", url =>
13+
{
14+
url.DisplayText = "Forecast API (HTTP)";
15+
url.Url += "/weatherforecast";
16+
})
17+
.WithUrlForEndpoint("https", url =>
18+
{
19+
url.DisplayText = "Forecast API (HTTPS)";
20+
url.Url += "/weatherforecast";
21+
})
1222
.WithReference(db)
1323
.WaitFor(db);
1424

hostedss/WebApplication1/WebApplication1.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Aspire.Microsoft.Data.SqlClient" Version="9.1.0" />
10+
<PackageReference Include="Aspire.Microsoft.Data.SqlClient" Version="9.2.0" />
1111
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.1" />
1212
</ItemGroup>
1313

0 commit comments

Comments
 (0)