I am using the following software to write the article. If yours differs your experience may be radically different; be warned.
- Visual Studio Ultimate 2013 Update 2 (12.0.30501.00)
- Windows 7 SP1
- Firefox 30
Installing via NuGet
NuGet is (from http://docs.nuget.org/) “a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework.” NuGet is available for Visual Studio 2010 and above, with some limitations. More information is available in the NuGet FAQ.
It really is quite nifty and a great way to resolve dependencies, as long as you’re aware of how to use it. In our case we’re going to be installing MonoGame v3.2.2 through the Package Manager Console. As always, step by step, it goes like this.
First, open Visual Studio 2013.
Second, click on Tools, then look for NuGet Package Manager about halfway down the menu, then click on Package Manager Console, as highlighted in the next screenshot.
This will open the Package Manager Console in your lower window section, as seen highlighted in red below.
The first thing we want to do is find the MonoGame package. To do so, click into the Package Manager Console and type the following command:
get-package -remote -filter monogame
A listing of known NuGet packages which have the word “monogame” in their description is returned, as seen in the next screenshot.
What is the difference between MonoGame, MonoGame-Portable, and MonoGame.Binaries? Well, MonoGame.Binaries is actually a dependency of MonoGame; as for MonoGame-Portal we’ll let the author answer that question over at StackOverflow.
We want MonoGame, v3.2.2 in this case. Before we can retrieve the package we need to open a solution for it to reside in. Either open an existing solution, or create a new Console Application project.
Click into the Package Manager Console and enter the following command to retrieve and install it.
This will retrieve the latest version of MonoGame available via the NuGet system. It takes a bit of time for the MonoGame team to package new versions and release them on NuGet so this may not always be the latest version, but it should be.
If you’re prompted to overwrite a file and you created a new project for this installation, choose Yes. Otherwise you’ll need to make the decision yourself.
At this point your project is prepared to use MonoGame.
Personally, I prefer the Visual Studio installation method. It’s more permanent and feels more complete.
Next is a classic “Hello, World!”