diff --git a/Source/PeterKottas.DotNetCore.WindowsService/ServiceRunner.cs b/Source/PeterKottas.DotNetCore.WindowsService/ServiceRunner.cs index f890533..5f5c885 100644 --- a/Source/PeterKottas.DotNetCore.WindowsService/ServiceRunner.cs +++ b/Source/PeterKottas.DotNetCore.WindowsService/ServiceRunner.cs @@ -17,6 +17,8 @@ public static class ServiceRunner where SERVICE : IMicroService { public static int Run(Action> runAction) { + Directory.SetCurrentDirectory(PlatformServices.Default.Application.ApplicationBasePath); + var innerConfig = new HostConfiguration(); innerConfig.Action = ActionEnum.RunInteractive; innerConfig.Name = typeof(SERVICE).FullName;