Apsim may be built with the .NET SDK - currently version 3.1 is required. When building the solution, assemblies for all projects will be compiled to the bin/ directory. The exact location of a given file will depend upon how it is built - e.g. debug vs release configuration.
Install required packages
Obtain source code
git clone https://github.com/APSIMInitiative/ApsimX
Build the solution
dotnet build ApsimX.sln # (debug mode) dotnet build -c Debug ApsimX.sln # (debug mode) dotnet build -c Release ApsimX.sln # (release mode)
The outputs may be found under ApsimX/bin. If built in debug mode, they will be in
bin/Debug/netcoreapp3.1/. If built in release mode, they will be in
The entrypoint program for the user interface is called
The CLI has two “main” entrypoints -
Models may be used to run .apsimx files.
apsim accepts multiple verb arguments, but
apsim run will function identically to an invocation of
When running apsim:
System.DllNotFoundException: Unable to load shared library 'sqlite3' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libsqlite3: cannot open shared object file: No such file or directory
This error can occur on Debian (and its derivatives) when the sqlite3 package is installed. This package typically provides a file named
libsqlite3.so.0 or similar, but apsim is looking for
libsqlite3.so. This file is provided by the
libsqlite3-dev package, so installing this package should fix the problem. Otherwise, creating a symlink to
libsqlite3.so should also fix the problem.
When attempting to install apsim from our binary package:
E: Unable to locate package dotnet-runtime-3.1
This package is not included in the official Debian repositories. You will need to follow the instructions on this page to install the package from microsoft’s repositories.