From eca1cd493677166025665f12b6be052ea12802a9 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 1 Jan 2025 13:49:14 +0800 Subject: [PATCH] Update AbpApplicationBuilderExtensions.cs --- .../AspNetCore/Builder/AbpApplicationBuilderExtensions.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs index cfd7eb515b..57be65b0da 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs @@ -180,9 +180,11 @@ public static class AbpApplicationBuilderExtensions var environment = endpoints.ServiceProvider.GetRequiredService(); if (environment.IsDevelopment()) { - app.UseStaticFiles(); - // Volo.Abp.AspNetCore.staticwebassets.endpoints.json is a empty file. + // MapStaticAssets in development mode will have a performance issue if there are many static files. // https://github.com/dotnet/aspnetcore/issues/59673 + app.UseStaticFiles(); + + // Volo.Abp.AspNetCore.staticwebassets.endpoints.json is a empty file. Just compatible with the return type of MapAbpStaticAssets. var tempStaticAssetsManifestPath = Path.Combine(AppContext.BaseDirectory, "Volo.Abp.AspNetCore.staticwebassets.endpoints.json"); if (!File.Exists(tempStaticAssetsManifestPath)) {