Name Length limitations on Resource [Name]

Is there a character length limitation on a Resource’s [Name] when populating MS Project with Aspose.Tasks dynamically?


I appear to be able a add a resource manually in MS Project with any length but am currently getting fatal errors which result in being unable to open the .MPP file produced after attempting to add a resource with a name such as "Round Trip Low Earth Orbit to Lunar Parking Orbit - per ton."

If this is a limitation of MS Project or Aspose? Here’s an example of how I’m building up the resources:


private void AddSomeResources(Guid someID, Aspose.Tasks.Project project)
{
EstimateItemCollection someResources)= DataService.GetMyResources(someID);
foreach (EstimateItem r in someResources)
{
Aspose.Tasks.Resource res = project.Resources.Add(description);
res.Set(Rsc.Name, description); // LONG DESCRIPTION HERE
res.Set(Rsc.Initials, r.Name);
res.Set(Rsc.Type, ResourceType.Material);
res.Set(Rsc.StandardRate, (decimal)r.Value);
res.Set(Rsc.CostPerUse, 0);
res.Set(Rsc.Code, r.ID.ToString());
}
}

Hi Patrick,


Thank you for posting your inquiry.

We have tested this issue at our end using the latest version of the API and there is no such issue raised. The resultant MPP file opens fine in MS Project. Following is the code sample we have used at our end for testing this issue at our end. Can you please share your sample files with us for our investigation? We shall look into further for assisting you.

Code:


Project project = new Project(“New project 2010.mpp”);

Aspose.Tasks.Resource res = project.Resources.Add(“Rsc 1”);
res.Set(Rsc.Name, “Round Trip Low Earth Orbit to Lunar Parking Orbit - per ton.”); // LONG DESCRIPTION HERE
//res.Set(Rsc.Initials, r.Name);
res.Set(Rsc.Type, ResourceType.Material);
// res.Set(Rsc.StandardRate, (decimal)r.Value);
res.Set(Rsc.CostPerUse, 0);
//res.Set(Rsc.Code, r.ID.ToString());

project.Save(“Updated.mpp”, SaveFileFormat.MPP);