dahall / TaskScheduler

Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization.
MIT License
1.2k stars 191 forks source link

get something wrong in method NewTaskFromFile(filePath) #991

Closed JokkerLiu closed 2 months ago

JokkerLiu commented 2 months ago

Describe the bug when i want to create a TaskDefinition instance by using TaskDefinition td = ts.NewTaskFromFile(filePath);, it returns an error which error message is "System.Runtime.InteropServices.COMException:“(1,43)::ERROR: unable to switch the encoding”"

Environment (please complete the following information):

Additional context the xml file content is in UTF-8 encoding the xml filename has Chinese path

JokkerLiu commented 2 months ago

resolved by following the example : XML example