# Errors compiling XNA project Windows 8?

I'm using Visual Studio 2012 have just installed Windows 8 on my computer and tried to compile a game Im working on in XNA. When the game tried to build, I got the following errors:

• Error 12 Could not copy the file "C:\Users\Computer\Documents\Visual Studio 2012\Projects\WindowsGame1\WindowsGame1\WindowsGame1\bin\x86\Debug\Content\SkyDome\skycirrus01.xnb" because it was not found.
• Error 13 Could not copy the file "C:\Users\Computer\Documents\Visual Studio 2012\Projects\WindowsGame1\WindowsGame1\WindowsGame1\bin\x86\Debug\Content\Fonts\Arial.xnb" because it was not found.
• Error 14 Could not copy the file "C:\Users\Computer\Documents\Visual Studio 2012\Projects\WindowsGame1\WindowsGame1\WindowsGame1\bin\x86\Debug\Content\Fonts\ISOCP2.xnb" because it was not found.

skycirrus01.xnb is actually a .fbx. *Arial.xmb* and ISOCP2.xmb are my spritefonts within my project.

Prior to installing Windows 8 (store bought) my project compiled. Does anyone know how to convert these to .xnb files? I'm assuming that will make them compatible.

• As I've understood it, XNA is not supported under windows 8. It may work, but it's not supported. – Jari Komppa Nov 6 '12 at 6:27
• ..that said, this may help: codeproject.com/Articles/476349/… – Jari Komppa Nov 6 '12 at 6:31
• @JariKomppa XNA is supported under Windows 8. You can't use the new features of Windows 8 though (e.g. Modern UI). – Marton Nov 6 '12 at 7:48
• @marton I've been misinformed then. Ok. – Jari Komppa Nov 6 '12 at 7:58

I've got it to work now. I compiled it again and now my game is working. I'm assuming that the first compile of an XNA project will automatically fail after Windows 8 is installed. But recompiling your project again will fix it.

So the answer to if XNA works with Windows 8 installed is YES (but not as a Metro App).

• A rebuild just helped solve this error for me. – Xonatron Feb 17 '16 at 16:17

If you still struggle with this problem like me (I had this happen on moving to a new Windows 7 desktop), it can potentially be caused by Visual Studio mismatching the XML format of the content project when adding a new resource. If you go to the directory [Game]\[Game]Content\, you should see a [Game]Content.contentproj file. This can be opened with any basic text editor (notepad will do just fine). You will likely see a lot of lines that look something like:

<ItemGroup>
<Compile Include="Images\Story\Level7.png">
<Name>Level7</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>


Then, at the end, you might see where you tried to add the new content. It will look different, like this:

<ItemGroup>
<None Include="Images\Story\Level8.png" />
</ItemGroup>


Visual Studio may have written this line, but it sure doesn't know how to read it. The game will give you a ContentLoadException: File not found error when attempting to load the resource. Simply change the .contentproj file so that the new content loading sections matches the old sections and voila! When you reload it in Visual Studio, your content should load just fine.