InvalidOperationException when using Linear Units

02-06-2019 05:23 AM
New Contributor


I've been getting an exception whilst creating a simple app, and wanted an insight into what I'm doing wrong.

I've got a console app which just tries to retrieve a LinearUnit, in this case Miles. This is throwing an exception, about a DLL (RunTimeCoreNet.dll) not being found.

Using Dependencies.exe I was able to locate the problem with the reference being incorrect and expecting to be placed alongside the application.

Placing the required dll next to the Esri.ArcGISRuntime.dll fixes the exception, and fixes the error in dependencies.

I'm assuming this is a simple issue of some kind of my own end, and wondered if anyone could shed light on how to make this work.

I've attached the project for reference and reproduction, I've had to delete the packages to save space but they should download when the solution is opened.

0 Kudos
1 Reply
Esri Frequent Contributor


RuntimeCoreNet.dll must be in a specific folder alongside your application executable - the structure is described here:

There is also an `InstallPath` property on the `ArcGISRuntimeEnvironment` class. You can use this property to set the folder in which the `ArcGISRuntime100.X` is located.



0 Kudos