Skip to content

Commit babfe5c

Browse files
committed
Test fix dependency injection installer issue 3
1 parent 3ad62ab commit babfe5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Flow.Launcher/App.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using Flow.Launcher.ViewModel;
2323
using Microsoft.Extensions.DependencyInjection;
2424
using Microsoft.Extensions.Hosting;
25+
using Microsoft.Extensions.Logging;
2526
using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
2627

2728
namespace Flow.Launcher
@@ -74,6 +75,12 @@ public App()
7475
WriteToLogFile($"AppContext.BaseDirectory: {AppContext.BaseDirectory}");
7576
_host = Host.CreateDefaultBuilder()
7677
.UseContentRoot(AppContext.BaseDirectory)
78+
.ConfigureLogging(logging =>
79+
{
80+
// Clear default logging providers
81+
// Fix issue EventLog access is not supported on this platform.
82+
logging.ClearProviders();
83+
})
7784
.ConfigureServices(services => services
7885
.AddSingleton(_ => _settings)
7986
.AddSingleton(sp => new Updater(sp.GetRequiredService<IPublicAPI>(), Launcher.Properties.Settings.Default.GithubRepo))

0 commit comments

Comments
 (0)