Mono buildpack for heroku, with the latest daily mono release.
C# console apps running on the latest mono version, which is built daily. Or: choose any version of mono (starting from 4.0.4*)
Note: If you're running on ASP, use Heroku's unofficial official buildpack instead: heroku/dotnet-buildpack.
You can still run webservers; self-hosting OWIN and NancyFx work perfectly. I recommend Nowin.
- Put a solution in the root directory of your app
- Use nuget to get dependencies
- Run
heroku buildpacks:set https://github.com/adamburgess/heroku-buildpack-mono
to set the buildpack - Optionally configure the version of mono using a
.mono
file - Add
mono ProjectName.exe
to your Procfile. Apps will be built into the root directory
Create a .mono
file to configure more options:
# put a tag name here that has a corresponding release to specify a version*
# omitting this will use the latest available mono version
MONO_VERSION=96e40c5793ff
# specify the build you want, either minimal (default) or full
# see below for explanation
MONO_TYPE=minimal
# if this is set, the cache is not used/cleaned.
# the cache is used to 1) store mono builds and 2) store nuget packages
MONO_CACHE=nope
- The latest version of mono is downloaded from the Releases
- NuGet dependencies are restored
- The solution is compiled using mono's
xbuild
(msbuild)
- Someone pushes to mono/mono
- Mono's CI server, Jenkins, compiles and runs the test suite for mono.
- A scheduled task checks Jenkins daily to see if a new build has completed and passed all tests.
- If it has, it creates a new commit in another project which makes Circle CI start building Mono.
- Once completed, it then creates a commit, tag, and release here, which is fetched by Heroku on building your app.
The builder creates two versions of mono:
- Full build. ~95mb slug size increase.
- Includes everything, including libgdiplus, boehm, libraries (e.g. for use in mkbundle).
- Minimal build. ~30mb slug size increase.
- Removes shared libraries, boehm, header includes, System.Windows.Forms
- libgdiplus is included
For most, the minimal build will work fine, and it is the default. Enable the full build if you need its resources or are having problems.
Create a pull request in adamburgess/heroku-buildpack-mono-builder changing the latest
file to the tag or commit that you want, and I'll merge and see that it builds successfully.