调试时运行RunLocalServer.exe?

时间:2016-06-20 21:44:49

标签: .net arcgis esri

我只是想开始使用ESRI的ArcGIS runtime for .NET。

我有一个简单的hello-world应用程序,可以正常工作,将tile包加载到ArcGISLocalTiledLayer中:

<esri:MapView x:Name="MyMapView">
    <esri:Map x:Name="MyMap">
        <esri:ArcGISLocalTiledLayer ID="BaseMap" />
    </esri:Map>
</esri:MapView>

var basemapLayer = this.MyMap.Layers["BaseMap"] as ArcGISLocalTiledLayer;
basemapLayer.Path = @"E:\EsriMaps\MapPackages\MyMapData.tpk";

但是当我尝试将其更改为使用地图包时:

<esri:MapView x:Name="MyMapView">
    <esri:Map x:Name="MyMap">
        <esri:ArcGISDynamicMapServiceLayer ID="BaseMap" />
    </esri:Map>
</esri:MapView>

var localMapService = new LocalMapService(@"E:\EsriMaps\MapPackages\MyMapData.mpk");
await localMapService.StartAsync();

var basemapLayer = this.MyMap.Layers["BaseMap"] as ArcGISDynamicMapServiceLayer;
basemapLayer.ServiceUri = localMapService.UrlMapService;

我得到一个例外:

_HResult=-2147024894
_message=LocalServer start failed: executable not found.
HResult=-2147024894
IsTransient=false
Message=LocalServer start failed: executable not found.
Source=Esri.ArcGISRuntime
FileName=E:\dev\experiments\ESRI\HelloWorldMap\HelloWorldMap\bin\Debug\arcgisruntime10.2.7\localserver32\bin\RuntimeLocalServer.exe

我的bin \ Debug文件夹中有一个arcgisruntime10.2.7,但其中没有localserver32文件夹。关于为什么不这样做的任何想法?

我的C:\ Program Files(x86)\ ArcGIS \ Desktop10.4 \ bin中有一个RuntimeLocalServer.exe的副本,但不知何故我不认为我应该复制它手动

帮助?

1 个答案:

答案 0 :(得分:0)

事实证明这很简单。

ArcGIS运行时将Deployment.arcgisruntimemanifest文件放入项目中。如果你打开它,你将进入一个清单编辑器,允许你选择&#34;本地服务器&#34;作为要部署的软件包之一。