Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3345950
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:14:45+00:00 2026-05-18T01:14:45+00:00

In visual studio, I create a reference to the Aspose assembly and use the

  • 0

In visual studio, I create a reference to the Aspose assembly and use the Document class in my code. It looks fine at design-time, but when I go to compile I get the error ‘Type Aspose.Words.Document’ is not defined.’ If I do anything that changes the project file, like add or drop a reference or add a new file, the errors go away… until I try to compile again.

Has anyone else seen this weird behavior and know how to fix it? Here’s my code if it matters, but it doesn’t get much simpler:

Module Module1

    Sub Main()

        Dim license As New Aspose.Words.License()
        license.SetLicense("Aspose.Words.lic")

        Dim files = My.Resources.files.Split()

        For Each file In files
            If file <> "" Then
                Dim changed As Boolean = False
                Console.Write("Processing " & file & "...")

                Dim doc = New Aspose.Words.Document(file)

                If doc.Range.FormFields("CurrDate") IsNot Nothing Then
                    doc.Range.FormFields("CurrDate").TextInputType = Aspose.Words.Fields.TextFormFieldType.RegularText
                    doc.Range.FormFields("CurrDate").TextInputFormat = ""
                    doc.Save(file)
                    Console.WriteLine("done.")
                Else
                    Console.WriteLine("not applicable.")
                End If

            End If

        Next
        Console.Read()
    End Sub

End Module
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:14:46+00:00Added an answer on May 18, 2026 at 1:14 am

    I found that it must be because the dll is targeting a different framework than what was specified in the project. I created a new console app that targeted 3.5 instead of 4.0 and it started working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Visual studio is pretty good but doesn't create stored procedures automatically. Iron Speed designer
Background In Visual Studio 2008 Create a new Windows Forms Application, this will create
I used the LINQ to SQL designer in Visual Studio to create an object
I am trying to learn & create Visual Studio templates and as per this
Visual Studio 2008 w/Sp1 To reproduce my problem I simply create a new .Net
When we create stored procedures in Visual Studio (with the extension .sql) the file
I used Visual Studio's Application Wizard to create a skeleton MFC program with a
When you create a new web user control in visual studio it by default
I have Visual Studio 2005 Professional ENU installed and want to create GUIDs using
In Visual Studio, two files are created when you create a new Windows Form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.