Are there issues with running ArcGIS Runtime for .Net with Core 2.1, getting BadImageFormatException.

994
5
10-22-2018 09:19 AM
EdwardSon_
New Contributor II

Could not include Esri.ArcGISRuntime, Version=100.4.0.0 directly into .Net Core 2.1 project.  So went through standard .Net 2 class library, (i.e. made a class library to include the runtime, then referenced this standard library from the .net core web api project).  Compiles, but when run gives:

BadImageFormatException: Could not load file or assembly 'Esri.ArcGISRuntime, Version=100.4.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86'. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)

0 Kudos
5 Replies
dotMorten_esri
Esri Frequent Contributor

.NET Core is not supported.

0 Kudos
dotMorten_esri
Esri Frequent Contributor

Follow-up: The just-released v100.6 has support for .NET Core 3.0 (as a preview). It will however only run on Windows, and will require the .NET Core 3.0 Desktop packages.

0 Kudos
MohamadMousheimish1
New Contributor II

I'm trying to install Esri.ArcGISRuntime with a .net core 2.2 application. Is it not supported? Because whenever I install the nuget Package it throws an error

0 Kudos
dotMorten_esri
Esri Frequent Contributor

No. 3.1 and running on Windows as either a desktop or console app (not web ) is required

grainwave
New Contributor

Hi, is there any further update on this. I have installed esri.arcgisruntime 100.13.0

Previously was using .NET 5.0 and had the package loaded in a class library. However installing the package stated that it is only supported in .NET 6.0

Have upgraded to .NET 6.0 but gives an error that it cannot be loaded in a project with output type 'EXE'. I get this error despite not including it in the Web API project.

Note we are not using the API in the backend for loading any maps. We have been successfully using the JS api for this. We have also been successfully using the runtime in the backend for making requests to pull down objects. However it is only now we get the issue when trying to perform operations on the Geometry object. All we need to be able to do is calculate the area of the geometries that we are pulling down. Is there potentially a workaround for this if we cannot use the arcGisruntime in our product version?

0 Kudos