Q: I have added the PDFNet.dll to the Bin folder of my .Net ASP
project. Included it as a resource and it runs great in dev. I
deployed the website to production and get the following error. The
DLL is in the Bin folder of the website. Is there something else I
need to do?
[FileNotFoundException: Could not load file or assembly 'PDFNet.dll'
or one of its dependencies. The specified module could not be found.]
------------------
A: What is the variant of PDFNet that you are using (i.e. the name of
the ZIP file you downloaded from pdftron website)?
In case of PDFNet for .NET 4.0 you need VC 2010 redistributable on
your system (MSVCP100.DLL and MSVCR100.DLL). This is a standard
component of Visual Studio. In case your target machine does not
include this redistributable you can download it from here:
Note also that if you are targeting x64, you need to remove the 32bit PDFNet assembly reference form the project, and add the 64bit one, and make sure that copylocal:true is set.
Exception": {
“Name”: “FileNotFoundException”,
“Message”: “Could not load file or assembly ‘PDFNet, Version=6.2.1.23937, Culture=neutral, PublicKeyToken=36167be3f67ac39c’ or one of its dependencies. The system cannot find the file specified.”
}
I am having VC++ redistributable 2012 and above. So unable to install 2010 VC++. The issue can be resolved by placing PDFNet dll in the bin folder. However we are facing issue in the service fabric environment.
Exception type: ConfigurationErrorsException
Exception message: Could not load file or assembly ‘PDFNet.DLL’ or one of its dependencies. The specified module could not be found.
Can this VC++ dlls can be added as part of application depdencies? If yes, what dlls to be added. (note: our Service fabric node is empty and we are installing only our application on that) ?
Since the VC++ runtimes are Not .NET assemblies I don’t think you can depend on them the same way in Visual Studio, they just have to be made available. But since they are a Microsoft dependency you should be able to find lots of documentation about them.