Closed dahall closed 6 years ago
TaskSchedulerEditor is a separate assembly. On the downloads page for 1.7, you also need to extract all the files from the second download (TaskSchedulerEditor.zip) and reference the TaskSchedulerEditor.dll.
On another note, I'd make sure you have retrieved a valid task with the GetTask method before calling the editor.
if (t != null)
Originally posted: 2011-10-19T16:54:44
I have the same problem too. If I want to use TaskService and TaskEditDialog I cannot do it because both have the same name.
Surely I am doing something basic wrong.
How can I use both assemblies at the same time, in the same .cs ?
Thanks.
Originally posted: 2011-11-25T13:29:29
Yes, in fact you mustuse both in order to use TaskEditDialog. You need to extract all the assemeblies from both downloads and then add them all to your project. There are support assemblies for the TaskSchedulerEditor.dll.
Originally posted: 2011-11-27T22:41:51
Sorry but I don't know what to do:
On my WinFormsApplication->References, I have added;
-Microsoft.Win32.TaskScheduler
-Microsoft.Win32.TaskSchedulerEditor
In the source-cs code:
using Microsoft.Win32.TaskScheduler;
But when I try to use it:
TaskEditDialog editForm = new TaskEditDialog();
Both references to class TaskEditDialog are marked with error and when I try to compile it I get:
The type or namespace 'TaskEditDialog' could not be found (are you missing a ......);
Originally posted: 2011-11-29T09:16:37
OR
Originally posted: 2011-11-29T23:35:53
Thanks for your help David,
I have tried with your step-by-step instructions and with NuGet too, but TaskEditDialog is not "recognized" by my VS2010. If I remove Microsoft.Win32.TaskScheduler from my "references" list then it right recognize TaskEditDialog but then it doesn't recognize the others (TaskService for example).
It is very curious because TaskEditDialog gets the 'ok-color' and when I compile it changes to underline-error-color.
Don't worry, perhaps any "collission" with DevExpress or another package.
Thanks again and regards.
Originally posted: 2011-11-30T09:57:40
Currently the namespaces of the TaskEditor are a bit confused (Assemblynamespace 'Microsoft.Win32.TaskSchedulerEditor', Defaultnamespace 'Microsoft.Win32.TaskScheduler') and the projects 'TaskEditor' and 'TaskService' are compiled for different dotNET-Versions (TaskEditor: dotNET 3.5, TaskService: dotNET 2.0, That's a bad choice.). Changing that, will solve the problem.
Originally posted: 2012-01-12T03:44:29
I have same problem too, i've solved downloading the sources and recompiling targeting .net 4 full, i'have also changed (as CKoewing noticed) the default namespace from 'Microsoft.Win32.TaskScheduler' to 'Microsoft.Win32.TaskSchedulerEditor'.
Originally posted: 2012-01-25T02:50:50
Same problem here. How is this possibly working for anyone? iLMax's suggestion did not work for me. Does anyone have updated code for this?
Originally posted: 2012-02-27T10:42:09
Make sure the project supports at least .NET 3.5 then follow the steps in my earlier post adding all the assemblies referenced there. I have done this with a number of projects and know this works and doesn't cause namespace collisions. Having different .NET dependencies also is not a problem unless your main executable is .NET 4.0. Then you will see some initial load delays as the .NET 4.0 runtime loads the .NET 3.5 assemblies. You only need to use the single namespace:
using Microsoft.Win32.TaskScheduler;
If you are missing the controls in the Toolbox, you need to manually add those from the assemblies.
Originally posted: 2012-02-27T17:05:47
I'm not sure what else to try. I guess it must be something on my end, but I don't know what. I am going to look for another library. If I solve the issue, I'll post something here. This is what I did:
The "TaskEditDialog" shows in light blue (my 'OK' color). No red/blue squigglies.
If I type "TaskEditD" and invoke intellisense it completes the rest of the word.
if I click on "TaskEditDialog" and press F12 it goes to the definition's metadata.
Build. Instantly get an error:
"The type or namespace name 'TaskEditDialog' could not be found (are you missing a using directive or an assembly reference?)"
The word now appears with a blue squiggly under it.
I also tried changing the namespace of the editor (and all supporting files for it), and the targeted version to .Net 4.0. No luck.
Originally posted: 2012-02-28T06:51:24
I have just included a very simple VS2010 C# project that works. It is at the bottom of this link: http://taskscheduler.codeplex.com/wikipage?title=Install. I hope this helps.
Originally posted: 2012-02-28T09:46:57
ive got this code:
class TaskEditor {
and everything seems fine there, except when it compiles it cant seem to find Microsoft.Win32.TaskSchedulerEditor.
Im using 1.7 and Visual Studio 2010. Ive added the .dll to my references and included the correct using directive, but it doesnt seem to want to work. Any ideas?
Originally posted: 2011-10-19T09:00:14