Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

Created Unassigned: A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.Win32.TaskScheduler.dll [11900]

$
0
0
I'm getting this exception with this code:

```
Imports Microsoft.Win32.TaskScheduler

Public Sub GetAllTasks()
Using taskService As New TaskService
For Each task As Task In taskService.AllTasks
Using task
Debug.WriteLine(task.Definition.Settings.Priority)
End Using
Next
End Using
End Sub
```

I've tested and this occurs everytime i use the "Settings" namespace, even alone.
Although the property succeeds and no error is thrown back to my code (is handled by the dll) it would be nice for it to be fixed, if it's not intended.

Thanks for reading, searched for this library when P/ Invoke was burning my head.

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>