Quantcast
Viewing all articles
Browse latest Browse all 2206

Closed Unassigned: NotV1SupportedException while creating a folder [12450]

Hi

Getting NotV1SupportedException when creating a folder.

__Here's the stack trace:__

Microsoft.Win32.TaskScheduler.NotV1SupportedException: MyClass.createTask is not supported on Task Scheduler 1.0
at Microsoft.Win32.TaskScheduler.TaskFolder.CreateFolder(String subFolderName, String sddlForm, Boolean exceptionOnExists)


__Code:__

td.Actions.Add(new ExecAction(scheduleExePath, scheduleId));

TaskFolder tf = ts.RootFolder;
TaskFolder testFolder = null;
foreach (TaskFolder taskFolder in tf.SubFolders)
{
if (taskFolder.Name.Equals("ReportSchedule", StringComparison.OrdinalIgnoreCase))
{
testFolder = taskFolder;
}
}
if (testFolder == null)
testFolder = tf.CreateFolder("MyFolder");
__Environment:__
OS: Windows 10 / Windows 2012
Visual Studio 2013
.NET Framework 4.5.1
Task Scheduler Version: Release 2.5.21

Kindly advice, is there anything I am doing wrong?

Thanks
Mani

Viewing all articles
Browse latest Browse all 2206

Trending Articles



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