473,382 Members | 1,523 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,382 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 2915

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: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.