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

"Ensure that DirectX SDK is correctly installed" *Resolved* by Noizu.biz
Darren Parker - MSFT
jcman
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
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
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.