I am having an issue with playing music using XNA, and this issue is only occurring on one computer. On this computer, I get the error message in the title when it tries to execute MediaPlayer.Play(someMusic). However (see below), the problem is independent from Visual Studio.
I have researched this as well as I can. Other people have had this issue, however none of the suggestions have solved my problem. The primary cause of this issue (at least for others) is having their Windows Phone connected and Zune running. Apparently it locks the media library. So let me say that:
- I do not / have never had my Windows Phone connected while coding XNA (do not have a developer-unlocked phone)
- As part of my attempt to fix this problem, I have uninstalled Zune completely, and the problem still persists.
Some of the other suggestions seem to revolve around settings in the Visual Studio environment, or issues revolving around the music file itself. To this, I can say that:
- I have already-built executables that contain this problem, executables which did not always exhibit this problem but which themselves have not been changed.
- These executables used to play music on the computer in question, but no longer do.
- These executable do play music on my other computers.
I am truly stumped. Here are some of the other things I’ve tried:
- Uninstalling every program from before the problem started to the present
- Registry cleaning
- Uninstalling and reinstalling Windows Media Player
I am running Windows 7 64-bit. One of the other computers that is not having this issue is also running the same OS.
It is frustrating because this computer is my chief development computer. It seems like something has been changed in some dark corner of this computer’s universe. Any suggestions are extremely appreciated.
After downloading the Windows Phone SDK 7.1 (released 9/28/11), my music functionality has been restored.