Select to view content in your preferred language

InvalidOperationException when using Linear Units

581
1
02-06-2019 05:23 AM
RyanMcpherson
New Contributor

Hi,

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
MichaelBranscomb
Esri Frequent Contributor

Hi,

RuntimeCoreNet.dll must be in a specific folder alongside your application executable - the structure is described here: https://developers.arcgis.com/net/latest/wpf/guide/deployment.htm.

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.

Cheers

Mike

0 Kudos