Published .Net Core 2 application does not read appsettings.json file
I have 2 apps, one console one web api both .net core v2.0 . Both has the same problem. I used to run my application thru source files. I was building and running them on a linux machine. Everything was good, everything was great, but now i'm running the same app thru publish output. Now it doesn't work as it suppose to, because the app can't read appsettings.json. configuration["Settings:Port"] != null ? int.Parse(configuration["Settings:Port"]) //i should be getting this - 1234 : default(int) //but instead i got this - 0 I have corrupted the appsettings.json file and i was expecting to see