Checking out a MG PR guide
Note: You can install the build for a PR like you would install MG regularly by finding the installer in the TeamCity artifacts, downloading it and running it. If you want to keep your installation at a specific version or if you intend to make changes, you should build from source.
First clone MonoGame (or your fork of it) if you don't have a local copy yet and clone the submodules
$ git clone https://github.com/MonoGame/MonoGame.git
$ cd MonoGame
$ git submodule update --init
Add the remote of the owner of the PR you want to try (I always use some short form of the users name for the remote name, jjagg in this case). You can see the name of the remote and the branch of a PR on GitHub at the top. For this one it says: "Jjagg wants to merge 25 commits into MonoGame:develop from Jjagg:mesh-builder"
$ git remote add jjagg https://github.com/Jjagg/MonoGame.git
Fetch the branch you want to build from that remote and check it out
$ git fetch jjagg mesh-builder
$ git checkout mesh-builder
Git may say that a submodule commit changed (not the case here). If that happens run
git submodule update to checkout the right commit for the submodules.
Run Protobuild.exe (in the MonoGame root folder) to generate the projects and solutions (on Mac/Linux do
- If the PR applies to the ContentPipeline (this case):
MonoGame.Framework solution for your platform, it will contain a project for the Pipeline Tool. Build the solution, set the Pipeline Tool project as the startup target and run. Build your content like you normally would, MGCB and Content.Pipeline from the solution will be used with the changes from the branch you checked out.
- If the PR applies to the runtime framework (I only made changes to Content.Pipeline, but I'm including this for completeness):
In the project you want to use this build with, add the MonoGame.Framework project for the platform you're targeting, delete the existing MonoGame.Framework reference on your project and add a reference to the MonoGame.Framework.[Platform] project you added instead. That's it! You can build and run your project.