Closed cufeo closed 3 years ago
Solved by adding:
public static void Main()
{
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Directory.SetCurrentDirectory(path);
...
}
hey @cufeo
Glad you got it figured out. I"m assuming the issue was with the Google Cloud JSON credentials file? Instead of setting the current directory, you can set the full path to the JSON as the environment variable (instead of just the name). More info about how the authentication works in the official Google Cloud .NET repo here: https://github.com/googleapis/google-cloud-dotnet#authentication
Hey! Thank you for your awesome library! I have this issue when using Serilog with Topshelf, the console application works as expected but when trying to start it as a service. It gives this error:
To Reproduce
Environment
Dummy Console App
Build and run the service
.bat
file add: