2

So I have been trying to config the project to make it work on our server via Citrix.

I used this line of code to set the path:

private static pdftron.PDFNetLoader loader = pdftron.PDFNetLoader.Instance().Path(String.Format(@"{0}\{1}",
        System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(IndexUIZoom)).Location), @"PDFNet"));

I got this error every time (bin is where the .exe file is):

INFO  Program [(null)] - Path: [bin]\PDFNet -

ERROR Program [(null)] - System.IO.FileNotFoundException: Could not load file or assembly 'PDFNet.dll' or one of its dependencies.
The specified module could not be found. File name: 'PDFNet.dll'

Everything works fine on local machine. I got the error above whenever I run from Citrix, or log into the server machine and run from there.

Tylor
  • 33
  • 6
  • This is an entirely normal mishap, you simply forgot to copy one or more DLLs that this component needs. "or one of its dependencies" is the common case. Consult the component vendor's documentation for deployment instructions, note that they specifically mention that you have to deploy the Visual C++ 2010 runtime support yourself, with links to the download location. – Hans Passant Jul 19 '18 at 15:01
  • dlls are already in place. I guess it's because of the server not having that VC++ runtime installed. – Tylor Jul 19 '18 at 17:55

1 Answers1

1

Most likely your server is missing the MS VC++ Runtime dependencies. Developer machines usually have them installed as part of a Visual Studio installation, but servers often do not. You can download MS VC++ installers from MSDN.

To find the exact one you need to download please see section 3.2.1 of the Getting Started Guide for PDFNet .Net below. Note you need to also match the runtime 32 or 64 bitness of your process, for both PDFNet.dll and the MS VC++ runtime.

PDFNet .Net 4.0+ Getting Started Guide

PDFNet .Net 2.0-3.5 Getting Started Guide

https://www.pdftron.com/documentation/windows/guides

Ryan
  • 2,473
  • 1
  • 11
  • 14