I have been trying to include DirectX in C sharp project (Visual Studio 2010). I installed DirectX SDK and included the components as:
using Microsoft.DirectX;
using Microsoft.DirextX.Direct3D;
When I try to compile, I get the error: the type or namespace name 'directx' does not exist in the namespace 'microsoft'
Some blogs mentioned that I need to add 'reference' - Microsoft.DirectX under '.NET' tab. But I couldn't find it over there. Neither was any facility to add it to the tab.
Any suggestion will be highly appreciated.
This was deprecated a long time ago. The last Direct SDK that still has the managed wrappers is February 2010. The download is available here. You'll get to pick the references you are looking for after you install that one.
Better not to use it, no future, look at something like the open source SlimDX or SharpDX projects.
There are various reasons why a dll would not appear on the .Net tab.There is specific registry configuration that makes certain dlls to appear on the .Net tab.
Alternatively use the browse option to add the dll reference manually to your project.
Project >> Add Reference
This is the way to add reference for Directx
in C#
Program :
C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\
"
*usually this is the place of Directx
Files located. This can be change with the installation of .net
.DirectX
package. example :
(C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.dll)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With