"Ensure that DirectX SDK is correctly installed" *Resolved* by Noizu.biz

I just downloaded C# Express, and then installed the DirectX SDK from February 2006, from Microsofts homepage
Then I loaded the Simple2D_2005 sample (running it from the sample viewer), and it worked as it should. Then I installed the samples source code, opened it in C# Express, but when I run it, I get the following msg:

"Could not find required media. Ensure that DirectX SDK is correctly installed"


I have tried to uninstall DirectX SDK, and reinstall it again, but I still get this error


Answer this question

"Ensure that DirectX SDK is correctly installed" *Resolved* by Noizu.biz

  • Darren Parker - MSFT

    Thanks, it works now :)

  • jcman

    Same thing here - I'm desperately need to be able to compile this 2005 Simple2D_2005 game, as a base to a new game, and I'm having the same problem. Would appreciate a quick reply on how to add a folder to a solution. Many Thanks! Yuval.
  • Amaan

    None of the above answers worked for me. I had to add the first line shown below to wdxmutmisc.cs, then modify the TypicalFolders string array as shown on the line below that:

    private const string Simple2D_Path = @"C:\Program Files\Microsoft DirectX SDK (August 2006)\Samples\Managed\Direct3D\Simple2D\media\";

    private static readonly string[] TypicalFolders = new string[] { CurrentFolder, MediaPath, Simple2D_Path, @"..\", @"..\..\", @"{0}\", @"{0}\..\", @"{0}\..\..\", @"{0}\..\{1}\", @"{0}\..\..\{1}\" };


  • j1rider

    There are easier options, The first is to have a look at the following article on Coding4fun, It takes you through setting up a basic template as well as laying out the common project for your application.

    One of the next Options is to have a look at my Pre made DirectX Templates based on the Sample Framework.



  • Zurk

    Im new to this as well . . . so im not sure the exact files you need;however, the problem is that the DirectX engine is being told to look for certain folders that are in your DirectX/Samples/Media directory.

    The solution to prevent those asinine "Ensure that DirectX SDK is correctly installed" messages is fairly simple.

    1. Make sure you copied the common directory and it includes ( I name mine directx_common . . . but thats just an organizational choice)

    dxmut.cs
    dxmutdata.cs
    dxmutenum.cs
    dxmuteexception.cs
    dxmutgui.cs
    dxmutmesh.cs
    dxmutmisc.cs
    dxmutsettingsdlg.cs


    (i.e any basic components you'll be using)




    2. copy the media file from DirectX( Month Year)/Samples/Media
    to your folder.



    3. Update this piece of code:

    dxmutmisc line 1977:

    private static readonly string[] TypicalFolders = new string[] { CurrentFolder, , @"..\", @"..\..\", @"{0}\", @"{0}\..\", @"{0}\..\..\", @"{0}\..\{1}\", @"{0}\..\..\{1}\" };

    by adding @"Media\"

    resulting in:

    private static readonly string[] TypicalFolders = new string[] { CurrentFolder, @"Media\" , @"..\",@"..\..\", @"{0}\", @"{0}\..\",@"{0}\..\..\", @"{0}\..\{1}\", @"{0}\..\..\{1}\" };






    Alternatively:

    You can also just create a string with the pathname to your directX install:

    // Constants for search folders
    private const string CurrentFolder = @".\";

    private const string DirectXMediaFolder = @"G:\Program Files\Microsoft DirectX SDK (December 2005)\Samples\Media";

    private const string MediaPath = @"Media\";

    and alter line 1977 to read

    private static readonly string[] TypicalFolders = new string[] { CurrentFolder, DirectXFolder , @"..\",@"..\..\", @"{0}\", @"{0}\..\",@"{0}\..\..\", @"{0}\..\{1}\", @"{0}\..\..\{1}\" };


    which is a useful hack if you want to quickly see what a change will do to your program, but arent commiting yourself to any major overhauls. And dont need to forward the project to anyone else.




  • daftest

    This usually refers to the sample framework files not being found. Make sure that the /Common folder is included in your solution. The /Common directory can be found at.
    Native DirectX Sample Framework
    C:\Program Files\Microsoft DirectX SDK (February 2006)\Samples\C++\Common
    Managed DirectX Sample Framework
    Drive Letter\Program Files\Microsoft DirectX SDK (February 2006)\Samples\Managed\Common

    I hope this helps.
    Take care.


  • JustJFe

    I am 2 days old with Visual Studio 2005. Is it easy for you to tell me how to add the C:\Program Files\Microsoft DirectX SDK (February 2006)\Samples\C++\Common to the solution I am trying out HDRFormats.exe and I am having the same problem when attempting to run the sample in MCE.

    thanks.



  • "Ensure that DirectX SDK is correctly installed" *Resolved* by Noizu.biz