Getting Source Code
Getting the Source Code
This page gives instructions on how to access the DotSpatial source code.
- We're providing the source in a way that is version system agnostic -- as a zip file -- and expect this to be the way most people get their copy.
- For those that want to pull the source frequently, but won't be contributing, SVN can be used.
- Consider using the forum or issue tracker to submit your first few patches
- But, we expect that anyone who is going to modify more than one file at a time is moving from "infrequent contributor" to "invested community member." We will be willing to add them as a developer and show them how to use TFS.
Downloading the source code Zip file
- Go to the Source Code tab
- Click Download under Latest Version. This will download a Zip file with the latest version of the source code (after you agree to the DotSpatial open source license)
- Alternatively, you can click on a the "Browse" link in that same "Latest Version" box. This will take you to a file and code browser for the full repository. That page shows a list of files and folders on the lefthand side and includes
another "Download" link that will also initiate a full download of a zip file of the full repository.
Contributing changes to the source code
If you want to contribute a small change to DotSpatial source code, for example a bug fix:
- Become familiar with common coding
- Create a new item in the Discussions or Issue Tracker
- Attach the C# source code file or code portion with your bug fix to the discussion entry (use
http://pastebin.com/) or issue description. The DotSpatial team will review your change and include it in the official source code
- Existing developers will test the code contributions and if appropriate integrate it with the source repository.
- After a developer makes 2 or 3 code contributions in this manner, then they can request code commit rights. The project coordinator(s) can decide to grant such rights based on feedback from developers and steering committee members.
All programmers, code contributions, testers, translators or documentation writers are welcome. Contact
: to be added to the project.
Getting the source code using TortoiseSVN
If you are interested in having an up-to-date version of the source code without re-downloading it every time, then you should use TortoiseSVN. The following instructions show how to obtain DotSpatial source code using TortoiseSVN.
- Download TortoiseSVN from http://tortoisesvn.net/downloads.html
- Create a new folder (for example C:\dev\DotSpatial)
- Right-click on the folder in Windows Explorer and select SVN Checkout.
- Enter URL of Repository: https://dotspatial.svn.codeplex.com/svn
- Click OK
- The latest source code files will be downloaded to the local folder.
To get an up-to-date version next time, right-click on the DotSpatial folder in Windows Explorer and select "SVN Update". This will only re-download the files that have been changed and make your local copy of the source code up-to-date.
Contributing changes to source code using TortoiseSVN
we only recommend using TortoiseSVN for contributing very small changes (changes to one file). If you plan to contribute larger changes, please use Team Foundation Server (TFS) instead. In order to contribute your source code changes using TortoiseSVN
you must have the developer privileges on dotspatial.codeplex.com. You can obtain the developer privileges by creating a codeplex user name and password and then sending your user name to the project manager (user: danames).
- Make a change to a file using Visual studio
- Check that the solution or project still builds
- The file is marked by a red icon in Windows explorer
- Right click on the file in Windows explorer and select "SVN Commit"
- Enter your codeplex user name and password if required
- Enter a short description of your change
- This will upload your change to the codeplex.com DotSpatial source code repository.
Getting the source code using TFS
In order to have access to the source code using TFS (Visual Studio Team Foundation Server) you must have the developer privileges on dotspatial.codeplex.com. You can obtain the developer privileges by creating a codeplex user name and password and then sending
your user name to the project manager (user: danames). The following steps show how to access source code in Visual Studio 2010 Professional version. You may also use the free
Microsoft Visual Studio Team Explorer 2010
Step One - Set Up your Credentials
Step Two - Connect to Team Foundation Server in Visual Studio
- In the Start menu of your computer go to Control Panel - User Accounts and Family Safety -
Credential Manager (you can also start the credential manager by typing "Credentials" in the
- In the Credential Manager select Add a Windows credential
- In the Internet or network address field enter tfs.codeplex.com
- In the User name field enter snd\YOUR-CODEPLEX-USER-NAME_cp For example if your codeplex user name is joedoe, then you should enter snd\joedoe_cp
- In the Password field enter your codeplex password.
- Click OK. This will store your credentials for accessing the source code using TFS.
1. Open Microsoft Visual Studio
2. Select Connect to Team Foundation Server
3. Use the connection details on the Source Code tab. For example:
Server Name: tfs.codeplex.com
Port number: 443
Project Collection: TFS03
Project Name: dotSpatial
4. In Visual studio you will see a Team Explorer
panel. Double Click on
5. This will open the Source Control Explorer
in the main window.
6. If the Local Path description is "Local Path: Not mapped
", then click on
and select a local folder on your computer for the DotSpatial source code files. For example, you can select the folder C:\dev\DotSpatial on your C: drive or J:\DotSpatial on your J: drive.
(note: you can change this local path later in Visual Studio by going to File - Source Control - Workspace - Manage Workspaces - Edit)
7. Click Yes
on the Do you want to get $/dotSpatial now? message.
8. This will download the latest version of DotSpatial source code to the local folder on your computer.
9. To open the DotSpatial solution: In Source Control Explorer
, scroll down and double click on
. This will open the solution in the Solution Explorer
. Notice the "Padlock" icon next to each file. This icon indicates that the file is under source control.
Contributing changes to source code using TFS
1. After you made a change to any of the source files, the "Padlock" icon changes to a "Red check mark" icon.
2. In the Source Control Explorer
window, right click on dotSpatial
Check In Pending Changes...
Enter a comment describing your change. Click
to confirm. This will send your changes to the DotSpatial.codeplex.com source code repository.