1

I am trying to use some classes from the Microsoft.DirectX.DirectInput namespace, in the past if there was a namespace I couldn't use in my project I would just go to references and add the file with that name to my project, except that I cannot find the file in the list.

How can I use this namespace?

UpTide
  • 307
  • 3
  • 13
  • Is [this](http://stackoverflow.com/a/9344002/939213) what you're looking for? – ispiro Feb 04 '15 at 19:39
  • I was able to find the DLL in the following directory: `C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0` Then I added that file to my project. Thank you! – UpTide Feb 04 '15 at 20:13
  • How do I add you as the answer? – UpTide Feb 04 '15 at 20:13
  • Since you actually solved it yourself - feel free to post your answer and accept it. Oh, and also: welcome to StackOverflow. – ispiro Feb 04 '15 at 20:19

1 Answers1

1

Found the answer at https://social.msdn.microsoft.com/Forums/en-US/2a08e16f-e05b-412e-b533-4b91f11db864/erorr-in-loading-directx-reference?forum=gametechnologiesdirectx101 Following the C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0 path, I was able to find the DLL I needed. Then just went to references > add reference > browse (the one at the bottom next to OK) then found the DLL.

UpTide
  • 307
  • 3
  • 13
  • 1
    Actually this DLL is making Visual studio hang on debugging. When I run the compiled exe outside Visual Studio it gives me this: `Unhandled Exception: System.IO.FileLoadException: Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.` So I suppose once I figure this out I will update the answer. – UpTide Feb 04 '15 at 22:08
  • Found something I thought was helpful: ,http://stackoverflow.com/questions/4018924/mixed-mode-assembly-is-built-against-version-v1-1-4322> but it just causes more problems for me `Managed Debugging Assistant 'LoaderLock' has detected a problem in [exe path]Project.vshost.exe Additional information: DLL 'C:\Windows\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.` – UpTide Feb 04 '15 at 22:28