【问题标题】:Adding Microsoft.DirectX.DirectInput To Visual Studio 2013 Express for Windows Desktop将 Microsoft.DirectX.DirectInput 添加到 Visual Studio 2013 Express for Windows Desktop
【发布时间】:2015-04-04 11:25:30
【问题描述】:

我正在尝试使用 Microsoft.DirectX.DirectInput 命名空间中的一些类,过去如果有一个命名空间我无法在我的项目中使用,我只会去引用并将具有该名称的文件添加到我的项目中,除了我在列表中找不到文件。

如何使用这个命名空间?

【问题讨论】:

  • this 是您要找的吗?
  • 我能够在以下目录中找到 DLL:C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0 然后我将该文件添加到我的项目中。谢谢!
  • 如何添加你作为答案?
  • 既然您自己实际解决了这个问题 - 请随时发布您的答案并接受它。哦,还有:欢迎来到 StackOverflow。

标签: c# visual-studio-2013


【解决方案1】:

https://social.msdn.microsoft.com/Forums/en-US/2a08e16f-e05b-412e-b533-4b91f11db864/erorr-in-loading-directx-reference?forum=gametechnologiesdirectx101 找到答案 在C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0 路径之后,我能够找到我需要的DLL。然后只是去引用>添加引用>浏览(底部旁边的那个)然后找到DLL。

【讨论】:

  • 实际上这个 DLL 使 Visual Studio 挂起调试。当我在 Visual Studio 之外运行编译的 exe 时,它​​给了我这个: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. 所以我想一旦我弄清楚了,我会更新答案。
  • 发现了一些我认为有帮助的东西:,stackoverflow.com/questions/4018924/…> 但这只会给我带来更多问题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.
猜你喜欢
  • 1970-01-01
  • 2014-02-25
  • 2012-10-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-11-06
  • 1970-01-01
相关资源
最近更新 更多