First of Many Stupid Questions

Hi!


Just installed Aspose.Tasks (latest release).

Have successfully reference license.

Can open an existing MS Project and save it to a new name (*.mpp) file okay… However, Visual Studio shows errors when I try to edit properties of a Resource (for example)

Resource rez = prj.Resources.Add(description); //succeeds
rez.Name = “Engineer”; //will not compile, VS says “Name” is not legit (or ID, UID, etc.).

Any help?

I have restarted VS2013.

Below is front matter of class (using, license check).

Thanks,

Doug




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.Tasks;
using Aspose.Tasks.Util;
using HydraData;
using System.IO;

namespace HydraProjectInterface
{
public class HydraAsposeTaskInterface
{
private static bool _AsposeTotalInitialized = false;
public delegate void AsposeIntegrationProgress(string msg, int progress);
public HydraAsposeTaskInterface(AsposeIntegrationProgress progress)
{
_Progress = progress;
if (!_AsposeTotalInitialized)
{
License l = new License();
string d = Directory.GetCurrentDirectory();
l.SetLicense(“Aspose.Total.lic”);
_AsposeTotalInitialized = true;
}
}



Hi Doug,

Thank you for writing to Aspose support team.

You need to set the Resource’s Name by using the Set Method and static class Rsc’s Name property as shown in the following code sample. Please refer to our documentation section, Working with Resources, for more examples in this regard and let us know if we can be of any other help to you.

Sample Code:

Resource res = Project.Resources.Add(“Res”);
res.Set(Rsc.Name, “Resource 1”);

Kashif,


Many thanks sir! It is a thing of beauty and worked like a charm.

Have a great day - I will try to keep the stupid questions to a minimum! :slight_smile:

-Doug

Hi,


Thank you for sharing your feedback and please feel free to write to us for any further query related to Aspose.Tasks API.