官术网_书友最值得收藏!

Setting up your environment

In order to start building an ArcGIS Runtime app, you will need the following IDEs and toolkits:

  • Visual Studio 2015
  • ArcGIS Runtime SDK for .NET 10.2.7
  • MVVM Light

Visual Studio

First things first, we will be using Visual Studio 2015. You can download an evaluation version or the community version of Visual Studio 2015 for free from Microsoft. Here are the instructions for the community version:

  1. Navigate to https://www.visualstudio.com/products/free-developer-offers-vs.aspx.
  2. Click on Download under Visual Studio Community. This step will download a small installation program called vs_community_ENU.exe.
  3. Run vs_community_ENU.exe.
  4. Click on I agree to the License Terms and Privacy Policy.
  5. Change the installation path if you want to, and decide whether you want to join the VS Experience Improvement Program.
  6. Click on Next.
  7. Click on the optional features. You can uncheck Microsoft Server data tools, Microsoft Web Developer Tools, and Silverlight Development Kit.
  8. Click on Install.

The installation will take several minutes to complete. With the community version, you will be prompted to create an account. Follow the instructions. You will also be asked to create a Visual Studio Online site, and optionally, whether you want to create a Team Foundation Server or Git site.

ArcGIS Runtime for .NET SDK

In this book, we will be using version 10.2.7. To create an ArcGIS Runtime app, you will need to perform the following steps:

  1. Navigate to the site https://developers.arcgis.com/net/.
  2. Click on Sign In.
  3. Below the Sign In textbox, you will see a link named Sign up for free., as shown in the following screenshot.
  4. Fill in your name and e-mail address. An e-mail will be sent to your account. Follow the instructions in the e-mail.
  5. Once you've followed all of the instructions, you will now be able to download ArcGIS Runtime.
  6. Navigate back to https://developers.arcgis.com/net/, and click on the large Download SDK button:
  7. Once the download is complete, you can run the installation program. First, you need to tell it where to unzip to. In my case, C:\DevTools\ArcGIS 10.2.7 was chosen, as shown in this screenshot:
  8. Next, you will be taken to another screen once the extraction has finished. Click on Close. Make sure Launch the setup program is checked.
  9. On the Welcome screen, click on Next >. You will be taken to the License Agreement screen.
  10. Click on I accept the license agreement, and then click on Next >.
  11. You will then be taken to the Select Features screen, as shown in the following screenshot. Click on Change… to change the path if you wish. I've chosen C:\DevTools. Click on Next >:
  12. Now you will be taken to the Ready to Install Program page. Click on Install. This step will take several minutes.

If version 10.2.7 is no longer available on Esri's site, you can use NuGet to install it from Visual Studio with the NuGet Package Manager Console, as shown here:

Install-Package Esri.ArcGISRuntime –Version 10.2.7.1234

For more details, refer to https://www.nuget.org/packages/Esri.ArcGISRuntime/.

MVVM Light

Now that you have Visual Studio installed, you need to install MVVM Light. MVVM Light will be explained in the next chapter. Follow these steps:

  1. Close Visual Studio if you have it open.
  2. Navigate to https://mvvmlight.codeplex.com/ and click on the download tab.
  3. Download MVVM Light for VS 2015. This toolkit is a Visual Studio extension that will allow you to use MVVM light in Visual Studio. The extension of the file is vsix.
  4. Run it by double-clicking on it.
  5. Once you run the installer you will be prompted to install it. Click on Install.
  6. Click on Close when completed.

Sample code

Throughout this book, we're going to build many apps to illustrate the concepts using step-by-step instructions. To aid you in performing these steps, this book comes with sample apps, which you can download from GitHub by following these steps:

  1. Navigate to https://github.com/rvinc66/ArcGISRuntimBook.
  2. Click on Download ZIP on the right-hand side of the page to download the source code.
  3. Unzip the file to your C:\ drive. This step will create a directory named ArcGISRuntime-master.
  4. Simply rename this directory ArcGISRuntimeBook.
  5. Inside the ArcGISRuntimeBook folder, you'll find a solution file (ArcGISRuntimeBook.sln).

This solution contains all the projects used in this book. Throughout the rest of this book, you'll find projects with chapter names, such as Chapter2, and Chapter2A. You can either follow the steps yourself to build your own projects or open a project that comes with these samples in the code you just downloaded. To run a particular sample, right-click on it and click on Set As Startup Project, and then run it.

主站蜘蛛池模板: 五家渠市| 惠安县| 穆棱市| 改则县| 桐梓县| 浠水县| 辽阳市| 轮台县| 衡南县| 呼图壁县| 阜南县| 延长县| 分宜县| 临城县| 湘潭县| 庆阳市| 龙岩市| 肥城市| 蒲江县| 石柱| 缙云县| 梓潼县| 双流县| 南部县| 博乐市| 额敏县| 凤山市| 遵化市| 朔州市| 松原市| 东光县| 深泽县| 呼和浩特市| 射阳县| 海林市| 柏乡县| 凤庆县| 龙州县| 峡江县| 阿拉尔市| 黄平县|