Sign in to follow this  
noxly

can't find Microsoft.Directx reference

Recommended Posts

I'm currently trying to learn C# using the Visual C# 2005 Express Edition Beta 2 and when i right click references to add Microsoft.Directx i can't find it i did install the latest SDK and still can't find it. If anyone can lead the way for me that would be great.

Share this post


Link to post
Share on other sites
Even though this solution isn't for Visual Studio 2005, it still might be worth reading through this.

I also found the following discussion from one of the www.codeproject.com tutorials. Again, it's a solution to Visual Studio 2003, but it still might work for you.

Quote:

can't find Microsoft.DirectX.dll and Microsoft.DirectX.DirectDraw.dll wassim suleiman 8:56 15 Mar '04


i installed the directx 9 and tried to add the refferance to
Microsoft.DirectX.dll and Microsoft.DirectX.DirectDraw.dll
but no such refferances
what shoud i do
any help i'll be thankful


The following two replies were given to this:

Quote:
Re: can't find Microsoft.DirectX.dll and Microsoft.DirectX.DirectDraw.dll Jack_Cai 5:00 12 Apr '04

I know I had some problems when trying to get DX9 working with VC#.net or VB.Net. I found a site which told me how to do it.

Unfortunately I can't find the site again, but I'm pretty sure this is how it said to do it.

Open up a command line (by using start-> run, type in CMD and click ok)
cd to c:\windows\assembly\GAC
CD into one of the Microsoft.DirectX folders
CD into it's version number folder
Copy the .dll file into c:\ or somewhere (to make it easier for later).
Do this for all the Microsoft.DirectX folders until you have all the DLL's
Copy all these dll's (using Windows Explorer is easiest) into your VS .Net 2003\Common7\IDE\PublicAssemblies folder

Then when you open up VS.Net you should be able to add references to DX9.

Good luck!


Quote:
Re: can't find Microsoft.DirectX.dll and Microsoft.DirectX.DirectDraw.dll justncase80 22:47 1 Jul '04

I tried looking where you were suggesting but I couldn't find the actual .dll's so I looked around and ended up finding them in this directory instead: C:\WINNT\Microsoft.NET\Managed DirectX\v9.00.1126
Then you can just add a reference to the appropriate .dll's in your project's reference area.

I did download the directX9 sdk at one point so I'm not sure if they were there before that or after... but there they are. I'm assuming it could be a difference between win2k and XP... then again the other guy could just have been wrong.

~justncase80


I hope that's of some help to you.

Share this post


Link to post
Share on other sites
You should look into registry with regedit... Search for key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders
There should be key like:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Current Managed DirectX 9.2

If there is no one, then you can add one... Data of this key should be a path to managed directx DLLs, e.g. C:\WINDOWS\Microsoft.NET\Managed DirectX\v9.05.132

Maybe installation did something wrong and didn`t put required registry key...

Share this post


Link to post
Share on other sites
Ok after a bit of clicking and reinstalling i found and added Microsoft.DirectX but now the only problem is i cannot find Microsoft.DirectX3D. I'm guessing since the tutorial is based on .net 2003 and i'm using 2005 beta if maybe its named something else? Here is what i find instead of Microsoft.DirectX3D. I see Microsoft.DirectX.Direct3D, and Microsoft.DirectX.Direct3DX, are either one of those perhaps newer .dlls? If either one of those will work in place of the DirectX3D let me know. Thanks in advance.

Share this post


Link to post
Share on other sites
There is no such file as Microsoft.DirectX.DirectX3D. If you need core Direct3D, use Microsoft.DirectX.Direct3D. If you need D3DX library, use Microsoft.DirectX.Direct3DX. You will probably need both anyway :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this