Using DirectX with Visual Studio 2012

27,254

Solution 1

I would recommend you to have a look at SharpDX. This is a thin managed access to DirectX and the API is very similar to the unmanaged version (SharpDX is automatically built from the unmanaged c++ header files). AFAIK this is currently the fastest managed aproach to use DirectX.

A very important thing might be the fact that you are able to develop Win8-Metro-Apps, too. AFAIK this is not possible/allowed with every other lib. I mentioned this because you wrote you want to develop on/for Win8 but you didn't said what kind of app. Metro-Apps has some more restrictions than Desktop-Apps for Win8.

Managed DirectX is out of date as already mentioned. But it seems that XNA is also not longer maintained since the release of the last version 4. So you are stuck if you want to use modern DX10 or DX11 because XNA uses DX9. An alternative here is the ANX framework. This project is currently in an early development stage but seems promising to me. ANX can use DirectX for rendering and uses SharpDX in this case. In contrast to XNA (which is strongly related to only DirectX9) SharpDX has the ability to use other renderers, too (e.g. OpenGL for Linux).

Solution 2

Managed DirectX is obsolete and no longer maintained by Microsoft as it is being replaced by XNA. Last version to support Managed DirectX was this one (February 2010 release).

You can also give SlimDX a try :

SlimDX is a free open source framework that enables developers to easily build DirectX applications using .NET technologies such as C#, VB.NET, and IronPython. It is designed to be an efficient, simple, and lean wrapper that fully encompasses all of Microsoft's gaming and multimedia technologies and exposes them to managed code. All of the code is under the MIT/X11 license, and all content is under the Creative Commons Attribution-Share Alike license. Our latest release is March 2011, and can be found for users and developers on the Download page.

Solution 3

You will probably need Microsoft XNA.

Share:
27,254
Radek Wyroslak
Author by

Radek Wyroslak

Updated on July 09, 2022

Comments

  • Radek Wyroslak
    Radek Wyroslak almost 2 years

    I have some DirectX projects written in C# that I need to run via Visual Studio 2012 specifically.

    All of these projects use the namespace called, "Microsoft.DirectX".

    Microsoft Windows SDK installed completely and successfully on my Windows 8 computer, however this namespace is still unrecognised.

    My question is, "How do I run and develop DirectX apps using a combination of C#, Visual Studio 2012 and MS Windows SDK?"

  • Radek Wyroslak
    Radek Wyroslak over 11 years
    Can I open these old projects using XNA?
  • Erusso87
    Erusso87 over 11 years
    It depends on how old it is. The only hint you gave us is the Micorsoft.DirectX namespace. I believe this namespaces extists in the very old Managed DirectX as well as in XNA (which has quite a history now too). In case it is Managed DirectX you will have to convert it to XNA. If it already is XNA, you will have to convert it to the latest version of XNA (wich is propably less work).
  • Radek Wyroslak
    Radek Wyroslak over 11 years
    I think it is Managed DirectX. Thanks for the answer.
  • Erusso87
    Erusso87 over 11 years
    It is not sure if the code is actually Managed DirectX it could very well be XNA. This namespace (which is our only hint so far) also exists in XNA.
  • shraysalvi
    shraysalvi over 11 years
    I thought it was managed Direct X because of this "I have some C# DirectX projects". But as you said, could be XNA too...unless he provides more details we cannot be certain.
  • Beachwalker
    Beachwalker over 11 years
    It seems there is not much ongoning development for the XNA framework, too. XNA is a kind of base framework for you game (engine) whereas Managed DirectX was an aproach to make the unmanaged DirectX API directly available for .Net programmers => XNA has a different (and much simpler) API than (Managed) DirectX.
  • Radek Wyroslak
    Radek Wyroslak over 11 years
    I chcecked and XNA doesn't seem to support VS 2012.