I’m trying to develop a custom PDF viewer using PDFLibNet library.
I downloaded compiled dlls (32 and 64 bit) and took a look to examples: very nice.
Then I started a library project in VS2010 and created a new user control (the one I want to export): dll compiled succesfully.
So I created a GUI project (net 4.0), referenced my assembly and dropped my control to main form: I have an error that says (I’m translating, so it could be wrong) “Unable to create component ‘PdfViewer’. Error message: ‘System.IO:FileNotFoundException: unable to load file or assembly ‘PDFLibNet, Version 1.0.6.8, …. or one of its dependencies. Unable to find specified file.”.

To prevent some question:
- Yes, my custom assembly references exactly that assembly
- Yes, PDFLibNet assembly is exactly 1.0.6.8
- In my control I tell to copy that DLL everytime
- I tried to add PDFLibNet reference to GUI project, but I had the same error
Here is what I left after deleting everything (for testing purpose):
public partial class PdfViewer : UserControl
{
PDFWrapper _pdfDoc = null;
public PdfViewer()
{
InitializeComponent();
}
}
Just to tell you: if I try to remove any reference to PDFLibNet (removing PDFWrapper _pdfDoc = null;), my control is dropped correctly on form.
I even tried to register PDFLibNet into GAC, but the result is the same.
I’m really confused…
make sure you don’t check debug folder and the output mode is release.