diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.Designer.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.Designer.cs index 9d30ea018c..4fe8e51000 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.Designer.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.Designer.cs @@ -27,20 +27,100 @@ using Volo.Abp.AspNetCore.RazorViews; #line hidden #nullable disable WriteLiteral(@" - - - - Error - The Libs folder is missing! - - -

⚠️ The Libs folder under the wwwroot/libs directory is empty!

- + + + + + + Error - The Libs Folder is Missing! + + + +
+

⚠️ The Libs folder is missing!

+
+

The Libs folder contains mandatory NPM Packages for running the project.

- -

Make sure you run the abp install-libs CLI tool command.

- -

For more information, check out the ABP CLI documentation

- +

Make sure you run the abp install-lib"); + WriteLiteral(@"s CLI tool command.

+

+ If your application does not use any client-side libraries, you can disable this check by setting + AbpMvcLibsOptions.CheckLibs to false, as shown below: +

+
+Configure<AbpMvcLibsOptions>(options =>
+{
+    options.CheckLibs = false;
+});
+

For more information, check out the ABP CLI documentation.

+
+ + "); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.cshtml index 5a5d6c8d19..7b15ce94bf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.cshtml @@ -5,18 +5,96 @@ Response.StatusCode = 500; } - - - - Error - The Libs folder is missing! - - -

⚠️ The Libs folder under the wwwroot/libs directory is empty!

- + + + + + + Error - The Libs Folder is Missing! + + + +
+

⚠️ The Libs folder is missing!

+
+

The Libs folder contains mandatory NPM Packages for running the project.

- -

Make sure you run the abp install-libs CLI tool command.

- -

For more information, check out the ABP CLI documentation

- +

Make sure you run the abp install-libs CLI tool command.

+

+ If your application does not use any client-side libraries, you can disable this check by setting + AbpMvcLibsOptions.CheckLibs to false, as shown below: +

+
+Configure<AbpMvcLibsOptions>(options =>
+{
+    options.CheckLibs = false;
+});
+

For more information, check out the ABP CLI documentation.

+
+ + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs index 410260674b..dc6faf723c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs @@ -64,7 +64,7 @@ public class AbpMvcLibsService : IAbpMvcLibsService, ITransientDependency var webHostEnvironment = httpContext.RequestServices.GetRequiredService(); if (webHostEnvironment.WebRootPath.IsNullOrWhiteSpace()) { - logger.LogWarning("The 'WebRootPath' is not set! The 'CheckLibs' feature is disabled!"); + logger.LogInformation("The 'WebRootPath' is not set, The 'CheckLibs' feature not needed."); return Task.FromResult(true); } @@ -72,7 +72,8 @@ public class AbpMvcLibsService : IAbpMvcLibsService, ITransientDependency var libsFolder = fileProvider.GetDirectoryContents("/libs"); if (!libsFolder.Exists || !libsFolder.Any()) { - logger.LogError("The 'wwwroot/libs' folder does not exist or empty!"); + logger.LogError("The 'wwwroot/libs' folder does not exist or empty! " + + "If your application does not use any client-side libraries, you can disable this check by setting 'AbpMvcLibsOptions.CheckLibs' to 'false'"); return Task.FromResult(false); } }