Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Cannot load assembly after deploying to 64-bit server
Started by Ozymandias76 at 07-22-2008 8:05. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  07-22-2008, 8:05
Ozymandias76 is not online. Last active: 12/3/2008 1:35:14 PM Ozymandias76

Top 75 Posts
Joined on 05-19-2006
Posts 30
Cannot load assembly after deploying to 64-bit server
Reply Quote
I am trying to deploy our application to the new 64-bit server and am running into problems with LEADTOOLS.  I am getting the following error when using RasterSupport to try to unlock features.

---------------
System.BadImageFormatException: Could not load file or assembly 'Leadtools.Kernel, Version=14.5.0.72, Culture=neutral, PublicKeyToken=9cf889f53ea9b907' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'Leadtools.Kernel, Version=14.5.0.72, Culture=neutral, PublicKeyToken=9cf889f53ea9b907'
---------------

The Leadtools.Kernal assembly is in the installation folder of the application so I would think it should be able to find it no problem.  Also, I did install the Microsoft Visual C++ 2005 Redistributable (in the past not installing this caused the same or similar errors), so I am thinking this is related to the server being 64 bit.  Using the same installer on other servers works great.

Any suggestions?  I NEED to get this working very soon!

   Report 
  07-22-2008, 9:15
Ozymandias76 is not online. Last active: 12/3/2008 1:35:14 PM Ozymandias76

Top 75 Posts
Joined on 05-19-2006
Posts 30
Re: Cannot load assembly after deploying to 64-bit server
Reply Quote
Hmm...I it it working on my own.  On a whim I changed the build platform to "x86" instead of "Any CPU" for all projects in my solution.  It seems to be working fine now. 

Gah, very annoying.  Why should I have to do this?


   Report 
  08-12-2008, 15:15
Joshua is not online. Last active: 12/16/2008 8:29:25 PM Joshua



Top 25 Posts
Joined on 03-12-2008
Munich, Germany
Posts 82
Re: Cannot load assembly after deploying to 64-bit server
Reply Quote
I'm not from leadtools, and we're using the v15 binaries, but I know that leadtools build specific versions of their binaries to target either the 32 bit or 64 bit runtimes exclusively and you should pick the right one depending on what you require. This is because the libraries we use are really just wrappers around a lot of native unmanaged code, which needs to be built against a specific platform.

If you need the 64 bit version of the binaries, download and compile your application in 64 bit mode using them. This however means you'll need to keep two versions of your application (one for 64 bit installs and one for 32 bit installs). If you've got a semi-sophisticated build system you should be able to keep the same source tree and do conditional compilation to achieve this cleanly.

If you don't even want to think about the difference between 32 bit and 64 bit systems then just compile your app to target the 32 bit runtime (the x86 option) and use the 32 bit leadtools libraries. You'll loose the performance gains that a 64 bit system would otherwise afford you but shouldn't be any worse off than if the server was just a 32 bit server.

Josh.

   Report 
  10-01-2008, 17:44
Walter is not online. Last active: 12/29/2008 9:00:18 AM Walter



Top 25 Posts
Joined on 04-14-2008
Charlotte, NC
Posts 125
Re: Cannot load assembly after deploying to 64-bit server
Reply Quote
Thanks Joshua. You've done a great job explaining this.
Walter
Technical Support
LEADTOOLS
support@leadtools.com
   Report 
Post
LEAD Support Fo... » Developer » Deployment » Cannot load assembly after deploying to 64-bit server

Powered by Community Server, by Telligent Systems