Reputation: 647
I've added as reference PDFSharp classes for a project. When I tried to use a method in a class that includes PDFSharp libraries I get a FileNotFoundException
that states I'm missing the referenced (PDFSharp) file (while I can assure you the dll file is there).
So I've tried adding and readding and changing the dll version, but still without success. So I switched to PDFClown, a similar purpose library, but the error is the same: FileNotFoundException
at runtime.
The exception is thrown even before the method is executed.
Calling method (where the exception is thrown):
//method call: here the debugger stops at the breakpoint
ReportUtils.CreateFile(tempDirectoryPath ecc);
Called method:
using org.pdfclown.documents;
using org.pdfclown.documents.contents.composition;
using org.pdfclown.documents.contents.fonts;
using clownFiles = org.pdfclown.files;
class ReportUtils
{
public static void CreateFile(/*parameters*/)
{
//the debugger never enter here: the exception is thrown before
string filename = Settings.ReportFileName + String.Format("{0:yyyyMMddHHmmssffff}", DateTime.Now);
//ecc
}
//...
Why is this exception showing up? Am I doing something wrong adding the references?
Upvotes: 1
Views: 461
Reputation: 7235
I could reproduce your issue by setting the option Copy Local
on my library to false
. Please, make sure this boolean is set to true.
.
Upvotes: 1