MonoGame 3.5.1有一个bug。明明已经using了Microsoft.Xna.Framework.Media还是会提示:The type or namespace name ‘XXXX’ does not exist in the namespace ‘MediaPlayer’ (are you missing an assembly reference?)

解决办法有两种

1.写全名称空间namespace:MediaPlayer该写成Microsoft.Xna.Framework.Media.MediaPlayer
2.将using Microsoft.Xna.Framework.Media 放在

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch
namespace XXXX
{
     //放在namespace内即可解决
     using Microsoft.Xna.Framework.Media;
     
}