We all know XNA is pretty much dead but it is far from useless. One of the big problems with XNA was it was heavily tied to XNA Studio or Visual Studio 2010. Now, a few years on and two releases of Visual Studio later, keeping a version of VS2K10 around just for XNA is getting kind of annoying for many. There is a manual process for installing all the various required components, but as will all “manual processes”, that requires work… who likes doing work?
Fortunately though, for those of us that are labour adverse but want to use XNA in a more modern IDE, there is now a solution. The XNA Enabler.
I’ve been able to apply these steps to several machines successfully, but manually copying files and running obscure commands gets old after a while. Taking what I’ve learned from these articles, I wrote a quick utility app that performs the necessary steps to get XNA running with the click of a button.
The app scans the registry at start up, looking for any required software. Specifically, it looks for Visual Studio 2010, 2012, 2013 and the XNA Framework, XNA Game Studio and XNA 4.0 Refresh. If all XNA components, Visual Studio 2010 and at least one newer version of Visual Studio are found, you can click the “Enable XNA” button to simply copy the files around on your machine. If XNA and/or Visual Studio 2010 are not present, the “Copy XNA” button unpacks the required XNA files (about 50 megs worth) onto your drive and puts them in the right places. It also runs several individual XNA installers (framework redistributable, shared components and platform tools). Either operation will then reset your Visual Studio extension cache and force a rebuild using the “devenv.exe /setup” command line option.
Very cool stuff! There is one very important comment from the post that I should draw special attention to.
It also requires UAC privileges because the “devenv.exe /setup” command fails otherwise.
You can download the complete package here. Warning, it’s 52MB in size as it contains the required XNA files.