添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I'm able to run an executable built with the SDK on my development PC however after deploying to a production server I get the following error :

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Laserfiche.HttpClient.dll' or one of its dependencies. The specified module could not be found.
at Laserfiche.RepositoryAccess.Server.GetRepositories()
at MyProgram.Program.Main(String[] args)

The target machine is running Windows Server 2008 R2 Standard with Service Pack 1.  It is a 64-bit OS.  It has the following components installed:

Laserfiche SDK Runtime 9.1 x64 (version 9.1.1.118)
Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.61030
Microsoft .NET Framework 4.5.2

I'm building the application using Visual Studio 2013.

Thanks in advance for any help you can offer!
- Bill

Is your application running as x86? Laserfiche.HTTPClient has x86 and x64 versions, it's not MSIL. I wouldn't recommend GAC-ing it by itself.

Any chance your project is accidentally referencing a different version of it (9.0 instead of 9.1)?

My application was not running as x86 because I specified it to build to an x64 target platform.  I had several projects under the solution that referenced:

C:\Program Files\Laserfiche\SDK 9.1\bin\9.1\net-4.0\Laserfiche.RepositoryAccess.dll

however one of the projects referenced:

C:\Program Files\Laserfiche\SDK 9.1\bin\ 9.0 \net-4.0\Laserfiche.RepositoryAccess.dll

After switching that project to the 9.1 path it worked!

Thanks so much for you help!

You will need to find the dll in the GAC (%systemroot%\Microsoft.Net\assembly\GAC_MSIL), copy it to the production system and use gacutil.exe or powershell to actually "install" it to the GAC. There are a few tutorials out there that show you how to accomplish this ( https://msdn.microsoft.com/en-us/library/dkkx7f79(v=vs.110).aspx ).