I don't know how you run your app, but as from you have written I assume that you do some kind of batching or run using Processinfo.
I think that you are not setting the working directory. Try to set working directory and then your exe should see the appsettings file.
.Net Core 3.1 run published EXE file run with error on run from other directory
Hi all,
I build a .net cor e3..1 console app with Oracle managed data access for Core.
The app run fine in debug and also in release, but only from the contained directory.
The app should run by Control-M with 'wakes up' from his dir on the server like 'C:\Program Files\cmt'
The CTM has all the premissions he needs.
The problem is that when I run from the contained dir the app works perfect. when I call it from another dir with it full path, it faild with OracleConnection.ConnectionString is invalid.
the Conn String is in appsettings.json file which readen fine by the console app (this is how it looks)
I cant find any solution in the whole web
1 answer
Sort by: Most helpful
-
Adam Jachocki 46 Reputation points
2021-09-09T10:00:47.24+00:00