I take my hat off to you Mr Valentine, this is excellent stuff indeed.
I do have a question though, the getting started guide gives an Desktop OpenGL project as an example and for me, that doesn’t work. I created a thread about it but perhaps it’s in the wrong place to get any response:
https://community.monogame.net/t/trouble-with-getting-started-guide-for-version-3-8-1-303
Also others, like myself may be wondering where on earth the UWP Core template has gone? I do at least have a quick workaround to convert the Xaml UWP game to a Core UWP game:
- Unload the XAML Project (to enable editing of the csproj file).
- In every property group, seek out the “DefineConstants” tag and include, “DISABLE_XAML_GENERATED_MAIN”, for eg:
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP;DISABLE_XAML_GENERATED_MAIN</DefineConstants>
This will stop the automatic creation of a Program class that will run the xaml.
- Reload your project and create a new class, “Program.cs” in the root. Type this code into that class:
using System;
namespace YOUR_NAMESPACE_HERE
{
/// <summary>
/// The main class
/// </summary>
public static class Program
{
/// <summary>
/// The main entry point for the application
/// </summary>
static void Main()
{
var factory = new MonoGame.Framework.GameFrameworkViewSource<Game1>();
Windows.ApplicationModel.Core.CoreApplication.Run(factory);
}
}
}
-
If you notice that there is no “Content” folder in your application, click on “Show all files” (top of solution explorer), open the “Content” folder that is actually there but not included in the application and right click on “Content.mgcb” and select “Include in project”. This should include the file and the parent “Content” folder in your project for you.
-
Optionally delete or “exclude from project” the files, “App.xaml” and “GamePage.xaml” (and associated child files).
-
Press F5 to see your Cornflower Blue screen running without any nasty Xaml in sight.