This one is a long story: i have recently built a win32 application in Visual Studio that uses DirectX and I sent it to some friends to verify that it works on other machines. They all had .NET installed, but the app didn't worked for all of my friends.
In tw开发者_如何转开发o cases there we're some "could not load file or assembly Microsoft.DirectX.DirectInput version 1.0.29..." errors when they tried to run the program.
I figured that they must have other versions of the .dll and, after some checking, i found out that my references we're to fixed versions. I changed the "fixed version" property to false to all of the directX dlls, but they still got errors when they tried to run the application.
Finally i tried to copy all the dlls in the same folder with the app and the directx errors were gone, but they instead got a "System.IO.FileNotFoundException the specified module could not be found" error at the line where the program tried to make a Direct3D.Texture from an image (the link to the image was correct).
If you can help me with hints for fixing any of the problems above, i would greatly appreciate it!
It looks like you're using Managed DirectX, and some of your friends probably don't have it installed. As far as I can tell, the redistributable package for MDX is not available anymore. (Not from Microsoft anyway, you might be able to find it somewhere)
Note that Managed DirectX is basically obsolete and in many cases XNA is a better choice.
If you're using ManagedDirectX than there's the Quick and Dirty way of fixing this problem. and thats just copying the ManagedDirectX dll's into the same directory. MS Says it won't work and it's definitely not very suitable for production envs. But it'll work in most cases.
DLL's are at least:
Microsoft.DirectX.Direct3D.dll
Microsoft.DirectX.Direct3DX.dll
Microsoft.DirectX.dll
Your issue might be resolved by now.
I too was experiencing the same issue for 2 days now and I finally resolved it. I tried out so many solutions that were suggested on the web but nothing worked for me. My project references another project which in turn was referencing Microsoft.DirectX.Direct3DX.dll. When I ran the project I got the exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DirectX.Direct3DX.DLL' or one of its dependencies. The specified module could not be found.
It turns out that this dll was searching for 'one of its dependencies' and couldn't find them since I didn't have DirectX installed on my machine. So the solution for me was to install DirectX.
Refer the following link for DirectX web installer: http://www.microsoft.com/en-in/download/details.aspx?id=35
I hope this helps others who face the same problem! :)
精彩评论