This happens every time I run my code. I’m not sure why it’s doing this. Do I need to change the Game1.cs properties so it will copy or something? please help. If you need the code I’ll post a like.
-Kwright02
Kwright02,
If you renamed your Game1.cs
or public class Game1 : Game
. Then you have to go into Program.cs
and change it from:
using System;
namespace MonoGame1
{
#if WINDOWS || LINUX
/// <summary>
/// The main class.
/// </summary>
public static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
using (var game = new Game1())
game.Run();
}
}
#endif
}
You have to change where it says “Game1” to the name of your class. This is because without this, your game has no main function, and therefore cannot run. To fix this, when MonoGame generates your project, it also generates this class which runs your game in a thread.
-Duphus