Install a development MonoGame build
Do you want to build your game with MonoGame’s latest and greatest develop branch? You don’t need to wait for official MonoGame releases.
Each time a new commit makes it into the MonoGame develop branch, new builds are automatically released to the MonoGame GitHub NuGet feed. To install them into a project, you can execute the following commands. Note that some of them can take some time to complete as large files are downloaded.
- Generate a Personal access tokens (classic): https://github.com/settings/tokens.
- Make sure that it has the
read:packagesscope.
- Make sure that it has the
- Add the MonoGame GitHub NuGet feed. Replace
USERNAMEwith your GitHub username andTOKENwith the generated access token from above:dotnet nuget add source -n MonoGameGitHub https://nuget.pkg.github.com/MonoGame/index.json --username USERNAME --password TOKEN - Find the version you want:You can also browse them at https://github.com/orgs/MonoGame/packages?repo_name=MonoGame.
dotnet package search MonoGame.Framework.DesktopGL --source MonoGameGitHub --prerelease --exact-match - From the folder with your game’s .csproj, install that version:
dotnet add package MonoGame.Framework.DesktopGL --version THE-VERSION dotnet add package MonoGame.Content.Builder.Task --version THE-VERSION - To install the matching templates:With that you will be able to use
dotnet new install MonoGame.Templates.CSharp::THE-VERSIONdotnet new mgdesktopgl -o MyGame.
You can repeat step 3 to 5 whenever you want to update.
Pass the version explicitly rather than reaching for --prerelease. The develop packages don’t share a numbering scheme with the releases on nuget.org, so --prerelease can resolve to the latest stable release instead of a develop build and leave you wondering why nothing changed.
If you want something newer than the last release without running the raw develop code, MonoGame also publishes preview packages to nuget.org under versions like 3.8.5-preview.7. Those you can install with --prerelease from the normal feed, no token needed.
To remove the GitHub source from step 2, you can do:
dotnet nuget remove source MonoGameGitHub
Read more
- Using the Development Nuget Packages
- Working with the NuGet registry
- Managing your personal access tokens
- dotnet nuget add source
- dotnet nuget list source
- dotnet package search