I'm trying to draw some boxes in 2D in C#, but when I try the following:
using Microsoft.DirectX;
using D3D = Microsoft.DirectX.Direct3D;
I get the error:
The type or namespace name 'DirectX' does not exist in the namespace 'Microsoft'
Apparently I need the DirectX SDK but I'm on Windows 8.1 and the downloads are for Windows XP.
Starting with Windows 8, the DirectX SDK is included as part of the Windows SDK. Therefor you will need to download the Windows SDK as described in the following MSDN article:
http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275%28v=vs.85%29.aspx
You can find the download link here:
Managed DirectX 1.1 is deprecated. It has a number of limitations:
If you want a more modern drop-in replacement for the legacy MDX assemblies, see SlimDX . SharpDX is another option and works for Windows Store apps / Windows phone apps.
See DirectX and .NET
Note that you can use the legacy DirectX SDK with the current Windows 8.x SDKs that come with VS 2012 or VS 2013 for C++, but this requires some editing of C++ paths. See MSDN
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.