I am facing this warning below:
Warning 1 Referenced assembly 'C:Program FilesChilkat Software IncChilkat.NET-v2.0-v3.5-FrameworksChilkatDotNet2-9.4.1-win32ChilkatDotNet2.dll' targets a different processor than the application.
I changed the CPU Type to ANY CPU .. but it still occurs!..
My development environment is: VS 2010, C#, .Net Framework 3.5 SP1 and I want to deploy on both x86 and x64 system..
asked Jan 20 '14 at 12:07
It's only a warning that means when you deploy your app, you must be sure that the 32-bit Chilkat assembly is loaded when your application runs as a 32-bit process (which is always the case on a 32-bit machine, and would be the case for 64-bit machines if you explicitly target 32-bit). If your application runs as a 64-bit process, you must be sure that the 64-bit Chilkat assembly is loaded at runtime. Otherwise you'd get the "incorrect format" error.
The Chilkat .NET assembly is a mixed-mode assembly. Because it's written in C++, the inner-core compiles to native code. The outer layer is managed. Therefore, the assembly itself cannot be "Any CPU".
Two possible choices are:
1) Target your app for 32-bit, which allows you to use the 32-bit assembly on any type of system.
2) Target your app for "Any CPU". In this case you'll need to deploy the Chilkat assembly that matches the computer architecture. You don't need separate builds of your app, just copy the correct Chilkat DLL with the app.
Also, in the coming months, Chilkat will be releasing a download for Mono to support .NET cross-platform. This implementation will provide a pure / managed .NET assembly, which can be reference by an app w/ "Any CPU" as the targeted architecture. However, it will also come with a "functional" DLL/shared-lib (meaning function-based instead of object-oriented class-based) that would need to be distributed alongside the Chilkat Mono assembly. (Which by the way, the functional DLL could be used by C/C++ programs, or programs in other programming languages. For example, just like Win32 Platform SDK functions are callable from VB6.) The Chilkat Mono implementation would provide a single API for platforms including MAC OS X, Linux, Windows, Android, and iOS. That is the current goal.
answered Jan 20 '14 at 12:09