Jump to content

  • Log In with Google      Sign In   
  • Create Account

Failed to load d3dx9_31.dll


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 kobingo   Members   -  Reputation: 174

Like
0Likes
Like

Posted 13 April 2007 - 12:27 AM

Hi! I'm currently creating a game with Game Studio Express and XNA Framework. On some peoples machine they get the following error: System.TypeInitializationException: The type initializer for 'Microsoft.Xna.Framework.Graphics.GraphicsAdapter' threw an exception. ---> System.IO.FileNotFoundException: Failed to load d3dx9_31.dll. Please verify that you have the XNA Framework installed. at Microsoft.Xna.Framework.Graphics.GraphicsAdapter.InitalizeGraphics() at Microsoft.Xna.Framework.Graphics.GraphicsAdapter..cctor() If they then download the DirectX 9 runtime again (from webinstaller) it works. Why? They all already had DirectX 9.0c and XNA Framework installed. I'm not using any of my own shaders (only using BasicEffect). Why do they have to update DirectX? If you want to try the game please mail me. Read more about my game at http://shmup.blogspot.com Thanks in advance!

Sponsor:

#2 Evil Steve   Members   -  Reputation: 1987

Like
0Likes
Like

Posted 13 April 2007 - 12:43 AM

d3dx9_*.dll are the D3DX runtimes. There's a new version of the DLL for each new version of the SDK released.

Basically, you need to package the DirectX redistributable with your app as well, so people can get the correct DLL version.

#3 kobingo   Members   -  Reputation: 174

Like
0Likes
Like

Posted 13 April 2007 - 01:02 AM

It's strange, because I dont have DirectX SDK installed (I only have Game Studio Express).

When I build my game with Game Studio Express, is it building with the DirectX version I currently have on my computer? Shouldn't it use the "default" dll's Microsoft is using with Game Studio Express?

I'm confused here...

#4 kobingo   Members   -  Reputation: 174

Like
0Likes
Like

Posted 13 April 2007 - 01:57 AM

Hmm, could it have something to do with that I'm building the game on my Windows Vista machine?

#5 Dranith   Members   -  Reputation: 481

Like
0Likes
Like

Posted 13 April 2007 - 02:25 AM

Evil Steve is correct, have them download and install the most current version of DX. Game Studio Express comes with the needed libraries, since under XNA is DirectX (iirc), which is why it works for you (unless of course you manually updated, or installed a game that did).

#6 kobingo   Members   -  Reputation: 174

Like
0Likes
Like

Posted 13 April 2007 - 02:35 AM

But people that had Game Studio Express installed had the same problem. Started to work after they upgraded DirectX.

#7 lancekt   Members   -  Reputation: 348

Like
0Likes
Like

Posted 13 April 2007 - 02:48 AM

You may also have had a game silently install a recent DirectX on your system. (Microsoft has been recommending this to developers, and I know for a fact at least one popular game does it. ;)
Orin Tresnjak | Graphics ProgrammerBethesda Game StudiosStandard Disclaimer: My posts represent my opinions and not those of Bethesda/Zenimax, etc.

#8 kobingo   Members   -  Reputation: 174

Like
0Likes
Like

Posted 13 April 2007 - 03:04 AM

When I'm building my game (compiling) does it use the current version of DirectX I have on that machine (even if it's not the DirectX SDK, just the runtime)??

#9 Dranith   Members   -  Reputation: 481

Like
0Likes
Like

Posted 13 April 2007 - 03:11 AM

No, it uses whatever version of the DirectX libraries XNA game studio comes with. The DirectX runtimes on your computer have nothing to do with actually building the game. I've not used XNA game studio, but it has to come with some form of the DirectX libraries (that also come in the SDK) since:

from http://msdn2.microsoft.com/en-us/directx/aa937793.aspx

Q: Is the XNA Framework different from Managed DirectX (MDX)?
A: Yes. The XNA Framework is a completely different set of technologies targeted at game developers. It does share similarities based on the fact that the underlying technologies are still based on DirectX.

Get them to update themselves (as it would be a good idea anyways), or package the newest DirectX redist with your game.

#10 ApochPiQ   Moderators   -  Reputation: 16414

Like
0Likes
Like

Posted 13 April 2007 - 03:11 AM

When you build your game, it will (by default) compile against the latest version of the SDK you have installed. (Unless of course you install a new one and don't update the project, but that's another matter.)

It sounds like you have a later version of the XNA framework, which your game was compiled against, and expects to have running. Contrary to popular misconception, DX9.0c is not the latest version of DirectX - there are many smaller updates, mainly involving the d3dx9_*.dll files. If you compiled against version _31, and your users only had, say, _30 installed, you'll get the behaviour you described.

Note that XNA is similar to the DX SDK in that it includes multiple versions of various DLLs; XNA is, in a manner of speaking, a DX SDK - it isn't the C++ SDK, but it's still an SDK that depends on DirectX, and has version updates of its own.

#11 kobingo   Members   -  Reputation: 174

Like
0Likes
Like

Posted 13 April 2007 - 03:21 AM

But so far, it exists only one version on XNA Framework, and that is 1.0 (the same goes with Game Studio Express).

#12 kobingo   Members   -  Reputation: 174

Like
0Likes
Like

Posted 13 April 2007 - 03:25 AM

Now that I think about it, I did upgrade Game Studio Express (for making it run with vista). Maybe Microsoft also upgraded it to compile against the new dll's?

That doesn't sound very good.

#13 Dranith   Members   -  Reputation: 481

Like
0Likes
Like

Posted 13 April 2007 - 10:14 AM

Yeah, shame on them for updating DirectX. =P

Anyways, a new update to the DirectX SDK was released this month, so your updated version of XNA Game Studio is probably using that (yes, I know you aren't directly using the DirectX SDK). Although, I believe that update uses d3dx9_32.dll?

It seems that XNA game studio even comes with the redist you would need, in:

Microsoft XNA\XNA Game Studio Express\v1.0\Redist\DX Redist

In that folder (in my install at least) is an OCT2006_d3dx9_31_x86.cab. So, maybe your friends installed something incorrectly, and if they ran DXSTEUP.exe in that folder should give them the needed dll.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS