Search code examples
c#arcgisarcgis-serverarcgis-runtimearcgis-runtime-net

C#, How to configure LocalServer in ArcGISRuntimeSDK


I've tried every possible solution that crossed my mind. I keep getting:

System.InvalidOperationException: 'LocalServer start failed: executable not found.

When I call:

Esri.ArcGISRuntime.LocalServices.LocalServerEnvironment.Initialize();

I have downloaded and installed Local Server SDK and then Installed the NuGet package of LocalServices. I have also tried adding reference instead of NuGet. I have also read the official documentation. Nothing seems to work.

P.S. Also when I initialize the runtime sdk seems to work fine with:

Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize();

Solution

  • EDIT: I have solved the issue. Below are the steps on how to configure the SDK:

    1. Download and install the local server (take note of your version 100.x)
    2. Install NuGet package of Esri LocalServices (make sure it is exact version of local server)
    3. Add enviromental variable RUNTIMELOCALSERVER_100_X matching install directory of local server (where you replace X with your version)
    4. Call Esri.ArcGISRuntime.LocalServices.LocalServerEnvironment.Initialize(); and Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize(); in your App.xaml.cs and everything should work fine