Apache Geode By Example - From Zero To .NET Examples in 15 Steps
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.
The video starts off by setting up a Windows Developer VM based on the Microsoft provided image.
Once you have the image up and running, open Powershell as Admin and install Chocolately.
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
Inside the Geode Native repo, run
install-dependencies.ps1to install all build dependencies.
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
Download the latest Apache Geode Server Release
Set Apache Geode Environment Variable. This let's the system know where to find the Apache Geode Server.
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-installis what I'm going to be using for the rest of the post.
Compile Geode Native
cmake --build . -- /m
Now, run CMake install
cd <clone> cd build cmake --build . --target docs cmake --build . --target install
Copy the examples directory to workspace using ths below Powershell command.
Copy-Item C:\workspace\geode-native-install\examples -Destination C:\workspace\examples -Recurse
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
C:\workspace\examples\build, open the generated solution file in Visual Studio and build the example you are interested in.
Back in the examples directory, run the
startserver.ps1powershell script to start the Apache Geode server.
Lastly, use Visual Studio to run the built example. Don't forget to run
Hit me up on Twitter or in the comments below if you have any questions.