My C# application is returning 0xE0434352 to Windows Task Scheduler but it is not crashing

后端 未结 11 1192
悲哀的现实
悲哀的现实 2020-11-27 15:13

I have written a few C# apps that I have running via windows task scheduler. They are running successfully (as I can see from the log files that they are writing ) but windo

11条回答
  •  鱼传尺愫
    2020-11-27 15:54

    I got the same error but I have fixed it by changing the file reading path from "ConfigFile.xml" to AppDomain.CurrentDomain.BaseDirectory.ToString() + "ConfigFile.xml"

    In my case, this error due to file path error because task manager starts program from "System32" as initial path but the folder we thought.

提交回复
热议问题