Saturday, October 15, 2005 12:52 PM
I've installed the DirectX 9.0 SDK and the runtime and can run the sample executables, but when I try to run the code in the edit or debug mode (using vb.net ver.2003) it can't find Microsoft.DirectX and Microsoft.DirectX.DirectInput namespaces. I verified it as having 9.0c using dxdiags.exe.
It does find DirectX 7 & 8 type libraries in the COM references section...
I expect to find the missing namespaces in the .NET reference sections.
Monday, October 17, 2005 5:34 PMHi K,
What you need to do is add the correct DLLs as references to your project. Since they are not in the list, you'll have to add them manually. I am assuming you are using the October SDK?
What you'll need to do is:
1. Right-click on References folder, and select "Add Reference..."
2. On the .NET tab, select the "Browse" button.
3. Navigate to where you installed the SDK. (On my machine it is C:\Program Files\Microsoft DirectX 9.0 SDK)
4. The files you are looking for should be in ".\Developer Runtime\x86\DirectX for Managed Code"
5. Select the DLLs that you want (in this case Microsoft.DirectX.dll, Microsoft.DirectX.DirectInput.dll)
Also, to make coding easier, don't forget to add this to the top (General scope, not within a Form or class) of your code:
Otherwise you'll have to fully reference everything.
Tuesday, October 18, 2005 2:46 AM
if the dlls don't appear when you browse to
where you installed them, you can try
(1) opening command prompt
(2) go to 'assembly\gac\' folder of your
current windows installation
in my case it is
(3) copy all the dll from all the microsoft.dir*
to your public assemblies folder
in my case
'c:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\PublicAssemblies'
next time you open the add reference dialog,
they should be there.
Friday, October 21, 2005 12:40 AMThanks again to dmcrews and thank you onishin.
It turns out that I had to open the cab files which were named appropriately. I figured that the autoinstall would have taken care of this.
Sunday, October 30, 2005 6:22 PMwhat did you have to do with the cabs I still have this problem
Tuesday, November 01, 2005 7:18 PMI'm having issues myself. The first suggestion doesn't work as I do not have those folders, the second suggestion doesn't work because it won't allow me to copy the files. I have DX 9.0c.
Wednesday, November 02, 2005 5:36 PMherriojr: Do you have .Net 1.1 installed? If .Net 1.1 is not installed the directX installer will not install the managed libraries. It will not work with .Net 1.0
Wednesday, November 02, 2005 6:40 PM
I might not have installed them in the proper order. I think I had the SDK before I had the 1.1 .NET framework. I've just deleted the DirectX 9.0 SDK first, installed the October Update, and then I realized that DirectX 9.0 SDK needed to be installed.
The libraries are now recognized, but now I'm having issues with TextureState and some other namespaces not being recognized. I'm actually trying to just run the Billboard demo to verify that things are working correctly before I start anything else. The libraries that it is pulling from are:
C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.dll
C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.Direct3D.dll
C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2908.0\Microsoft.DirectX.Direct3DX.dll
I am running Visual Studio .NET 2003 with the install order of:
DirectX 9.0 October Update
The errors I am getting are these:
c:\dxsdk\samples\c#\common\d3dfont.cs(40,13): error CS0246: The type or namespace name 'TextureState' could not be found (are you missing a using directive or an assembly reference?)
c:\dxsdk\samples\c#\common\d3dfont.cs(41,13): error CS0246: The type or namespace name 'TextureState' could not be found (are you missing a using directive or an assembly reference?)
c:\dxsdk\samples\c#\common\d3dfont.cs(42,13): error CS0246: The type or namespace name 'Sampler' could not be found (are you missing a using directive or an assembly reference?)
c:\dxsdk\samples\c#\common\d3dapp.cs(219,15): error CS0246: The type or namespace name 'SamplerStates' could not be found (are you missing a using directive or an assembly reference?)
c:\dxsdk\samples\c#\common\d3dapp.cs(220,15): error CS0246: The type or namespace name 'TextureStates' could not be found (are you missing a using directive or an assembly reference?)
I hope that's in depth enough for someone to know what's going on.
Wednesday, November 02, 2005 6:47 PM
Sorry about the weird text background color. It set it to that by default for some reason
Wednesday, November 02, 2005 8:52 PMBizzarre - there is no billboard sample any more. I think they removed it in the summer 2004 SDK. If you are running sample code from the previous (summer 2003) sdk then it won't work against the latest MDX DLLs becuase there have been breaking changes.
Try running the samples that came with the october SDK from the sample browser
Thursday, November 03, 2005 2:50 PMThe only issue with that is that there are no C# examples with the October Update that I can seem to find. The reason this is important is because I'm doing an Independant Study on 3D Graphics Programming, and my professor wants me to do it in C# because he plans on using what I teach him to teach future classes who are going to be learning C# as the initial programming language in the future. Otherwise, I would just go with C++ because I can get that to work and have previously.
The issue is the whole naming convention. Because it is called the October Update, is there any other version of the SDK that needs to be installed beforehand? If not, then the place I screwed up on is the fact that I installed the Directx 9.0 SDK, which probably came in 2003 because I thought the October version was only an update to certain mechanisms.
Thursday, November 03, 2005 8:14 PMThats odd the OCtober SDK comes with plenty of c# samples. Run the 'Microsoft DirectX SDK (October)/Sample Browser' from the start menu or run to C:\Program Files\Microsoft DirectX 9.0 SDK (October 2005)\Samples\SampleBrowser\SampleBrowser.exe
Others have noticed that its called an update and got confused. It is an update from the last time, generally minro changes. However they include everything in the SDK so you don't need to install any previous versions - in fact you can safely uninstall any previous versions without issue.
If you installed the October SDK though the worst tht should happen is you have 2 SDKs on your machine - I have 4 on mine right now. You get a bigger choice of assembly versions when you add references but that it all.
Don't forge don't use the directX.dll that has a version number starting with 2 - thats the beta of the .Net 2.0 stuff and its pretty broken.
Friday, November 04, 2005 4:38 AM
Ah, ok. When I was rummaging around the folders inside the October SDK folder, the first couple managed sample folders I opened were VB, so out of idiocy, I assumed the rest were VB. After taking so many logic courses, I should have known better.
It's nice to know about the sample browser :)
Thanks for clearing up my discrepancy with the naming conventions also.