Skip to content

Commit

Permalink
Use .NET 9 static assets middleware if applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
vnbaaij committed Oct 3, 2024
1 parent 04cb239 commit 99a074f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/Demo/Server/FluentUI.Demo.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0; net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
Expand Down
4 changes: 4 additions & 0 deletions examples/Demo/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@

app.UseHttpsRedirection();

#if NET8_0
app.UseStaticFiles();
#else
app.MapStaticAssets();
#endif

app.UseRouting();

Expand Down
2 changes: 1 addition & 1 deletion examples/Demo/Shared/FluentUI.Demo.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net8.0; net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
Expand Down

0 comments on commit 99a074f

Please sign in to comment.