using Microsoft.Samples.DirectX.UtilityToolkit

I just started working again on a game I had been writing and abandoned for quite a while. I have managed to get it working with the latest release of the SDK but now I have run into a problem trying to add a new UI.
Im am trying to add some of the the controls from the customUI tutorial that came with the SDK . I added "using Microsoft.Samples.DirectX.UtilityToolkit;" to my code but of course the compiler didn't reconize Microsoft.Samples...

After some googling I realized I had to include the files from
"Microsoft DirectX 9.0 SDK (October 2005)\Samples\Managed\Common" in my project. the problem is when I do this and try to compile I get dozens of errors such as

The namespace 'Microsoft.Samples.DirectX.UtilityToolkit' already contains a definition for 'SettingsDialogControlIds'

The namespace 'Microsoft.Samples.DirectX.UtilityToolkit' already contains a definition for 'SettingsDialog'

etc.. etc...

What am I doing wrong im sure it is something very simple but my C# is rusty at best.
How can i go about accessing Microsoft.Samples.DirectX.UtilityToolkit from my app


Answer this question

using Microsoft.Samples.DirectX.UtilityToolkit

  • Prdkv

    Thanks for your reply, it turns out that there are two sets of files in the common folder. The normal files:

    dxmut.cs
    dxmutdata.cs
    dxmutenum.cs
    dxmutexception.cs
    dxmutgui.cs
    dxmutmesh.cs
    dxmutmisc.cs
    dxmutSettingsDlg.cs

    and then a second set prefixed with a "w"

    wdxmut.cs
    wdxmutdata.cs
    wdxmutenum.cs
    wdxmutexception.cs
    wdxmutgui.cs
    wdxmutmesh.cs
    wdxmutmisc.cs
    wdxmutSettingsDlg.cs

    Why are there two sets I am using the first set and everything seems fine.

  • mbauman

    Have you possibly added the files more than once

    Have you added a reference to a compiled DLL which maybe has those files included



  • Grisu

    Thank you, that clears it up for me.
  • Evgeny0

    Of you are using the Managed DirectX for .Net 2.0 beta (v2.0.900.0) then you use the ones beginning with w. If you are using the Managed DirectX for .Net 1.1 (v1.0.290x.0) then use the ones without the w



  • using Microsoft.Samples.DirectX.UtilityToolkit