473,714 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with C# and DirectX SDK

Hello all,

I have some C# code that implements calls to DirectX.DirectS ound. 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.Direc tX.DirectSound. Device();

raises the following exception

{"Could not load file or assembly 'Microsoft.Dire ctX, Version=2.0.900 .0,
Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5' or one of its
dependencies. The system cannot find the file
specified.":"Mi crosoft.DirectX , Version=2.0.900 .0, Culture=neutral ,
PublicKeyToken= 31bf3856ad364e3 5"}
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.Direc tX (2.0. ... ) as a reference to the
project, but this code would not compile, citing a duplication of
resources between Microsoft.Direc tX and Microsoft.Direc tX.DirectorSoun d
as follows:
1. Error 1 The type
'Microsoft.Dire ctX.DirectSound .BufferDescript ion' exists in both 'c:
\WINDOWS\Micros oft.NET\DirectX for Managed Code\1.0.2902.0
\Microsoft.Dire ctX.DirectSound .dll' and 'c:\WINDOWS\Mic rosoft.NET
\DirectX for Managed Code\2.0.0.0_x8 6\Microsoft.Dir ectX.dll' C:
\Documents and Settings\Owner\ My Documents\Proje cts\Patton Design\BL\GUI
\NGXSound.cs 63 53 GUI

and

2. Error 2 The type 'Microsoft.Dire ctX.DirectSound .Device' exists
in both 'c:\WINDOWS\Mic rosoft.NET\Dire ctX for Managed Code\1.0.2902.0
\Microsoft.Dire ctX.DirectSound .dll' and 'c:\WINDOWS\Mic rosoft.NET
\DirectX for Managed Code\2.0.0.0_x8 6\Microsoft.Dir ectX.dll' C:
\Documents and Settings\Owner\ My Documents\Proje cts\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 2941

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

Similar topics

7
36820
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 23:24:44: dsetup32: === SetupForDirectX() start === 09/10/05 23:24:44: dsetup32: DXSetupCommand = 0. 09/10/05 23:24:44: DXSetup: DSetupCallback(): Phase = 0, Steps = 0 09/10/05 23:24:44: dsetup32: DirectXSetupIsJapanese == 0 09/10/05 23:24:44: dsetup32:...
1
5547
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 object. at Microsoft.DirectX.Direct3D.D3DX.GetUnmanagedDevice(Device device) at Microsoft.DirectX.Direct3D.TextureLoader.FromFile(Device device, String srcFile) at TextureTutorial.Textures.OnResetDevice(Object sender, EventArgs e) in c:\Documents and...
6
7139
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 2002. Don't know if there's an incompatibility issue. Thanks.
4
9100
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 namespace name 'DirectX' does not exist in the class or namespace 'Microsoft' (are you missing an assembly reference?) Im not sure why it says this because I have DirectX 9.0 installed ??
9
7482
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 XP Pro PC and I then installed the full DirectX 9.0 SDK (Summer 2004) & then the latest DirectX 9.0 SDK (Feb 2005) Spent several hours doing all this but there are NO DirectX C# sample
14
2653
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
1556
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 'c:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.Direct3D.dll' C:\Documents and Settings\johnw\My Documents\Visual Studio 2005\Projects\example\example\example.cs This a a new application with only a couple of...
0
1417
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
2004
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: *************************************************************************************************************** { ........................... PrintTimeSpanProblem(); device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams); PrintTimeSpanProblem();
0
9168
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9068
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9009
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7942
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5943
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4462
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4715
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3155
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.