Build Environment - KSP-CKAN/CKAN GitHub Wiki
Getting Started
If you want to help us by contributing code, great! The CKAN is coded using C#, targeting the latest Mono. Free tools exist for all the major platforms:
Ubuntu / Linux
Install the package mono-complete
to build CKAN.
If you are looking for a nice IDE, you can try installing monodevelop
. If you aren't using the IDE, you will probably need to separately install the NUnit interface package nunit-console
and nunit
.
Note: If the ICSharpCode.SharpZipLib library gives errors and there is something about 'CodePage 437 not supported', then you need to install internationalization packages, such as libmono-i18n-west4.0-cil
.
After setting up your development environment, you should look at Building CKAN.
Windows
First, you will need an IDE. Some common (and free) choices are:
It's also essential that you install NUnit to be able to run the test suites.
If you are using Visual Studio Community or happen to have access to a license for Visual Studio Pro, ReSharper is very nice to have (a free license can be requested for open source projects).
If you just want to build CKAN for yourself, without installing an IDE, you can install the Visual Studio Build Tools (scroll down to Tools for Visual Studio
, select Buildtools for Visual Studio
).
In the installer, select .NET Desktop-Buildtools
(and maybe you'll need .NET Core-Buildtools
too), as well as both the components mentioning NuGet
.
Mac
The simplest way to begin CKAN development on macOS is with Visual Studio for Mac, from the Xamarin project.
- Download Visual Studio for Mac.
- Open the .dmg file you downloaded, and run the "Install Visual Studio for Mac" app.
- When prompted for which platforms to install, the only platform required to build the CKAN client is ".NET Core + ASP.NET Core". All others can be deselected.
Building in the IDE
Once the installer has finished, launch 'Visual Studio.app', then hit the "Open..." button to open an existing solution, and navigate to the CKAN.sln
file in the CKAN repository. Once the project has opened, you can build an run different parts of the CKAN project separately, or build the whole thing by selecting appropriate projects in the browser in the left pane.
Building from a command line
Once Visual Studio has been installed, it can also be used to build the CKAN project from a command line. In a Terminal window, navigate to the root CKAN folder, and run ./build
.