XNA SoundEffect ContentLoadException
Heine Wed, 2009/01/28 - 21:59
It took me about 10 minutes to find out why the code below for a SoundEffect throws a ContentLoadException:
explosionSoundEffect = Content.Load<SoundEffect>("filename");
Error loading "[filename]". File contains Microsoft.Xna.Framework.Media.Song but trying to load as Microsoft.Xna.Framework.Audio.SoundEffect.
To save you the trouble:
- Select the file
filename
in the Solution Explorer. - Go to its Properties tab.
- Set the
Content Processor
toSound Effect - XNA Framework
.
Done.
Comments
Thanks
Submitted by Anonymous (not verified) on Tue, 2009/03/17 - 19:12Thanks
I was really stumped. Thanks
Submitted by Anonymous (not verified) on Wed, 2009/09/02 - 19:25I was really stumped. Thanks for posting this.
Thanks! that looks simple but
Submitted by Aditya (not verified) on Wed, 2009/10/07 - 13:53Thanks! that looks simple but definitely a great help!