I have an application written with C# related to ArcGIS 10.5. Right now we need to upgrade to arcgis 10.6.1, but I need to recompile my source code and found a warning with the ESRI.ArcGIS.ADF.Connection.Local. Here is the warning message:
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "ESRI.ArcGIS.ADF.Connection.Local, Version=10.5.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, 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.
I have no idea how to fix this problem. Anyone has the same issue? Thanks!
Jin
Hi Jin,
Open Configuration manager (right click on solution). Check project and solution platforms. If your project platform Any CPU, so your solution platform must be Any CPU or Mixed Platforms.
Gintautas,
Thank you for your reply. I set both as Any CPU. I think the problem is the
library ESRI.ArcGIS.ADF.Connection.Local does not exist in 10.6.1. The
runtime still uses versioin 10.5. which created the warning and caused a
problem - the SHAPE feature cannot insert into database. The other features
such as thumbnail are fine to insert into database. Only Shape feature has
a problem.
Jin
Dr. Jincheng Gao
4231 Suitland Road
Suitland, MD 20746
(301) 817-4755 (o)
On Fri, Apr 12, 2019 at 3:55 AM Gintautas Kmieliauskas <geonet@esri.com>
Jin,
Try to check properties of ESRI.ArcGIS.ADF.Connection.Local reference . Specific Version property must be set to False.
You can also check existence of ESRI.ArcGIS.ADF.Connection.Local library in C:\Program Files (x86)\ArcGIS\DeveloperKit10.6\DotNet folder.
10.7 has that library.
I did not find the library. There is a little difference with yours. I can
go to: C:\Program File(x86)\ArcGIS\Desktop10.6\COM. There is no ADF lib
there. Could you send me the lib? Thanks!
Jin
Dr. Jincheng Gao
4231 Suitland Road
Suitland, MD 20746
(301) 817-4755 (o)
On Fri, Apr 12, 2019 at 9:07 AM Gintautas Kmieliauskas <geonet@esri.com>
The path I added to previous reply is from ArcObjects SDK path. It must exist on your computer if you can compile yours library.
Your path is used for C++ or other COM based solutions.
ArcGIS and SDK version 2 first numbers must match. So 10.7 SDK library can’t be used with ArcGIS 10.6.x
Thank you for your reply! Sorry to delay reply as I worked on other
tasks.
I downloaded and installed ArcObject SDK 10.6.1 and found the ESRI library.
But I have a problem to use ComReleaser with the 10.6. I only found
ComReleaser object in ESRI.ARCGIS.ADF which is obsolete, but It suggests to
use ESRI.ARCGIS.ADF.Connection.Local assembly. I cannot find ComReleaser
object in ESRI.ARCGIS.ADF.Connection.Local. Do you have any idea to for
ComReleaser to refer ADF.Connection.Local. Thanks!
Jin
On Fri, Apr 12, 2019 at 10:14 AM Gintautas Kmieliauskas <geonet@esri.com>
Hi Jin,
We develop our application from beginning of ArcObjects and don’t use ComReleaser. We have our own utility for releasing COM objects.
Sorry, I can’t help you with ComReleaser.
Thanks for your reply!
Jin
On Fri, Apr 19, 2019 at 5:29 AM Gintautas Kmieliauskas <geonet@esri.com>