I created a new xna 3.1 project, and copied some source code from a document to the new project and was presented with that error. I have read that it is to do with namespaces, however the namespace is unchanged, and i honestly do not know what else to do. Help would be great.
The error is being underlined in the program.cs file:
using System;
namespace MyFirstWindowsGame
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
using (Game1 game = new Game1())
{
game.Run();
}
}
}
}
In the above source code, game1 is being underlined.
The error is telling you that the compiler can’t find the type
Game1. Depending on what exactly did you copy and how, you might need to copy the file containing theGame1class too or it’s possible the type is in another namespace.