This issue could be due to different reasons. My experience is more of related to configuration. Surprisingly everything was working with .net core 2.1 but was not working with .net core 2.2.
I just want to make it short by not telling stories. For detail stories reach to…
Find complete script at https://github.com/premchandrasingh/kuduscript