How to build SharpMap v2.0 locally

Required tools

  • Visual Studio 2005, Visual Studio 2008 and / or .Net SDK v2.0 or v3.5.
  • A Subversion client (TortoiseSVN, Visual SVN*, or good 'ol svn.exe)

Getting the code

Use your subversion client to download the latest source from the repository trunk at
If you are using svn.exe you can use the following command: svn checkout sharpmapv2-read-only
As part of the download process several required externals will be retrieved including NPack, GeoAPI and NetTopologySuite

optional to get all the code including any branches you can download from
note the trunk should pretty much always build - branches may not.

Building the code

Browse to the SharpMapv2vs2008.sln file in either the trunk or the chosen branch and open with vs. You may be prompted about enabling project macros where you should choose "open project normally".
Once open select a configuration e.g Debug_Net20 and a platform e.g AnyCPU
You can now build the code either from the vs menu or the keyboard shortcuts.

Which platform should I choose?

Usually you will want to use AnyCPU which generates platform agnostic msil, however certain modules require particular platforms.
For example in the JDSymbolizer branch the Cairo renderer requires x86 while the Direct2D renderer can be either x64 or x86 but must specified.
When the GDAL/Raster work is implemented it is likely it will require x86.

* Visual SVN is a supporter of the SharpMap project. Be sure to check out their excellent add-in to Visual Studio which makes working with Subversion a natural part of life in the IDE.

Last edited Dec 19, 2009 at 10:42 PM by JohnDiss, version 10