Search code examples
c#visual-studiovideoxna

There is no Video class in VS 2013? - C#


I have included the Microsoft.Xna.Framework.Media in my project, and yet I get an error message when I try to create an object of the Video type "The type or namespace Video could not be found". I have looked in the documentation and both what I found do not help :

  1. A solution states to use Microsoft.Xna.Framework.Video, which does not exist at all for VS 2013.

  2. And in the original Microsoft documentation on Microsoft.Xna.Framework.Media, apparently in here, Video is indeed a class that should be existing in the library included.

What to do? I have to include a bunch of videos in my project.


Solution

  • Check your project .net version possibly due to a different version of the library you can not use it. Try to change .net version of your project. Or try this https://msxna.codeplex.com/releases

    The problem here is in the .Net Framework version, using anything but .Net Framework 4.0 does not include the Microsoft.Xna.Framework.Video assembly reference, simply switch from your current project version to 4.0, and the video class should work just fine.