Skip to main content

Hi

I am developing on a 64 bit machine and targeting a 64 bit server.  I am Visual Studio 2013 to develop K2 processes and have the following warning.

 

Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d", "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. C:Program Files (x86)MSBuild12.0inMicrosoft.Common.CurrentVersion.targets 1697 6 AxaUK.cK2.Processes.PackageProcessor

 

The project is configured for Release Build (Any CPU).  On my machine in the 3.5 framework assembly I have both the 32bit and 64 bit versions of SourceCode.HostClientAPI. In the XML behind the process I can see the folliowing,

 

<AssemblyReference>
<Guid>345f22e82b5041f9bd547d1cc90cfeea</Guid>
<ItemName>Reference</ItemName>
<ItemInclude>SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d</ItemInclude>
<AssemblyName>SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d</AssemblyName>
</AssemblyReference>

 

No mention here of which processor version to pick so why does it go for the x86 one?

 

The warning never causes any issues as I guess on the target machine it compiles the MSIL relevant to the server processor however it would be nice to resolve the issue.

Hi there,


 


The first thing to understand about this warning is that it is just a warning. It isn't hurting anything in your environment to just ignore it. This error was introduced in .NET 4.5 and is caused when you have "Any CPU" selected as your compatibility settings. I would not suggest that you change the compatibility settings as it is possible that some of our .dlls utilize x64 processing and there is the possibility that changin the compatibility settings might break something. If you want to stop seeing this error, the best method is to target .NET 4.0 rather than 4.5.


 


Ian


Reply