Share via


Using Azure SDKs with MonoGame

Note

This is a Sandbox project. The content in this article is unsupported, and therefore may be out of date or not in a working state. That said, we still think it was awesome enough to include here. Enjoy!

Get the source

Requirements

Compatibility

This has been tested with the following projects. Others may work, so please let us know if you've had success!

  • Windows
  • UWP
  • iOS
  • Android

Known Issues and Limitations

  • None

How to Use It

Because MonoGame uses the traditional .NET Framework and CLR on Windows, and Xamarin on other platforms, the existing .NET Azure SDK NuGet packages work as-is across all platforms. For example, to use the Azure Storage SDK, simply add a NuGet package reference to the WindowsAzure.Storage package as described below.

  1. Click the Projects > Manage NuGet Packages menu.

  2. In the NuGet Package Manager window, enter azure storage in the search box. The WindowsAzure.Storage package will appear.

  3. Highlight this package, then click the Install button on the right side of the window.

  4. Accept any license prompts, and the package will be installed.

nuget

With the package added, you can now use the Azure Storage SDK API (or the SDK you've chosen to install) in your MonoGame game as you would in any other .NET application. The Get the Source button above will link you to a variety of cross-platform MonoGame samples showing how to use the basic features of certain Azure SDKs.

Try the Samples

To use the sample, you will need to have an Azure account setup along with the service you wish to use.

  1. Download the MonoGame samples from GitHub.

  2. Unzip to a location on your hard drive.

  3. Navigate to that location and open the solution for the service you're interested in using, for example the AzureStorage.sln solution file in the Storage directory.

  4. Open Game1.cs from the Shared project in Solution Explorer.

  5. Fill in any required connection strings or keys at the top of the file. You can find your connection strings and keys in the Azure Portal.

  6. Build and run! Press 1, 2, 3, or 4 on your keyboard to test the associated API.