Apache Geode By Example - From Zero To .NET Examples in 15 Steps

July 9, 2018 by Addison Huddy

Apache Geode Native is an Apache Geode client that has both C++ and .NET interfaces. Geode Native is set to make its first release as part of the Apache Geode 1.8 release later this year. Last week, I did a getting started guide for the C++ interface, now it’s time for some .NET.

  1. The video starts off by setting up a Windows Developer VM based on the Microsoft provided image.

  2. Once you have the image up and running, open Powershell as Admin and install Chocolately.

  3. We are going to need install git and clone the Apache Geode Native repo

    choco install git
    git clone [email protected]:apache/geode-native.git
  4. Inside the Geode Native repo, run install-dependencies.ps1 to install all build dependencies.

  5. Update VS2017 to include 2015 C++ Libaries using Visual Studio’s GUI installer. https://developercommunity.visualstudio.com/content/problem/48806/cant-find-v140-in-visual-studio-2017.html

  6. Download the latest Apache Geode Server Release

  7. Set Apache Geode Environment Variable. This let’s the system know where to find the Apache Geode Server.


  8. Open VS2017 cmd, configure the CMake build environment using the correct generator, and specify a install location

    cd <clone>
    mkdir build
    cmake .. -G "Visual Studio 14 2015 Win64" -Thost=x64 -DCMAKE_INSTALL_PREFIX=<path>

    I like to put everthing in my workspace, so C:\workspace\geode-native-install is what I’m going to be using for the rest of the post.

  9. Compile Geode Native

    cmake --build . -- /m
  10. Now, run CMake install

    cd <clone>
    cd build
    cmake --build . --target docs
    cmake --build . --target install

  12. Copy the examples directory to workspace using ths below Powershell command.
    Copy-Item C:\workspace\geode-native-install\examples -Destination C:\workspace\examples -Recurse

  13. Next, we will use CMake to configure and build the examples.

    cd C:\workspace\examples
    mkdir build
    cd build
    cmake .. -G "Visual Studio 14 2015 Win64" -Thost=x64
    cmake --build . -- /m
  14. In C:\workspace\examples\build, open the generated solution file in Visual Studio and build the example you are interested in.

  15. Back in the examples directory, run the startserver.ps1 powershell script to start the Apache Geode server.

  16. Lastly, use Visual Studio to run the built example. Don’t forget to run stopserver.ps1.

Hit me up on Twitter or in the comments below if you have any questions.

© 2018 | Addison Huddy