I have an HttpTrigger AzureFunction to run a command line tool (.exe) and return the output to a caller.
It appears to be working as expected; however when running in visual studio / debugging; if I pause too long or after the first call to the function it closes down the AzureFunction and the last messages in the Debug window are “Azure Functions .NET Worker (PID: #####) initialized in debug mode. Waiting for a debugger to attached” and then “dotnet.exe (process #####) exited with code -1”
I’ve done a bit of testing and it appears that the action that occurs before the exit is any sort of file IO (i.e. if I take the input from the API and write it as a file for the .exe to reference; or if I delete the output files after processing them)
I’m hoping there is something I’m missing there; i.e. something that on execution of a write to disk that I can do to keep the AzureFunction from closing down.