I downloaded an itextsharp DLL that I would like to use in my vb.net 2008 express application.
- In which folder should it be placed?
- I went into choose items in the toolbox and tried to add it but I got an error
This is what I downloaded:
I downloaded an itextsharp DLL that I would like to use in my vb.net 2008 express application.
This is what I downloaded:
Typicaly you put the dll in ANY directory and set up a reference to it. When compiling, VS adds this dll to the bin directory of the application automatically.
It shouldn't matter where the DLL is places. Download the correct compiled DLL to your computer.
Open your VB.NET solution -> Right Click -> Add Reference...
Browse your PC for the DLL you just downloaded and let Visual Studio do the rest.
You need to reference the DLL inside your project: right-click on the project in solution explorer and then select Add Reference and next select itextsharp.dll. It will then be automatically copied to the project output folder alongside with the executable (usually bin\Debug)
As most other answers have hinted, you can just add a reference to a dll from anywhere.
However it'd probably be a good idea to create a 'lib' (as in library) folder in your project, copy the dll in there and only then reference it. That way if you share your solution via source control then anyone else can use it too. (without having to download or add their own reference to a copy of the dll)
Something to keep in mind is that there are no objects from the DLL you can put in and use from the Toolbox; you need to programmatically create iTextSharp objects.
Like this:
Add Imports:
Imports iTextSharp.text.pdf
And in your code:
Dim writer As PdfWriter = PdfWriter.GetInstance(document, iostream)