Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions eng/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ and are generated based on the last package release.
</PropertyGroup>

<ItemGroup Label=".NET team dependencies">
<LatestPackageReference Include="Microsoft.AspNetCore.OpenApi" />
<LatestPackageReference Include="Microsoft.Extensions.Http.Resilience"/>
<LatestPackageReference Include="Microsoft.Extensions.ServiceDiscovery"/>

<LatestPackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol"/>
<LatestPackageReference Include="OpenTelemetry.Extensions.Hosting"/>
<LatestPackageReference Include="OpenTelemetry.Instrumentation.AspNetCore"/>
<LatestPackageReference Include="OpenTelemetry.Instrumentation.Http"/>
<LatestPackageReference Include="OpenTelemetry.Instrumentation.Runtime"/>

<LatestPackageReference Include="Aspire.Hosting.AppHost" />
<LatestPackageReference Include="Aspire.Hosting.Redis" />
<LatestPackageReference Include="Aspire.Dashboard.Sdk.win-x64"/>
<LatestPackageReference Include="Aspire.Hosting.Orchestration.win-x64"/>
<LatestPackageReference Include="Aspire.StackExchange.Redis.OutputCaching"/>

<LatestPackageReference Include="Microsoft.AspNetCore.Razor.Language" />
<LatestPackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" />
<LatestPackageReference Include="Microsoft.Azure.SignalR" />
Expand Down
14 changes: 14 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,20 @@
<MicrosoftNETCoreAppRuntimeVersion>$(MicrosoftNETCoreAppRuntimewinx64Version)</MicrosoftNETCoreAppRuntimeVersion>
</PropertyGroup>
<PropertyGroup Label="Manual">

<OpenTelemetryExporterOpenTelemetryProtocolVersion>1.9.0</OpenTelemetryExporterOpenTelemetryProtocolVersion>
<OpenTelemetryExtensionsHostingVersion>1.9.0</OpenTelemetryExtensionsHostingVersion>
<OpenTelemetryInstrumentationAspNetCoreVersion>1.9.0</OpenTelemetryInstrumentationAspNetCoreVersion>
<OpenTelemetryInstrumentationHttpVersion>1.9.0</OpenTelemetryInstrumentationHttpVersion>
<OpenTelemetryInstrumentationRuntimeVersion>1.9.0</OpenTelemetryInstrumentationRuntimeVersion>
<MicrosoftExtensionsHttpResilienceVersion>9.0.0</MicrosoftExtensionsHttpResilienceVersion>
<MicrosoftExtensionsServiceDiscoveryVersion>9.0.0</MicrosoftExtensionsServiceDiscoveryVersion>
<AspireHostingOrchestrationwinx64Version>9.0.0</AspireHostingOrchestrationwinx64Version>
<AspireDashboardSdkwinx64Version>9.0.0</AspireDashboardSdkwinx64Version>
<AspireHostingRedisVersion>9.0.0</AspireHostingRedisVersion>
<AspireHostingAppHostVersion>9.0.0</AspireHostingAppHostVersion>
<AspireStackExchangeRedisOutputCachingVersion>9.1.0</AspireStackExchangeRedisOutputCachingVersion>

<!-- Dependencies from maintenance-packages -->
<MicrosoftBCLHashCodeVersion>6.0.0</MicrosoftBCLHashCodeVersion>
<MicrosoftIoRedistVersion>6.1.3</MicrosoftIoRedistVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DisableTransitiveFrameworkReferences>true</DisableTransitiveFrameworkReferences>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AspireApp1.ServiceDefaults\AspireApp1.ServiceDefaults.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.Http" />
<Reference Include="Microsoft.AspNetCore.Components.Server" />
<Reference Include="Microsoft.AspNetCore.HttpsPolicy" />
<Reference Include="Microsoft.AspNetCore.Mvc" />
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
<Reference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
<Reference Include="Aspire.StackExchange.Redis.OutputCaching" Version="9.0.0" />
<Reference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" />
</ItemGroup>

