-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App looks for appsettings.json in CWD instead of in location where exe is located #495
Comments
That's pretty common if you haven't specified your working directory correctly. How are you starting the app? |
by having the program directory in the system path and executing RdtClient.Web.exe from a terminal window |
I have never seen this behaviour yet, what .NET runtime are you using? And where is rdt-client extracted to? And what command are you using to start the app? |
Just the normal one that you would get from Microsoft, if you need any more verbosity on that point you will have to let me know how to give it .\rdtclient.web.exe |
And just to be sure, the appsettings.json file is in the same folder right? |
Yep, executing .\rdtclient.web.exe in the folder where the exe resides alongside its other files works fine, but just executing rdtclient.web.exe outside of the folder attempts to look for the json in the cwd instead of the directory the executable is in, saying Unhandled exception. System.IO.FileNotFoundException: The configuration file 'appsettings.json' was not found and is not optional. The expected physical path was 'G:\Users\User\Downloads\appsettings.json'. |
What version are you using?
2.0.77.0
What OS are you running? (Btw, Typo here, Wat instead of What)
Windows 11
Are you using Docker or as a service?
No, manually launched through terminal
Which debrid provider are you using?
N/A
Which downloader are you using?
N/A
Please attach a log file here with the log setting set to debug
Unhandled exception. System.IO.FileNotFoundException: The configuration file 'appsettings.json' was not found and is not optional. The expected physical path was 'C:\Users\User\appsettings.json'. at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload) at Microsoft.Extensions.Configuration.ConfigurationManager.AddSource(IConfigurationSource source) at Microsoft.Extensions.Configuration.ConfigurationManager.Microsoft.Extensions.Configuration.IConfigurationBuilder.Add(IConfigurationSource source) at Microsoft.Extensions.Configuration.JsonConfigurationExtensions.AddJsonFile(IConfigurationBuilder builder, String path, Boolean optional, Boolean reloadOnChange) at Program.<Main>$(String[] args) in C:\Projects\rdt-client\server\RdtClient.Web\Program.cs:line 20
The text was updated successfully, but these errors were encountered: