locked
Project Using AxAcroPDF control not working anymore after upgrade to VS 2015 RRS feed

  • Question

  • I've been working for months on a very complex multi-form project.  Two of the forms use AxAcroPDF readers.  

    Everything was going swimingly until I installed VS 2015 yesterday.  Now the thing won't compile and I get this message:

    Additional information: An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'AcroPDFLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    I tried removing and reloading the AxAcro controls (which appear on two of the forms in the project).  No such luck.  Didn't fix the problem.

    Please help!  I'd appreciate it a ton.
    Thursday, July 23, 2015 1:24 AM

Answers

  • This is not uncomon "Could not load file or assembly 'AcroPDFLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified".

    Adobe Acrobat Reader is an Adobe program which provides at least one ActiveX control available to be used with Visual Studio. I don't know that this control is available to use with whatever .Net Framework Visual Studio 2015 is using or if you compile the app to that Framework.

    Regardless you should be able to use the Toolbox manager to add this control to your Toolbox which I'm certain it is not part of right now in Visual Studio 2015.

    Do you still have your older Visual Studio installed? If so open it and find the reference to the AxAcro control. Then add that reference into your Visual Studio 2015 project. I suspect the reference will be to a .Dll provided by Adobe. I'll look in my VS and get back in a minute on that.

    Update: If you dynamically are creating the control then add a reference in your project to "C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroPDF.Dll" for Win 7 64 bit system. If you want the control in your ToolBox then use the ToolBox manager to add a Com component and browse to the same path to add the tool. I suspect that adding the control to your ToolBox may alleviate the issue but am not positive. It could be you will need to delete the control on your app if it is not dynamically created then add a new one to your app but doing so destroys events Handles clauses.

    Also check your applications properties, references to see what the path for the reference for AxAcro is. If no reference is there or if the path/file is non-existant then you may need to download Adobe Acrobat Reader and install it on your PC again.


    La vida loca


    • Edited by Mr. Monkeyboy Thursday, July 23, 2015 2:17 AM
    • Marked as answer by Youjun Tang Thursday, August 6, 2015 6:29 AM
    Thursday, July 23, 2015 1:44 AM

All replies

  • This is not uncomon "Could not load file or assembly 'AcroPDFLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified".

    Adobe Acrobat Reader is an Adobe program which provides at least one ActiveX control available to be used with Visual Studio. I don't know that this control is available to use with whatever .Net Framework Visual Studio 2015 is using or if you compile the app to that Framework.

    Regardless you should be able to use the Toolbox manager to add this control to your Toolbox which I'm certain it is not part of right now in Visual Studio 2015.

    Do you still have your older Visual Studio installed? If so open it and find the reference to the AxAcro control. Then add that reference into your Visual Studio 2015 project. I suspect the reference will be to a .Dll provided by Adobe. I'll look in my VS and get back in a minute on that.

    Update: If you dynamically are creating the control then add a reference in your project to "C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroPDF.Dll" for Win 7 64 bit system. If you want the control in your ToolBox then use the ToolBox manager to add a Com component and browse to the same path to add the tool. I suspect that adding the control to your ToolBox may alleviate the issue but am not positive. It could be you will need to delete the control on your app if it is not dynamically created then add a new one to your app but doing so destroys events Handles clauses.

    Also check your applications properties, references to see what the path for the reference for AxAcro is. If no reference is there or if the path/file is non-existant then you may need to download Adobe Acrobat Reader and install it on your PC again.


    La vida loca


    • Edited by Mr. Monkeyboy Thursday, July 23, 2015 2:17 AM
    • Marked as answer by Youjun Tang Thursday, August 6, 2015 6:29 AM
    Thursday, July 23, 2015 1:44 AM
  • Make sure the Platform of your project is set to x86. I suspect that your app may now be running 64-bit, which would be incompatible with the 32-bit Acrobat Reader library.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Thursday, July 23, 2015 2:56 PM