We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IndexOutOfRange on ProjectReader.Read of MS Project 2003 MPP file

(See attached files)

I am able successfully read a MS Project 2007 MPP file using the following code:

Dim stream As New IO.FileStream(filePath, IO.FileMode.Open)
Dim reader As New ProjectReader()
Dim myProj As Project = reader.Read(stream)

However, using the same code and an identical file that was created in MS Project 2003 and not yet converted to MS Project 2007, I get the following error:

System.IndexOutOfRangeException occurred
Message=“Index was outside the bounds of the array.”
at .(Byte[] , Int32 , Int32 ) at .(Byte[] ) at .(Hashtable , Hashtable , Hashtable ) at .(Stream ) at Aspose.Tasks.ProjectReader.Read(Stream stream) at Core.TasksTest…ctor(String filePath) in C:_Projects\Dev\Source\Components\Core\TasksTest.vb:line 9


There is no such issue. It seems that you converted the file from one format to other and it changed the original structure. Attached are the same files in 2003 and 2007 mpp formats and you can read both of them with the same code.