Skip to content
Open
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,6 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml

# Python Virtual Environments
.venv
43 changes: 23 additions & 20 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,36 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<MicrosoftExtensionsVersion>8.6.0</MicrosoftExtensionsVersion>
<AspireVersion>8.2.0</AspireVersion>
<AspireVersion>9.0.0-rc.1.24509.13</AspireVersion>
<MicrosoftExtensionsAiVersion>9.0.0-preview.9.24507.7</MicrosoftExtensionsAiVersion>
</PropertyGroup>
<ItemGroup>
<!-- Version together with Aspire -->
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Azure.Storage" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.PostgreSQL" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Qdrant" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Redis" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Testing" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.StackExchange.Redis" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.AppHost.SDK" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Azure.AppContainers" 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.Hosting.PostgreSQL" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Python" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Qdrant" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Redis" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Testing" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.StackExchange.Redis" Version="9.0.0-rc.1.24511.1" />
Comment on lines +10 to +21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These versions aren't in sync. It would be nice to keep using the common AspireVersion property.

Suggested change
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.AppHost.SDK" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Azure.AppContainers" 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.Hosting.PostgreSQL" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Python" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Qdrant" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Redis" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Hosting.Testing" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.StackExchange.Redis" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.AppHost.SDK" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="$(AspireVersion) />
<PackageVersion Include="Aspire.Hosting.Azure.AppContainers" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Azure.Storage" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.PostgreSQL" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Python" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Qdrant" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Redis" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Hosting.Testing" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.StackExchange.Redis" Version="$(AspireVersion)" />

<PackageVersion Include="Azure.AI.OpenAI" Version="2.1.0-beta.1" />
<PackageVersion Include="IdentityModel" Version="7.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.0-rc.2.24474.3" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="9.0.0-rc.2.24474.3" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="$(MicrosoftExtensionsAiVersion)" />
<PackageVersion Include="Microsoft.Extensions.AI.Ollama" Version="$(MicrosoftExtensionsAiVersion)" />
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="$(MicrosoftExtensionsAiVersion)" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="$(AspireVersion)" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.0-rc.2.24473.5" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="9.0.0-rc.1.24511.1" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="9.0.0-rc.1.24511.1" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="$(AspireVersion)" />

<!-- Version together with ASP.NET -->
<PackageVersion Include="Microsoft.AspNetCore.Components.QuickGrid" Version="8.0.7" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.8.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.QuickGrid" Version="9.0.0-rc.2.24474.3" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0-rc.2.24473.5" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="9.0.0-preview.9.24511.3" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter" Version="4.9.3" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
Expand All @@ -40,22 +42,23 @@
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.16.0" />
<!-- Open Telemetry -->
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.10.0-beta.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
<!---->
<PackageVersion Include="PdfPig" Version="0.1.9-alpha-20240702-65c64" />
<PackageVersion Include="SmartComponents.AspNetCore" Version="0.1.0-preview10148" />
<PackageVersion Include="SmartComponents.LocalEmbeddings" Version="0.1.0-preview10148" />
<PackageVersion Include="SmartComponents.LocalEmbeddings.SemanticKernel" Version="0.1.0-preview10148" />
<PackageVersion Include="StatefulReconnection" Version="0.1.0" />
<PackageVersion Include="Markdown2Pdf" Version="2.2.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.0-release-24352-06" />
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0-rc.2.24473.5" />
<PackageVersion Include="System.Text.Json" Version="9.0.0-rc.2.24473.5" />
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="Duende.IdentityServer" Version="7.0.6" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.2-dev-00341" />
<PackageVersion Include="System.Runtime.Caching" Version="8.0.1" />
</ItemGroup>
</Project>
6 changes: 5 additions & 1 deletion nuget.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for the Aspire 9.x prerelease packages?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. These will hit public nuget.org tomorrow.

</packageSources>

