views:

104

answers:

2

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 two 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!

+1  A: 

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.

Steve Dennis
ok, thanks for the input! i will look into it!
cantrem
For the record, XNA replaced Managed DirectX, but it's **NOTHING** like it. XNA is a game framework, not a managed portal to directx.
Aren
@Aren B: I see your point. In this case, what would you propose for me to work with? I just started real programming and i'm still not sure which way to go first: there is DirectX, but there's also OpenGL, XNA as a framework, etc. (for the language i will definetly stick to C# for now) What would you say the best combination is?
cantrem
@cantrem SlimDX, I haven't played with it, but it's the spiritual successor to Managed DirectX. Gives you more direct access to DX vs. too many layers of abstraction.
Aren
A: 

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
the_ajp
Yea. Quick, but very dirty. And, in this case, it didn't worked (in my first post i wrote that another interesting error poped up when i made copies of the dlls in the app folder).
cantrem