Click to See Complete Forum and Search --> : Using DirectX 9.0 With C#


Scott MacMaster
June 11th, 2003, 10:40 PM
I have just downloaded the DirectX 9.0 SDK (http://www.microsoft.com/downloads/details.aspx?FamilyID=124552ff-8363-47fd-8f3b-36c226e04c85&displaylang=en) and I'm trying to figure out how to use it but the samples and the projects the Wizard generates won't compile.

The error I get says, "error CS0234: The type or namespace name 'DirectX' does not exist in the class or namespace 'Microsoft' (are you missing an assembly reference?)"

That error applies to this line,

using Microsoft.DirectX;

It also says this for a number of other namespaces under Microsoft that are related to DirectX.

My guess is that the installer didn't configure my system currently. However, I have no idea as to how to go about getting this to work.

Does anyone know how to get this to work.


Thanks,
Scott MacMaster

BinaryAnge
June 12th, 2003, 09:44 AM
adding a using statement does not add a reference to the classes your trying to use. It imports there namespace. To add a reference to the class you need to goto your solution explorer on the right side of the ide and right click the reference protion of the files and "add reference". You dont have to use the using statement if you dont want, it just keeps you from having to fully qualify everything.

Scott MacMaster
June 12th, 2003, 03:27 PM
Yea, I'm familiar with that but shouldn't the sample projects have the references defined in the project already? Actually, after just looking at the sample projects it looks like they do have the references added. Hoever, the icons have an exclamation mark over them. Probably indicating that the file can't be found.

Are these files seperate from the DirectX 9.0 SDK? It seems odd that they would be. In any case, where can I get these files?


Thanks,
Scott MacMaster