Error opening mpx file using and vs 2005

Hi, i cant open the mpx file generated by your online demo, i get an "Error in line 1 ..." error from ms project 2003.

I can see that others have posted the same problem late 2008 and still no response from you, therefore i have been in contact with your chat support and they have asked me to make a post on the forum the problem.

Here is what i have tried:

Rashid> Hello! My name is Rashid, how may I help you today?
Nicolas> I just bought oem developer for aspose.tasks and everything i try gives me errors and your samples are wery old (vs2003). Where can i find some up to date working samples for I can also tell from the forum that many others have the same problem and you dont respond them. I get a little nervous about my 600$ investment here
Rashid> Please have a look at
Rashid> also look at
Nicolas> i have tryed the first one and it gives an error in line 1 when trying to open in ms project, the same problem is describet by others in the forum
Nicolas> and the demo you are referring to is an old vs 2003 project that starts conversion guide when opened in ws 2005
Rashid> Have you already posted on the forum regarding this
Nicolas> i can tell from other threds that there are open questions on exatly this topic since 2008, and i want to start using tasks or get my mony back
Nicolas> a simple working example for on vs2005 would do, but nothing is apperently awail eble
Rashid> I will have one of our developers look into this on priority
Nicolas> thank you, what du i do now ?
Rashid> Would you please post it on the forum as well so that the developers have a way of contacting you with the required demo
Nicolas> yes, i will place a copy of our chat there
Rashid> Thats great

I would be gratefull if you could help me with a working sample for using VS2005 (you current samle want to start conversion when opened i vs2005 and i think thats a bad start for debugging the problem)

Hello Nicholas,
Thanks for considering Aspose.Tasks.

I will look into it and provide you a working sample as soon as possible. There are some settings that you should enable to let the MS-Project open MPX file format. In case of MS-PowerPoint 2007, these are Tools – > Options – > Legacy Formats. I will check with the MS-Project 2003.

Thank you, i look forward to recieving your answer

Hello Nicholas,

It looks like that is problem of old demo.

MPX files should have ASCII codepage but project created by online demo has UTF8 codepage instead.
As a result MS Project 2003 can’t open it.

There are 2 possible solution.

1. Replace
file.Write(st, Encoding.ASCII);
in the demo source code.

2. Save project in XML format instead of obsolete MPX.

Thanks Alexey for your help.

Dear Nicolas,

I have attached a working example of Aspose.Tasks MPX project creation in VB.NET. The output Project.mpx is also attached. Try to open it in your MS-Project and let me know if any import error still occurs.

The following two lines should fix it.

Dim fileStream As New FileStream(“c:\Project.mpx”, FileMode.OpenOrCreate)

file.Write(fileStream, System.Text.Encoding.GetEncoding(1252))

I still get an error opening the project file, also the sample one in your zip. Now its just sligthly different. My ms project is in danish, but i would translate the error like this:

"An import error has occured, An illigal MPX post is found in line # 3"

If you can provide a sample creating a mpp file instead that could also be a good start. Actualy i would be very happy getting something out of the module that can be opened in ms project.

Thanks for your quick response

Dear Nicolas,

Can you use XML instead of MPX? It opens fine with MS-Project 2007. I have attached it. The code changes are the following.

Dim fileStream As New FileStream("c:\Project.xml", FileMode.OpenOrCreate)

Aspose.Tasks has a limitation that it cannot write MPP file, it can only read it and you have to write it back in MPX format.

For MPX file, it opens fine with MS-Project 98 but shows import error on later version. It needs to be investigated and fixed. I will seek if development team can fix it with priority.

Then i obviously cant use aspose.tasks for the purpose you promise on your product page. I can easily generate xml without aspose.tasks. This is the first 4 lines from your product overview and its the reason i bought aspose.tasks:

"Aspose.Tasks is a non-graphical .NET Project® management component that enables .NET applications to read and write Project® documents without utilizing Microsoft Project®"

It is not fair to tell me that mpp cant be written and mpx will generate errors unless you use 10 years old ms project 98, considering the above statement.

How do i get my money back ?

Anyway, we are sorry, you are unsatisfied. You should contact sales for refund. Please post your query at this forum.

Almost is NOT good enough when i have paid 600$ for a product that doesnt work the way you promise on your product page. It doesnt even come neer what you promise.

Could you pleese tell me exactly how to get my money back so i dont have to spend even more time on forum and threads ?

I am technical support team. You will have to contact sales team for refund. So please post on their forum.

Anyway, I installed MS-Project 2003 on my computer and noticed no error mentioned by you. The project.mpx file opened fine. Please see the attached movie.

I have been looking into the details in the mpx format and i think the problem is related to language in ms project. I have a danish version and that version wont read the us format from your mpx file, thus causing an import error.

I have seached more and found out that that timeformat is one big issue importing the mpx file. Your file says 10.00h, but a danish version want 10.00t (timer is hours in danish), so my question is now: Can i change the letter after 10.00 to the country specifik one ?

To be even more specific, line three in the mpx file is for default settings and thats the biggest issue right now, because of the "h" that need to be "t". Can i change the output mpx so that 11,2,0,1,8.0,40.0,$10.00/h,$15.00/h,1,0

get to:


It seems to me encoding issues. Can you try different encodings?

Like, I tried 1252, will you try 1250 this is for ANSI - Central Europe

I will also test it here as soon as possible.


Unfortunately, it’s not enough to translate hours, days, months and etc.
Localized versions of MS Project also very sensitive to field names and they also should be translated.
There are exist several known translations of MPX keywords but Danish is not in the list.
Known translations are German, Spanish, French, Italian, Portuguese, Swedish and Chinese.

Let me say to the Aspose team, I think what you guys are doing is great. For someone to simply say "I can generate the XML" is ludicrous. Keep it up and I look forward to MPP support. For now, I will work with what you have because Aspose has always turned out a great product, IMO. Tasks is taking a long time, and I need it ASAP, but i look forward to what you produce.