diff --git a/src/Core/Grand.Infrastructure/Configuration/AdvancedConfig.cs b/src/Core/Grand.Infrastructure/Configuration/AdvancedConfig.cs deleted file mode 100644 index f56e840c9..000000000 --- a/src/Core/Grand.Infrastructure/Configuration/AdvancedConfig.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Grand.Infrastructure.Configuration -{ - public class AdvancedConfig - { - public string InstalledPlugins { get; set; } - } -} diff --git a/src/Core/Grand.Infrastructure/Configuration/ExtensionsConfig.cs b/src/Core/Grand.Infrastructure/Configuration/ExtensionsConfig.cs index 2d4bb7536..f93703a4c 100644 --- a/src/Core/Grand.Infrastructure/Configuration/ExtensionsConfig.cs +++ b/src/Core/Grand.Infrastructure/Configuration/ExtensionsConfig.cs @@ -25,5 +25,9 @@ public class ExtensionsConfig /// public bool UseRoslynScripts { get; set; } + /// + ///List of installed plugins (comma separated) + /// + public string InstalledPlugins { get; set; } } } diff --git a/src/Core/Grand.Infrastructure/Plugins/PluginManager.cs b/src/Core/Grand.Infrastructure/Plugins/PluginManager.cs index 366ab5f7e..8a975cd0e 100644 --- a/src/Core/Grand.Infrastructure/Plugins/PluginManager.cs +++ b/src/Core/Grand.Infrastructure/Plugins/PluginManager.cs @@ -48,10 +48,7 @@ public static void Load(IMvcCoreBuilder mvcCoreBuilder, IConfiguration configura { _config = new ExtensionsConfig(); configuration.GetSection("Extensions").Bind(_config); - - var advConfig = new AdvancedConfig(); - configuration.GetSection("Advanced").Bind(advConfig); - + lock (_synLock) { if (mvcCoreBuilder == null) @@ -64,7 +61,7 @@ public static void Load(IMvcCoreBuilder mvcCoreBuilder, IConfiguration configura try { var installedPluginSystemNames = - !string.IsNullOrEmpty(advConfig.InstalledPlugins) ? advConfig.InstalledPlugins.Split(",").Select(x=>x.Trim()) : + !string.IsNullOrEmpty(_config.InstalledPlugins) ? _config.InstalledPlugins.Split(",").Select(x=>x.Trim()) : PluginExtensions.ParseInstalledPluginsFile(CommonPath.InstalledPluginsFilePath); Log.Information("Creating shadow copy folder and querying for dlls"); diff --git a/src/Web/Grand.Web/App_Data/appsettings.json b/src/Web/Grand.Web/App_Data/appsettings.json index abd8d6ba8..754d8d1f9 100644 --- a/src/Web/Grand.Web/App_Data/appsettings.json +++ b/src/Web/Grand.Web/App_Data/appsettings.json @@ -108,7 +108,10 @@ "ClearPluginShadowDirectoryOnStartup": true, //For develop you should enable if you want to copy plugin dll files to directory /Plugins/bin on application startup - "PluginShadowCopy": true + "PluginShadowCopy": true, + + //separator comma + "InstalledPlugins": "" }, "Performance": { @@ -244,11 +247,7 @@ }, "UseSwagger": false, //Settings only for advanced users - "Advanced": { - //separator comma - "InstalledPlugins": "" - }, - + "Serilog": { "Using": [ "Serilog.Sinks.File" ] //,