Sign in to follow this  
drb2k2

Damn DirectX dll

Recommended Posts

drb2k2    122
Hi guys, I've spent ages making a nice 3d prog, but when i've come to create the installer for it it all goes pear shaped. Basically it works fine on my machine but as soon as it goes onto a different machine I get this.
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileLoadException: The located assembly's manifest definition with name 'Microsoft.DirectX' does not match the assembly reference.
File name: "Microsoft.DirectX"
   at STLFileExtents.ViewWindow.Render()
   at STLFileExtents.ViewWindow.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at STLFileExtents.ViewWindow.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = D:\Program Files\My ProgLOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===

LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///D:/Program Files/CRDM/STL Pricer/Microsoft.DirectX.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Build Number



************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
STLFileExtents
    Assembly Version: 1.0.1872.16123
    Win32 Version: 1.0.1872.16123
    CodeBase: file:///D:/Program%20Files/CRDM/STL%20Pricer/STLFileExtents.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 7.0.5000.0
    Win32 Version: 7.10.3052.4
    CodeBase: file:///c:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
Microsoft.DirectX
    Assembly Version: 1.0.900.0
    Win32 Version: 5.3.0000000.900 built by: DIRECTX
    CodeBase: file:///D:/Program%20Files/CRDM/STL%20Pricer/Microsoft.DirectX.DLL
----------------------------------------
Microsoft.DirectX.Direct3D
    Assembly Version: 1.0.2902.0
    Win32 Version: 5.04.00.3900
    CodeBase: file:///D:/Program%20Files/CRDM/STL%20Pricer/Microsoft.DirectX.Direct3D.DLL
----------------------------------------
System.EnterpriseServices
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------
System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.


I can't find anything on the net regarding this particular situation. Interestingly the folder that it installs to on my machine has no directX.dll in it at all. I do have two different classes that import DirectX though. Does anyone know how to get around this. Cheers DRB2k2

Share this post


Link to post
Share on other sites
Dave Hunt    4872
It looks like you have some version mixing going on. The Microsoft.DirectX.DLL that was referenced is version 1.0.2902.0. However, the version it found in your package is 1.0.900.0. You need to make sure that you grab the same version of each directx dll. If the versions don't match the version you referenced when building your project, you will get the error you got.

Share this post


Link to post
Share on other sites
drb2k2    122
aha, but therin lies the problem
When I do a detect dependencies in VS.net 2003 it lists both versions of the dx.dll as being needed. Then it complains that there are two files with the same name in the same target location. To get around this I put one into a new folder called DX that is created when the installation occurs. What happens though is that when the program runs it still looks in the main application folder for this dx.dll.
The strange thing is I can't see why it would need the older version of the dx.dll at all. I'm only using the Microsoft.DirectX and Microsoft.DirectX.Direct3D namespaces.

ahhhhhhhhhhhh unless,
Half the program was written a while ago, since then i've installed the october update, and written the second half. I wonder if its being a bit thick and adding both to cover the fact that one was written with the old .dll

I shall investigate.

Cheers
DRB2k2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this