473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2916

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: kastillo | last post by:
Im trying to install directx 9.0 c , but i simply cant . When i run the installer it just says " The installed components are ready to use". This is the report on directx.log : 09/10/05...
1
by: cprog84 | last post by:
I'm getting the following error when I run the mostly unmodified DX SDK texture tutorial code in SharpDevelop: System.NullReferenceException: Object reference not set to an instance of an...
6
by: ammd | last post by:
Hi, I installed Microsoft DirectX 9.0 SDK (Summer 2004) but when I create a project and try to add the necessary references I can't find them. Does anybody know where to look for them? BTW, I have VS...
4
by: Junaid Hussain | last post by:
Hi, I am thinking about developing a 3D pool game in C# using DirectX, however when I compile a C# at the command prompt using; csc PoolGame.cs , I get the following error message; The type or...
9
by: Mike P | last post by:
Problems, problems... Im trying to create DirectX Projects within C# and to also look at the latest DirectX C# Samples. I have just installed MS Visual C# .net Standard Edition on my Windows...
14
by: Jessica Weiner | last post by:
I am writing an application in C# which need to plot graphs and simple shapes (polygons, circles, squares etc). Which library is better for this purpose and why? Thanks.
1
by: John230873 | last post by:
I am getting this error when I try to compile The type 'Microsoft.DirectX.Direct3D.Device' exists in both 'c:\WINDOWS\Microsoft.NET\DirectX for Managed Code\2.0.0.0_x86\Microsoft.DirectX.dll' and...
0
by: Jovo Mirkovic | last post by:
Hi, Any Windows action which minimizes all windows (win + D, ctrl + alt + del) is causing program error I have two forms: Form1 is shown on primary monitor on dual head graphics display
5
by: Vibhesh | last post by:
I am facing problem with TimeSpan structure when DirectX is used. Following is the sample code that causes the problem: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.