How do I include the .NET and Managed DirectX runtime dependencies in my VS 2010 Project?

429 views Asked by At

How do I include the .NET and Managed DirectX runtime dependencies in my VS 2010 Project? I've had some difficulty with the setup project in the past and can't quite figure this one out.

3

There are 3 answers

0
Hans Passant On BEST ANSWER

Open the References node of your project. Select the DirectX assemblies you use and change their Copy Local property to True. Build + Rebuild. You now have a copy of the assemblies in your build directory.

That's all, your Setup project will automatically pick them up from the build directory and deploy them. The same way it will automatically detect the .NET dependency and tick the bootstrapper in the Prerequisites. Easy peasy.

0
Ry- On

You can't any more, not easily at least. I've had limited success going into C:\WINDOWS\Assembly and finding DLLs, but that's a terrible solution. Consider not using DirectX, especially if it's only for 2D graphics because GDI+ is usually faster for simple 2D things, even games.

1
Jeremy Thompson On

Afaik you have to go XNA if you want to do DirectX in .Net (as they stopped the original managed directX a while back):

http://msdn.microsoft.com/en-us/aa937791.aspx

Although it does seem to be possible according to this CP link:

http://www.codeproject.com/KB/directx/Managed_Direct3D.aspx

*Edit see the first comment in the CP article by Dennis Dykstra:

I understood that Managed DirectX has been deprecated in favor of XNA Game Studio. Therefore wouldn't it be better to target a technology that Microsoft is continuing to support rather than one they are moving away from?