Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a DirectX reference in Visual Studio 2010 [closed]

How can I add a DirectX reference to my C# project in Visual Studio 2010? Thanks.

like image 755
mahdi Avatar asked Dec 11 '10 00:12

mahdi


2 Answers

  1. Go to the solution explorer
  2. Click references
  3. Click add reference
  4. Click Browse
  5. Browse to:

    C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\

  6. Select your directX package.

like image 67
ChrisN Avatar answered Sep 28 '22 07:09

ChrisN


DirectX is for unmanaged code - C++. To use it from C# you need to find a wrapper library for it. The two best right now are SlimDX and SharpDX. Grab the binaries from the sites and just add a reference to them.

like image 39
YellPika Avatar answered Sep 28 '22 07:09

YellPika