public void Configure(IWebHostBuilder builder)
        {
            builder
            .ConfigureServices(services =>
            {
                _hostingEnvironment = services.BuildServiceProvider().GetRequiredService <IHostingEnvironment>();

                _mvcBuilder = services.AddMvc();

                AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

                SetPluginDirectory();
                RegisterPlugins();

                _pluginChangingWatcher = new PluginChangingWatcher(_pluginFolder.FullName);
                _pluginChangingWatcher.PluginsChanged += Watcher_PluginsChanged;
                _pluginChangingWatcher.Start();
            });
        }
        public void Configure(IWebHostBuilder builder)
        {
            builder
            .ConfigureAppConfiguration((webHostBuilderContext, configurationBuilder) =>
            {
                _hostingEnvironment = webHostBuilderContext.HostingEnvironment;
            })
            .ConfigureServices(services =>
            {
                _mvcBuilder = services.AddMvc();

                AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

                SetPluginDirectory();
                RegisterPlugins();

                _pluginChangingWatcher = new PluginChangingWatcher(_pluginFolder.FullName);
                _pluginChangingWatcher.PluginsChanged += Watcher_PluginsChanged;
                _pluginChangingWatcher.Start();
            });
        }