Unable to create new empty mpp file


#1

getting error - Project does not contain original MPP data. Only update of original MPP files is currently supported.

My Sample code is,
1.

            Project project = new Project();

            // Create a new task
            Task task = project.RootTask.Children.Add("Task1");

            task.Set(Tsk.Start, new DateTime(2012, 8, 1));
            task.Set(Tsk.Finish, new DateTime(2012, 8, 5));

            project.Save(@"C:\Ramya\MPP\New\Project1.mpp", SaveFileFormat.MPP);

Actually my requirement is, to create a new mpp file and add data and download mpp file.

            Project project = new Project(@"C:\Ramya\MPP\Old\b4ubuild_sample_07.mpp");

            //// Create a new task
            Task task = project.RootTask.Children.Add("Task1");

            task.Set(Tsk.Start, new DateTime(2012, 8, 1));
            task.Set(Tsk.Finish, new DateTime(2012, 8, 5));

            project.Save(@"C:\Ramya\MPP\New\Project1.mpp", SaveFileFormat.MPP);

The above lines throwing exception - “An exception of type ‘System.NotSupportedException’ occurred in Aspose.Tasks.dll but was not handled in user code Additional information: The operation is not allowed in evaluation mode.”

Please help me, i am using Aspose.Tasks.dll version - 19.7.0.

if i use Aspose.Tasks. dll version - 19.6.1 - not able to read mpp file, but able to read mpp file in version 19.7.0 and unable to save mpp after adding changes


#2

@ramyaakula,

Can you please try to use 30 days free trial license to full evaluate product features. Some of the product features not work in evaluation version. To use full product features please get 30 days trial license file. Please share feedback with us if there is still an issue.


#3

@ramyaakula Hello!
There is no ability to save MPP without the usage of a template MPP file.

You can use the attached file as a template as follows:

Project project = new Project("Blank2010.mpp");
project.Save("out.mpp", SaveFileFormat.MPP); // no exception will be thrown

Blank2010.zip (21.5 KB)


#4

@ alexanderefremov1

i used the file “Blank2010.mpp” shared by you, still getting exception - “Error_Screen.png (100.1 KB)
The operation is not allowed in evaluation mode.”


#5

@Adnan.Ahmad,

from where i can get 30 days free license.,

currenty i am using Aspose.Tasks.dll from Nuget Package i.e., 19.7.0 version


#6

Please try to use the next article to get the trial license:
https://purchase.aspose.com/temporary-license


#7

@alexanderefremov1,

When i use trial license, i can able to save mpp file.

But why this feature doesnt work without using license.


#8

@ramyaakula,

I like to inform that some of features are limited because of company policy and customer can use them on license version of product.


#9

@Adnan.Ahmad,

Thank You