This blog is no longer updated please visit http://www.createdbyx.com/ instead.

Monday, May 31, 2004

Missing DirectX references under the "Add References" dialog?

After installing the DirectX 9 SDK some people could not see any of the managed DirectX assemblies/DLL's under the the "Add References" dialog. Which meant that they had to try and reinstall the DX9 sdk again. Uuugghh! Or they had to do what I was doing, which was to put all of the managed DX9 assemblies into a folder like "c:\dx9\" and manually navigate to that folder to add a reference to the assenblies.

Well a better solution has just come to my attention!

1: First open Regedit(Start | run | "Regedit").
2: Then navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders\" and right click the "AssemblyFolders" Icon and select New | Key and name it "DirectXAssemblies" or whatever you like.
3:Now go to the "DirectXAssemblies" folder and double click the "(default)" key and and type in the path to your managed DirectX assemblies/DLL's: should be something like "C:\WINDOWS\Microsoft.NET\Managed DirectX\v9.00.0900"

Now fire up a new instance of VS.NET, start a new project and open up the "Add References" dialog and presto! You should see all of the Managed DirectX assemblies in the list.

Also note that you can do this multiple times and specify multiple folders!

I can't take credit for finding this out, all the credit goes to out to ThePentiumGuy.