# Unknown error XNA cannot detect importer for “program.cs”

I am not too sure what I have done to cause this, but even after undoing all my edits, this error still appears

Error 1 Cannot autodetect which importer to use for "Program.cs". There are no importers which handle this file type. Specify the importer that handles this file type in your project. (filepath)\Advanced Pong\AdvancedPongContent\Program.cs Advanced Pong

After receiving this error, everything between #if and #endif in the program.cs fades grey

using System;

{
#if WINDOWS || XBOX
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
using (Game1 game = new Game1())
{
game.Run();
}
}
}
#endif
}


I have searched this and could not find a solution anywhere. Any help is appreciated.

• This is something for stackoverflow. It's not gamedev related. offtopic though: might I ask why you are checking if it's for xbox or windows...I mean if it's not, your program would never run anyways. – Sidar Nov 6 '13 at 8:24
• this is what XNA produces every time. I haven't touched anything in the program.cs file – Evan Nov 6 '13 at 8:50
• Is the Program.cs in the Content Project or in the actual code project? From the error, it sounds like it is in the content project. – user9790 Nov 6 '13 at 9:19
• @Jaako Wow... Thank you. Turns out there was a duplicate of the original file in the content project area, where all the images are. Much appreciated. How did you realise this? – Evan Nov 6 '13 at 9:28
• @EvanKohilas Well the error was talking about (content) importers, so I just guessed that the file was in the content project :) – user9790 Nov 6 '13 at 13:09