Hello,
For my current projet (in .Net 4.8 - Visual Studio 2017), I chosen to develop a "Esri map" component in an another projet, with Visual Studio 2019.
I used "create project" window and I had select "ArcGIS Runtime WPF App (.NET) (Esri)".
But, I can't use this projet (.Net 5) in my main projet (.Net 4.8). I have modified .csproj file to replace "<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>" by "<TargetFramework>net48</TargetFramework>" but I have this error when i affect ArcGISRuntimeEnvironment.ApiKey :
System.InvalidOperationException
HResult=0x80131509
Message=Could not load ArcGIS Runtime (RuntimeCoreNet100_14.dll) or any of its dependencies. Make sure the "Microsoft Visual C++ 2015-2019 Redistributable" component is installed.
Source=Esri.ArcGISRuntime
Procedure call tree :
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.TryInitialize()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitNative()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitializeRuntimeCore()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.set_ApiKey(String value)
Internal exception 1 :
BadImageFormatException: Attempting to load an incorrect format program. (Exception from HRESULT : 0x8007000B)
I know this error is due to my modification but it says that the ArcGIS framework is available since the .Net Framework 4.6.1 .
https://developers.arcgis.com/net/reference/system-requirements/#wpf-requirements
.NET SDKs
- .NET SDK 6.0.201 or higher - .NET 6.0 Target Framework net6.0-windows10.0.18362.0 or higher
- .NET Framework 4.6.1 or higher
Have you an idea for my problem ?
Thanks !