none
DirectX fails to add references to VS 2010

    Question

  • After DirectX SDK (June 2010) I am still unable to add DX namespaces, e.g. using Microsoft.DirectX. There are no references to Direct X present in .NET or COM reference lists. I should do it manually probably, but I was unable to find a useful guide.

    System: Visual Studio 2010 (student license) + Windows 7 64bit. 

    Tuesday, October 19, 2010 4:07 PM

Answers

  • Hi Puqq,

     

    What you'll need to do is:

    1. Right-click on References folder, and select "Add Reference..."
    2. On the .NET tab, select the "Browse" button.
    3. Navigate to where you installed the SDK. (On my machine it is C:\Program Files\Microsoft DirectX 9.0 SDK)
    4. The files you are looking for should be in ".\Developer Runtime\x86\DirectX for Managed Code"
    5. Select the DLLs that you want (in this case Microsoft.DirectX.dll, Microsoft.DirectX.DirectInput.dll)

    Also, to make coding easier, don't forget to add this to the top (General scope, not within a Form or class) of your code:

    using Microsoft.DirectX

     

    See: http://social.msdn.microsoft.com/Forums/en-US/gametechnologiesdirectx101/thread/88311c18-cad6-4279-9a24-9728ddd8fba2 for more information

     

    CHEERS,

    Larcolais


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Larcolais Gong Tuesday, October 26, 2010 2:09 AM
    Thursday, October 21, 2010 3:20 AM

All replies

  • Hi Puqq,

     

    What you'll need to do is:

    1. Right-click on References folder, and select "Add Reference..."
    2. On the .NET tab, select the "Browse" button.
    3. Navigate to where you installed the SDK. (On my machine it is C:\Program Files\Microsoft DirectX 9.0 SDK)
    4. The files you are looking for should be in ".\Developer Runtime\x86\DirectX for Managed Code"
    5. Select the DLLs that you want (in this case Microsoft.DirectX.dll, Microsoft.DirectX.DirectInput.dll)

    Also, to make coding easier, don't forget to add this to the top (General scope, not within a Form or class) of your code:

    using Microsoft.DirectX

     

    See: http://social.msdn.microsoft.com/Forums/en-US/gametechnologiesdirectx101/thread/88311c18-cad6-4279-9a24-9728ddd8fba2 for more information

     

    CHEERS,

    Larcolais


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Larcolais Gong Tuesday, October 26, 2010 2:09 AM
    Thursday, October 21, 2010 3:20 AM
  • I'm also having this problem with additional issues :

    Although this adds the reference for the project it doesn't make the reference available in the .NET tab. And another problem is that although I have made Direct Input available, and my project compiles. It hangs when I call Manager.GetDevices(DeviceType.Keyboard, EnumDevicesFlags.AttachedOnly); The same code does not hang in VS2008Express.

    Saturday, December 04, 2010 3:01 PM