My guess is that neither one of these are bugs, they expose limitations of the library.
ITaskFolder.RegisterTaskDefinition
is a picky method in the native library. This wrapper does all it can to provide preventative measures and better errors where possible. The first thing I'd look into is the rights of the user running the library. The exception itself is a better indicator of the problem than the stack.RegisterChanges
has some prerequisites as well. If the task was previously registered with TaskLogonType.InteractiveTokenOrPassword
or TaskLogonType.Password
, you cannot use the method as you would need to resupply the password.