login about faq

Hello, I am using Win 7 Home x32, vs2012 and in my project properties under BUILD tab target platform is set to Any CPU and also using ChilkatDotNet4.dll for 32bit when I am compiling the project it is giving me this below warning but i am unable to execute the app.

When I change the target platform to x86 it works fine can somebody tell me why it is happening because I want to keep target platform as Any CPU.

Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "ChilkatDotNet4", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. WindowsFormsApplication1


asked Feb 24 '13 at 12:51

Khurram's gravatar image


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 see this: http://www.chilkatforum.com/questions/1248/utilizing-32-and-64-bit-any-cpu-builds-in-vbnet

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 Feb 25 '13 at 08:27

chilkat's gravatar image

chilkat ♦♦

Thanks alot for the prompt support.


answered Feb 26 '13 at 15:16

Khurram's gravatar image


When you will release download for Mono to support .NET cross-platform? Approx release date?


answered Jan 11 '16 at 23:53

darshan's gravatar image


Is this what you are looking for? https://www.chilkatsoft.com/mono.asp

(Jan 12 '16 at 09:58) jpbro ♦

Thanks jpbro! Yes, please note the date of the post when reading any forum post. The comments above were posted in 2013. It is now 2016, so the comment about "Chilkat will be releasing..." is probably no longer true -- it is probably the fact that Chilkat has long since released it...

(Jan 12 '16 at 10:00) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Feb 24 '13 at 12:51

Seen: 10,105 times

Last updated: Jan 15 '16 at 09:09

powered by OSQA