My colleague was installing the Windows Phone 7.1 SDK today and we received the following errors during installation plus a popup box that the bootstrapper had an exception:
Setup could not install the following components:
- Microsoft XNA game Studio 4.0 Refresh
- Windows Phone SDK 7.1 Extensions for XNA Game Studio 4.0
We retried installing the SDK after a full uninstall and a reboot but this wouldn’t help. This error kept appearing. In the end my idea was that we didn’t need XNA any time soon so we would just let this rest and see if everything was still working. Visual studio 2010 opened up fine, Blend was working All the templates for a phone project were there so everything seemed ok.
A few hours later when my colleague opened up an already made project from source control and tried to build the project she informed me that she was getting build errors so I had a look. The exception was
The Target “GetCopyToOutputDirectoryContentProjectItems” does not exist in the project
I never heard of this error before and checked if the project was still building on my machine. Ofcourse it was so the problem was somewhere in her environment. I didn’t immediately make the connection of the XNA installation failure but after some searching I found out that it had to do with some of the MSBUILD .target files that Windows Phone 7.1 projects use that have dependencies on the XNA Game studio.
Getting XNA Game studio installed properly seemed the solution so we tried to get that fixed. The solution is in getting the XNA studio installed without use of the bootstrapper that was crashing and Aaron Stebner made a good post on how to do that here.
Follow all the steps in Aarons guide (the file from step 9 didn’t exist for me so I skipped it) and after this the project would build again.
Everyone happy and back to coding Hopefully this post can help someone else when they run into the same problems as we did because we’ve spend to much precious time to fix this.
Geert van der Cruijsen