<packageSourceMapping>
Expand All @@ -12,5 +13,8 @@
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
<packageSource key="dotnet8">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
2 changes: 1 addition & 1 deletion seeddata/DataGenerator/DataGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>eShopSupport.DataGenerator</RootNamespace>
Expand Down
10 changes: 4 additions & 6 deletions src/AppHost/AppHost.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0-rc.1.24511.1" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0-rc.1.24511.1" />
<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0-rc.1.24509.13" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>dbe89ad9-90f1-44de-9646-7e98b2d8c69d</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
<PackageReference Include="Aspire.Hosting.Azure.Storage" />
<PackageReference Include="Aspire.Hosting.PostgreSQL" />
<PackageReference Include="Aspire.Hosting.Python" />
<PackageReference Include="Aspire.Hosting.Qdrant" />
<PackageReference Include="Aspire.Hosting.Redis" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Backend\Backend.csproj" />
<ProjectReference Include="..\CustomerWebUI\CustomerWebUI.csproj" />
<ProjectReference Include="..\IdentityServer\IdentityServer.csproj" />
<ProjectReference Include="..\StaffWebUI\StaffWebUI.csproj" />
</ItemGroup>

</Project>
</Project>
2 changes: 1 addition & 1 deletion src/AppHost/Ollama/OllamaResourceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static async Task DownloadModelAsync(ILogger logger, EndpointReference h

var httpClient = new HttpClient { Timeout = TimeSpan.FromDays(1) };
var request = new HttpRequestMessage(HttpMethod.Post, $"{httpEndpoint.Url}/api/pull") { Content = JsonContent.Create(new { name = modelName }) };
var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
var responseContentStream = await response.Content.ReadAsStreamAsync(cancellationToken);
var streamReader = new StreamReader(responseContentStream);
var line = (string?)null;
Expand Down
17 changes: 14 additions & 3 deletions src/AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,19 @@

var blobStorage = storage.AddBlobs("eshopsupport-blobs");

var pythonInference = builder.AddPythonUvicornApp("python-inference",
Path.Combine("..", "PythonInference"), port: 62394);
var stage = builder.ExecutionContext.IsRunMode ? "base" : /* default stage */ null;
var pythonInference = builder.AddDockerfile("python-inference", "../PythonInference", /* default dockerfile */ null, stage)
.WithHttpEndpoint(port: 57000, targetPort: 8000)
.WithContainerRuntimeArgs("--gpus=all")
.WithLifetime(ContainerLifetime.Persistent);
Copy link
Member

@SteveSandersonMS SteveSandersonMS Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this definitely work? It does cause the Docker container to keep running even after AppHost is shut down (albeit removing the port mapping, which is a bit inconvenient).

But then each time I start the AppHost project using Ctrl+F5, it kills the previous Docker container and starts a new one, which seems to defeat the purpose of the feature.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this definitely work? It does cause the Docker container to keep running even after AppHost is shut down (albeit removing the port mapping, which is a bit inconvenient).

If you want stable ports inside and outside of Aspire for this resource you can pass the desired port numbers and disable the proxying on the endpoint.

But then each time I start the AppHost project using Ctrl+F5, it kills the previous Docker container and starts a new one, which seems to defeat the purpose of the feature.

Definitely shouldn't be doing that and I wasn't seeing that locally. It will only do that if it detects changes to the container definition but I'm not sure of the exact variables it includes. @danegsta?

Copy link
Member

@danegsta danegsta Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default we consider the container image name (or image sha in the case of building via dockerfile), ports, volume mounts, environment, and the command/arguments used to launch the container.

The port mapping shouldn't be lost for a persistent container, but it generally won't show up in the Docker Desktop UI due to a seeming bug in how they report randomly assigned host ports (which we use). You have to inspect the container and look in the networking config section to see the real port, otherwise it just shows up as 0 in the other inspected port data and is missing from the UI.


if (builder.ExecutionContext.IsRunMode)
{
// Mount app files into the container & enable auto-reload when running in development
pythonInference
.WithBindMount("../PythonInference", "/app")
.WithArgs("--reload");
}

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

Expand All @@ -53,7 +64,7 @@
.WithReference(chatCompletion)
.WithReference(blobStorage)
.WithReference(vectorDb)
.WithReference(pythonInference)
.WithReference(pythonInference.GetEndpoint("http"))
.WithReference(redis)
.WithEnvironment("IdentityUrl", identityEndpoint)
.WithEnvironment("ImportInitialDataDir", Path.Combine(builder.AppHostDirectory, "..", "..", "seeddata", isE2ETest ? "test" : "dev"));
Expand Down
16 changes: 0 additions & 16 deletions src/AppHost/Python/PythonUvicornAppResourceBuilderExtensions.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Backend/Backend.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>eShopSupport.Backend</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion src/CustomerWebUI/CustomerWebUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
14 changes: 4 additions & 10 deletions src/DataIngestor/DataIngestor.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>eShopSupport.DataIngestor</RootNamespace>
<StartArguments>$(SolutionDir)\seeddata\DataGenerator\output</StartArguments>
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0020;SKEXP0050</NoWarn>
<IsAspireHost>true</IsAspireHost>
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0050</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Backend\Backend.csproj" IsAspireProjectResource="false" />
<ProjectReference Include="..\Evaluator\Evaluator.csproj" IsAspireProjectResource="false" />
<ProjectReference Include="..\Backend\Backend.csproj" />
<ProjectReference Include="..\Evaluator\Evaluator.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" />
<PackageReference Include="Microsoft.SemanticKernel.Core" />
<PackageReference Include="PdfPig" />
<PackageReference Include="SmartComponents.LocalEmbeddings" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Evaluator/Evaluator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>eShopSupport.Evaluator</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion src/IdentityServer/IdentityServer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
22 changes: 22 additions & 0 deletions src/PythonInference/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.12.5-slim AS base

# Set the working directory, the app files could be bind-mounted here
WORKDIR /app

# Copy the requirements file
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Ensure the server is accessible from outside the container
ENV UVICORN_HOST=0.0.0.0

# Set the entry point to run the application
ENTRYPOINT ["python", "-m", "uvicorn", "main:app"]

CMD []

FROM base AS publish

COPY . .
3 changes: 3 additions & 0 deletions src/PythonInference/PythonInference.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
<ItemGroup>
<Folder Include="routers\" />
</ItemGroup>
<ItemGroup>
<Content Include="Dockerfile" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
</Project>
3 changes: 2 additions & 1 deletion src/ServiceDefaults/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicati
})
.WithTracing(tracing =>
{
tracing.AddAspNetCoreInstrumentation()
tracing.AddSource(builder.Environment.ApplicationName)
.AddAspNetCoreInstrumentation()
// Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package)
//.AddGrpcClientInstrumentation()
.AddHttpClientInstrumentation()
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceDefaults/ServiceDefaults.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireSharedProject>true</IsAspireSharedProject>
Expand Down
2 changes: 1 addition & 1 deletion src/StaffWebUI/StaffWebUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>eShopSupport.StaffWebUI</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion test/E2ETest/E2ETest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
5 changes: 3 additions & 2 deletions test/E2ETest/Infrastructure/AppHostFixture.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Aspire.Hosting.Testing;
using Aspire.Hosting;
using Aspire.Hosting.Testing;
using eShopSupport.ServiceDefaults.Clients.Backend;
using IdentityModel.Client;

Expand All @@ -21,7 +22,7 @@ private async Task<DistributedApplication> InitializeAsync()
Environment.CurrentDirectory = Projects.AppHost.ProjectPath;
Environment.SetEnvironmentVariable("E2E_TEST", "true");
Environment.SetEnvironmentVariable("E2E_TEST_CHAT_COMPLETION_CACHE_DIR",
Path.Combine(Projects.E2ETest.ProjectPath, "ChatCompletionCache"));
Path.Combine(Projects.AppHost.ProjectPath, "ChatCompletionCache"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest, why change this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if you do change this, I think you'd need to regenerate the cache or at least move all its files to the new directory, since they are meant to be stored in source control.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I think I changed this as a test and forgot to change it back. For a moment at least the E2ETest project no longer showed up as a member of Projects.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SteveSandersonMS Actually, I take it back...this still is an issue. E2ETest is no longer in the Projects namespace nor is there any metadata created for it. I'm not sure how this code originally worked, before the update. Is there a better way to get the project path now?

var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.AppHost>();
var app = await builder.BuildAsync();
await app.StartAsync();
Expand Down