</Project>
48 changes: 48 additions & 0 deletions src/Components/Samples/Aspire/AspireApp1.ApiService/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

var builder = WebApplication.CreateBuilder(args);

// Add service defaults & Aspire client integrations.
builder.AddServiceDefaults();

// Add services to the container.
builder.Services.AddProblemDetails();

// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();

var app = builder.Build();

// Configure the HTTP request pipeline.
app.UseExceptionHandler();

if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}

string[] summaries = ["Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"];

app.MapGet("/weatherforecast", () =>
{
var forecast = Enumerable.Range(1, 5).Select(index =>
new WeatherForecast
(
DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
Random.Shared.Next(-20, 55),
summaries[Random.Shared.Next(summaries.Length)]
))
.ToArray();
return forecast;
})
.WithName("GetWeatherForecast");

app.MapDefaultEndpoints();

app.Run();

record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
{
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://localhost:5551",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:7496;http://localhost:5551",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>305cc722-e514-4d8f-878b-a656f87e31d7</UserSecretsId>
<SkipAddAspireDefaultReferences>true</SkipAddAspireDefaultReferences>
<DisableTransitiveFrameworkReferences>true</DisableTransitiveFrameworkReferences>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AspireApp1.ApiService\AspireApp1.ApiService.csproj" />
<ProjectReference Include="..\AspireApp1.Web\AspireApp1.Web.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.Http" />
<Reference Include="Microsoft.AspNetCore.Components.Server" />
<Reference Include="Microsoft.AspNetCore.HttpsPolicy" />
<Reference Include="Microsoft.AspNetCore.Mvc" />
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
<Reference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
<Reference Include="Aspire.Hosting.AppHost" Version="9.0.0" />
<Reference Include="Aspire.Hosting.Redis" Version="9.0.0" />

<PackageReference Include="Aspire.Dashboard.Sdk.win-x64" Version="9.0.0" IsImplicitlyDefined="true">
<AllowExplicitReference>true</AllowExplicitReference>
</PackageReference>
<PackageReference Include="Aspire.Hosting.Orchestration.win-x64" Version="9.0.0" IsImplicitlyDefined="true">
<AllowExplicitReference>true</AllowExplicitReference>
</PackageReference>

<!--
<Reference Include="Aspire.Dashboard.Sdk.win-x64" Version="9.0.0" IsImplicitlyDefined="true" />
<Reference Include="Aspire.Hosting.Orchestration.win-x64" Version="9.0.0" IsImplicitlyDefined="true" />
-->
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions src/Components/Samples/Aspire/AspireApp1.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

var builder = DistributedApplication.CreateBuilder(args);

var cache = builder.AddRedis("cache");

var apiService = builder.AddProject<Projects.AspireApp1_ApiService>("apiservice");

builder.AddProject<Projects.AspireApp1_Web>("webfrontend")
.WithExternalHttpEndpoints()
.WithReference(cache)
.WaitFor(cache)
.WithReference(apiService)
.WaitFor(apiService);

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17202;http://localhost:15121",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21047",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22054"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15121",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19030",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20180"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireSharedProject>true</IsAspireSharedProject>
<OutputType>Library</OutputType>
<!--
-->
<DisableTransitiveFrameworkReferences>true</DisableTransitiveFrameworkReferences>
</PropertyGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.Http" />
<Reference Include="Microsoft.AspNetCore.Components.Server" />
<Reference Include="Microsoft.AspNetCore.HttpsPolicy" />
<Reference Include="Microsoft.AspNetCore.Mvc" />
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
<Reference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />

<Reference Include="Microsoft.Extensions.Http.Resilience" Version="9.0.0" />
<Reference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.0.0" />
<Reference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<Reference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<Reference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<Reference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
<Reference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
</ItemGroup>

</Project>
Loading
Loading