macOS

APSIM can be compiled using Microsoft’s Visual Studio Code. A single solution file exists in the root of the repository (ApsimX.sln). Building this solution will extract all 3rd party packages from NuGet and build everything. All executables will be built to the bin folder, but the exact output location will depend on how the solution is built (ie release vs debug). The default (debug) will cause outputs to be copied to bin/Debug/net6.0/.

  1. Install Visual Studio Code

  2. Once visual studio is installed, install the vs code c# dev kit extension.

  3. Install git and a git client, we recommend Fork.

  4. Install the .NET 6 SDK. The SDK can be found here for your specific operating system.

  5. Check that the SDK is installed by opening a terminal and running the command:

    dotnet --list-sdks
    
    • You should see at least one line that says:

      6.X.X
      
      • x is any number. The version numbers of a SDK may change over time.
      • There may be other lines with differing values. This is normal.
  6. Install GTK+3 and gtksourceview4

    brew install gtk+3
    brew install gtksourceview4
    
  7. Obtain the source code

    git clone https://github.com/APSIMInitiative/ApsimX
    
  8. Build and Run