From 99a074f71d48c8685a388a78398adf80b49340e8 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Thu, 3 Oct 2024 23:40:50 +0200 Subject: [PATCH] Use .NET 9 static assets middleware if applicable --- examples/Demo/Server/FluentUI.Demo.Server.csproj | 2 +- examples/Demo/Server/Program.cs | 4 ++++ examples/Demo/Shared/FluentUI.Demo.Shared.csproj | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/Demo/Server/FluentUI.Demo.Server.csproj b/examples/Demo/Server/FluentUI.Demo.Server.csproj index fc620976b9..c7ec13c313 100644 --- a/examples/Demo/Server/FluentUI.Demo.Server.csproj +++ b/examples/Demo/Server/FluentUI.Demo.Server.csproj @@ -1,7 +1,7 @@ - net8.0; net9.0 + net8.0;net9.0 enable enable latest diff --git a/examples/Demo/Server/Program.cs b/examples/Demo/Server/Program.cs index 6832796564..16b511b39c 100644 --- a/examples/Demo/Server/Program.cs +++ b/examples/Demo/Server/Program.cs @@ -30,7 +30,11 @@ app.UseHttpsRedirection(); +#if NET8_0 app.UseStaticFiles(); +#else +app.MapStaticAssets(); +#endif app.UseRouting(); diff --git a/examples/Demo/Shared/FluentUI.Demo.Shared.csproj b/examples/Demo/Shared/FluentUI.Demo.Shared.csproj index 256eca3593..2536c6b629 100644 --- a/examples/Demo/Shared/FluentUI.Demo.Shared.csproj +++ b/examples/Demo/Shared/FluentUI.Demo.Shared.csproj @@ -1,6 +1,6 @@ - net8.0; net9.0 + net8.0;net9.0 enable enable latest