C# can't find DirectX

Started by
5 comments, last by timmay314 20 years, 1 month ago
I''ve had the DXSDK installed for quite a while now but I just got VS.NET installed. I''m using C#, and I get an error on this line: using Microsoft.DirectX; All that Microsoft appears to contain are Win32, VisualBasic, and CSharp. I reinstalled the DXSDK but it still didn''t fix the problem. In C++ the problem would probably be not finding a header file, but since you don''t #include anything it don''t know that for sure. How can I get this working?
Advertisement
You have to reference the libraries.
quote:Original post by wyrd
You have to reference the libraries.


In Visual Studio, that means you''ll have to right click on the "References" node and add a reference. You should find the DirectX libraries listed in the dialog that pops up.
Thanks. There appears to be two of each file - am I correct in assuming I want 1.0.900.0 over 1.0.1901.0?
Use 1901, it''s the latest version. The 900 is actually 0900.
I see, thank you.

One more question - what kind of project should I use? I tried an empty project but it arbitrarily decided that when I said "empty", I really wanted a console window. I also tried Windows Application but it generated a form resource thing that I don''t need either. I just want to create a window based on what I tell it, and I don''t want it to "help" me by doing random unneeded things. What project type should I use?
I would use the windows application project. All it will set up is a winform that you can then use.

This topic is closed to new replies.

Advertisement