Compilation error: Type Expected


I’ve run the installer and copied the latest hotfix for the Aspose.Word control to the /bin directory for my application but I get the following error when I try to compile it. I’ve included the source and error page below.

Any ideas what may be wrong? I’ve tried reinstalling it an re-applied the latest hot fix (6-20).

I’m very interested in this control because we have an application using work automation right now but would really prefer not to have to use it.

Brent Hemple
Server Error in ‘/’ Application.

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

c:\sites\wbbm\reports\test\Test.aspx.vb(9) : error BC30182: Type expected.

Dim word As Word = New Word()

Show Complete Compilation Source:

Line 1: Imports Aspose.Word
Line 2:
Line 3: Public Class Test
Line 4:
Line 5: Inherits System.Web.UI.Page
Line 6:
Line 7: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 8:
Line 9: Dim word As Word = New Word()
Line 10:
Line 11: End Sub
Line 12:
Line 13: End Class


Hi Brent,

You just need to add a reference to Aspose.Word.dll assembly to your project.

1. Right click on the project in Visual Studio, select Add Reference.
2. Select Aspose.Word in the .NET tab and click Select, then click OK. If Aspose.Word is not shown on the .NET tab, then click Browse and navigate to C:\Program Files\Aspose\Aspose.Word\bin and select Aspose.Word.dll.

Now youw code should compile okay.