Referencing aspose in .Net VS 2010 Win 7

My computer has recently been upgraded to Windows 7 and Visual Studio 2010. However, we are still using .Net Framework 2.0. I am trying to migrate my .Net apps to this new computer and am unable to add Aspose as Reference as it was on the old computer. I tried regsrv32 and that did not produce an error, but it still will not allow me to add Aspose as a reference. Rebooting did not make any difference either.

The error message is as follows:

"A reference to Aspose.pdf.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

What do I need to do to get a reference to Aspose.pdf? It worked fine on my old Win XP VS 2005 computer.

Thanks,

Terri

Hi Terri,

Thanks for using our products.

Kindly download the latest version of Aspose.Pdf v6.7, aftr installing the .msi setup, you can add a Reference by Right Click on the References folder or Project node, then click on Add Reference. Aspose.Pdf dlls are available for different version of .NET frameworks in the .NET section of popup window as shown in the attached screenshot. Add the reference against net2.0. After adding the reference hopefully you can use Aspose.Pdf for .NET.

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

Hi Terri,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Adding more to Rashid's reply, you may do the following steps to include the reference of Aspose.Pdf for .NET in your application:

o In the Solution Explorer of VS.NET 2010 for your project, right click on "References" and click "Add Reference".

o Select Browse tab in the "Add Reference" dialog and click Look for: combo box.

o Now, select the Aspose.Pdf.dll component file @ your installation directory e.g. ".../ Program Files/Aspose/Aspose.Pdf for .NET\Bin\net2.0/"

o Click OK button to close the dialog.

This will add a reference of Aspose.Pdf for .NET (.NET 2.0) in your application.

Please feel free to contact us in case you face any issue.

Thank You & Best Regards,

I did as you instructed and am now able to reference the Aspose.pdf. However, when I try to build, it is generating errors that were not there in the version that I had previously.

There is a using Aspose.Pdf at the top of the .cs file. Here are a couple of the items that are causing build errors in blue:

public Pdf GeneratePdf();

lightBlue = new Color(0,123,195);

headerTICenter.Alignment = AlignmentType.Center;

private BorderInfo GetBorderInfo();Are they no longer supported? Or what syntax do I need to reference them with this new version?

Hi Terri,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I am happy to hear that your issue regarding adding Reference has been fixed. Now, regarding your current issue, if you are using Aspose.Pdf for .NET v6.x then please include Aspose.Pdf.Generator namespace as well i.e. using Aspose.Pdf.Generator;

Please do let us know in case you still face any issue.

Sorry for the inconvenience,

I am using Aspose.pdf for .NET version 6.7. I tried including Aspose.Pdf.Genertor namespace, but it still doesn't like the line below.

Aspose.Pdf pdf = new Aspose.Pdf();

I have tried it with and without the "Aspose." prefix. What do I need to do to be able to create an object of type pdf?

Thanks,

Terri

Never mind. I figured it out. I needed to replace Aspose.Pdf with Aspose.Pdf.Genertor.Pdf .

Thanks,

Terri

Hello Terri,


Please note that since the release of Aspose.Pdf for .NET 6.0.0, all the classes of legacy Aspose.Pdf for .NET are moved under Aspose.Pdf.Generator namespace. Please visit the following links for further information on

In case you still face any problem or you have any further query, please feel free to contact. We are sorry for your inconvenience.