Setting up Managed DirectX in Visual Studio is simple. In fact, Visual Studio itself doesn’t need to be adjusted at all. All we need to do is include the DirectX references to the project.
After you’ve created your Windows Application, right-click on References in the Solution Explorer and select Add Reference.
Adding a reference in C# is like linking to a library in C++. It gives us access to classes that we will want to use in our programs.
In the Add Reference dialog, select the latest version of Microsoft.DirectX and click Select. After that, you’re done. Piece of cake.