A "Could not load file or assembly 'Laserfiche.HttpClient' or one of its dependencies" Error Occurs When Deploying A Laserfiche SDK Program.

July 28, 2014 | KB: 1013513
SDK 8, SDK 9

Summary

After deploying a custom Laserfiche SDK program on a target computer, you may receive the following error message when running your custom program:

    Could not load file or assembly 'Laserfiche.HttpClient' or one of its dependencies.

Cause

There are three common scenarios that can cause this issue upon deployment:

  • The necessary Laserfiche SDK components are not installed on the target computer.
  • There may be an architecture mismatch where the application is attempting to load a 32-bit assembly into a 64-bit process or vice versa.
  • The appropriate Microsoft Visual C++ runtime is not installed.

Resolution 1

Make sure that the appropriate Laserfiche SDK components are installed on the computer. This is most easily accomplished by using the Laserfiche SDK runtime installer (LaserficheSDKRuntimeInstaller.exe).

Resolution 2

Make sure that the architecture of your application is the expected type.

Note: If your custom application is an IIS Web application, make sure to check the appropriate application pool.

Resolution3

Make sure that the appropriate version of the Microsoft Visual C++ runtime is available on the computer.

RepositoryAccess 9.1 requires Microsoft Visual C++ 2012 Update 4.

The .NET 2 version of RepositoryAccess 9.0 requires the Visual C++ 2008 redistributable while the .NET 4 version of RepositoryAccess 9.0 requires the Visual C++ 2010 redistributable.