Question:
VS 2015 was issuing a warning when I compiled my project:
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "ChilkatDotNet46, Version=9.5.0.52, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=x86", "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.
My solution includes three projects, (1) the main EXE, (2) a DLL, and (3) a test unit.
(1), the EXE, had "Platform target" set to "Any CPU" with "Prefer 32-bit" checked.
(2) and (3) were set to "Any CPU", but "Prefer 32-bit" was unchecked because it was disabled.
The EXE has a reference to "...chilkat-win32.9.5.0.60libnet461ChilkatDotNet46.dll", the 32-bit version of the library.
To avoid the warning, I changed Platform target to "x86" in all three projects. However, I'd rather use "Any CPU" with "Prefer 32-bit" checked to get the expanded address space that VS 2015 enables when "Prefer 32-bit" is checked. To use that, would we need a DLL for Chilkat that had /LARGEADDRESSAWARE?
Starting in v9.5.0.62, to be released soon, the /LARGEADDRESSAWARE linker option will be used for the VS2015 .NET 32-bit build.
Did you try the nuget package?
Instructions are here https://www.chilkatsoft.com/downloads_DotNet.asp
[Edit] Further looking at that, the instructions do tell you to use the Prefer 32-bit.
This does not work as described with 9.5.0.65. Compilation targetting "Any CPU", regardless of which of the two assemblies is used to compile with, yields this warning:
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(1820,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "ChilkatDotNet46, Version=9.5.0.65, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=AMD64", "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.
This shows up regardless the runtime-mode selection ("Prefere 32-bit"), which is irrelevant during compilation, but mentioned in case somebody gets tempted to ask.