Error whil running the project Aspose Task

Hi,

I have downloaded aspose Task. While trying to run D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate i got the following errors.

Error 2 The type or namespace name 'Duration' does not exist in the namespace 'Aspose.Tasks' (are you missing an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 216 30 Aspose.Tasks.WF.MpxCreate
Error 3 The type or namespace name 'Duration' does not exist in the namespace 'Aspose.Tasks' (are you missing an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 216 65 Aspose.Tasks.WF.MpxCreate
Error 4 The type or namespace name 'TasksException' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 219 20 Aspose.Tasks.WF.MpxCreate
Error 5 The type or namespace name 'MPXFile' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 241 13 Aspose.Tasks.WF.MpxCreate
Error 6 The type or namespace name 'MPXFile' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 241 32 Aspose.Tasks.WF.MpxCreate
Error 7 The type or namespace name 'MPXHeader' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 284 13 Aspose.Tasks.WF.MpxCreate
Error 8 The name 'ScheduleFrom' does not exist in the current context D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 287 36 Aspose.Tasks.WF.MpxCreate
Error 9 The name 'ScheduleFrom' does not exist in the current context D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 292 36 Aspose.Tasks.WF.MpxCreate
Error 10 The type or namespace name 'Resource' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 299 13 Aspose.Tasks.WF.MpxCreate
Error 11 The type or namespace name 'Resource' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 302 13 Aspose.Tasks.WF.MpxCreate
Error 12 The type or namespace name 'Task' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 308 13 Aspose.Tasks.WF.MpxCreate
Error 13 The type or namespace name 'Task' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 314 13 Aspose.Tasks.WF.MpxCreate
Error 14 The type or namespace name 'Duration' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 316 34 Aspose.Tasks.WF.MpxCreate
Error 15 The type or namespace name 'Task' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 335 13 Aspose.Tasks.WF.MpxCreate
Error 16 The type or namespace name 'Duration' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 338 34 Aspose.Tasks.WF.MpxCreate
Error 17 The type or namespace name 'Relation' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 345 17 Aspose.Tasks.WF.MpxCreate
Error 18 The type or namespace name 'TaskLinkType' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 346 30 Aspose.Tasks.WF.MpxCreate
Error 19 The type or namespace name 'Relation' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 350 17 Aspose.Tasks.WF.MpxCreate
Error 20 The type or namespace name 'TaskLinkType' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 351 30 Aspose.Tasks.WF.MpxCreate
Error 21 The type or namespace name 'ResourceAssignment' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 361 17 Aspose.Tasks.WF.MpxCreate
Error 22 The type or namespace name 'Duration' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 370 40 Aspose.Tasks.WF.MpxCreate
Error 23 The name 'TimeUnit' does not exist in the current context D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 370 53 Aspose.Tasks.WF.MpxCreate
Error 24 The type or namespace name 'Duration' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 371 46 Aspose.Tasks.WF.MpxCreate
Error 25 The name 'TimeUnit' does not exist in the current context D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 371 59 Aspose.Tasks.WF.MpxCreate
Error 26 The type or namespace name 'ResourceAssignment' could not be found (are you missing a using directive or an assembly reference?) D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\CreateProject.aspx.cs 376 17 Aspose.Tasks.WF.MpxCreate

Could u pls tell me why this errors happen?

Dear JulieAlice,

Thank you for considering Aspose.Tasks.

Thank you for letting us know about it. I will look into it and try to resolve it as soon as possible.

I have found the cause of this problem, you did not add the reference to Aspose.Tasks.dll, please add the reference to it.

To add a reference, right click your project in solution explorer and then click add reference, locate the Aspose.Tasks.dll using Browse button and you are done

You can also simply copy the Aspose.Tasks.dll and Aspose.Tasks.xml in your Bin directory.and refresh it from your solution explorer

This is the path to Bin directory

Aspose.Tasks.WF.MPXCreate\Bin

Hi Msfaiz,

Thank you for the reply. When i added the references those errors have but now i am having some more errors.

Error 1 Could not load type 'Aspose.Tasks.WF.MpxCreate.Global'. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1
Error 2 Syntax error. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 12 'Namespace' statement must end with a matching 'End Namespace'. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 13 End of statement expected. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 14 Statement cannot appear outside of a method body. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 29 Bracketed identifier is missing closing ']'. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 30 'Class' statement must end with a matching 'End Class'. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 31 Syntax error. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 32 Declaration expected. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 33 Bracketed identifier is missing closing ']'. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 34 End of statement expected. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 35 Syntax error. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\
Error 36 Statement cannot appear outside of a method body. D:\Program Files\Aspose\Aspose.Tasks\Demos\C#\Aspose.Tasks.WF.MPXCreate\Global.asax 1 1 D:\...\Aspose.Tasks.WF.MPXCreate\

If you are using Visual Studio.NET, then read it.

Close your solution, open it again and then click Build on the Build menu.

Thank you msfaiz. Now the errors have gone.