471,605 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Problem with C# and DirectX SDK

Hello all,

I have some C# code that implements calls to DirectX.DirectSound. It
compiles under both VS .NET 2003 and VS 2005 and runs under VS .NET 2003
and VS 2005 on a Compaq laptop (Windows XP Home), a Dell Xeon
workstation (Windows XP Pro) and a Gateway GM 825 (Windows XP Media
Center). It also runs on the Dell and the Compaq under VS 2005, but
when I attempt to run the code under VS 2005 on the Gateway (Windows XP
MCE), I get errors when attempting to dynamically allocate legal classes
under DirectX 9.

Specifically, this call

soundDevice = new Microsoft.DirectX.DirectSound.Device();

raises the following exception

{"Could not load file or assembly 'Microsoft.DirectX, Version=2.0.900.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The system cannot find the file
specified.":"Microsoft.DirectX, Version=2.0.900.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"}
Just to repeat, this exception IS NOT RAISED when running on VS .NET
2003 OR VS 2005 on both the Compaq laptop and the Dell Xeon.

All computers have the December 2005 DirectX SDK installed.

I tried to add Microsoft.DirectX (2.0. ... ) as a reference to the
project, but this code would not compile, citing a duplication of
resources between Microsoft.DirectX and Microsoft.DirectX.DirectorSound
as follows:
1. Error 1 The type
'Microsoft.DirectX.DirectSound.BufferDescription' exists in both 'c:
\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0
\Microsoft.DirectX.DirectSound.dll' and 'c:\WINDOWS\Microsoft.NET
\DirectX for Managed Code\2.0.0.0_x86\Microsoft.DirectX.dll' C:
\Documents and Settings\Owner\My Documents\Projects\Patton Design\BL\GUI
\NGXSound.cs 63 53 GUI

and

2. Error 2 The type 'Microsoft.DirectX.DirectSound.Device' exists
in both 'c:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0
\Microsoft.DirectX.DirectSound.dll' and 'c:\WINDOWS\Microsoft.NET
\DirectX for Managed Code\2.0.0.0_x86\Microsoft.DirectX.dll' C:
\Documents and Settings\Owner\My Documents\Projects\Patton Design\BL\GUI
\NGXSound.cs 73 24 GUI

I've removed and reinstalled the DirectX SDK several times, but can't
remove this error.

I seem to recall that others have talked about certain situations where
the DirectX SDK installer doesn't allways correctly install the DirectX
framework. This may be one of those times.

Does anyone have a workaround or manual way to verify the install of the
DirectX SDK?

TIA

Harvey

Dec 26 '05 #1
0 2798

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by cprog84 | last post: by
4 posts views Thread by Junaid Hussain | last post: by
14 posts views Thread by Jessica Weiner | last post: by
reply views Thread by Jovo Mirkovic | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.