Before XNA was put out to pasture, a number of developers published additional Visual Studio project and item templates for it. During my quick search on the Visual Studio Gallery, there’s a couple dozen templates excluding the ones for Cocos2D-XNA. I can’t say anything for most of the templates, but I have found the XNA Content Pipeline Debugging template to be valuable. I ignored this template for a long time but it is a step over littering your pipeline extensions with Debugger.Launch() in a desperate attempt to debug them. Check out the author’s blog post about this template.
The problem with the content pipeline debugging template is it was published in 2010, along with most of the other XNA templates. The installers for the templates only recognize the version of Visual Studio that XNA Game Studio was designed for: 2010. If you’ve already migrated your game development to Visual Studio 2013, you’re not going to find the templates you’ve installed.
The templates distributed on the Visual Studio Gallery are packed as VSIX packages, so they are technically full blown Visual Studio extensions. VSIX packages are really just ZIP archives hiding behind a different extension, so we can rename them and walk right in. This means we have an opportunity to cheat!
Inside the VSIX archive will be a file extension.vsixmanifest. This file includes the extension name, author, description, and such. It also specifies what versions of Visual Studio it can be installed with. DebugPipeline.vsix comes with this block:
<SupportedProducts> <VisualStudio Version="10.0"> <Edition>Ultimate</Edition> <Edition>Premium</Edition> <Edition>Pro</Edition> <Edition>VCSExpress</Edition> <Edition>VPDExpress</Edition> </VisualStudio> </SupportedProducts>
The version is 10.0, which corresponds with Visual Studio 2010. Let’s duplicate it to support 2013 as well.
<SupportedProducts> <VisualStudio Version="10.0"> <Edition>Ultimate</Edition> <Edition>Premium</Edition> <Edition>Pro</Edition> <Edition>VCSExpress</Edition> <Edition>VPDExpress</Edition> </VisualStudio> <VisualStudio Version="12.0"> <Edition>Ultimate</Edition> <Edition>Premium</Edition> <Edition>Pro</Edition> <Edition>VCSExpress</Edition> <Edition>VPDExpress</Edition> </VisualStudio> </SupportedProducts>
Visual studio 2013 is product version 12.0. If you wanted to also support 2012, you would add another block with version 11.0.
Save your changes, insert the file back into the zip archive, and rename it to have a VSIX extension again. Running the VSIX should result in the installer giving you more choices for where to put it and ultimately drop it into 2013 for you.
By forcing the VSIX to target newer versions of Visual Studio, we would ensure that if the template carried any extra baggage, that would be brought along. This assumes that everything in the VSIX will be compatible or correctly configured for later versions of Visual Studio, but that is not guaranteed. It’s not a problem for the content pipeline debugging template. Review my previous entry on MonoGame and Visual Studio 2013 integration for potential caveats with templates in newer versions of the IDE and how you might fix them.
Now, since this was all about a template with no other dependencies, we could have dug further into the VSIX archive and pulled the template zip file out directly. For DebugPipeline.vsix, the template is located at
T/CSharp/Xna Game Studio 4.0/DebugPipeline.zip. You could drop this into your user project templates folder for 2013 located in Documents, and it would also appear as a project item, without a corresponding entry in your extension manager. This is a viable alternative in case the above method fails. A signed VSIX could be a potential reason for that.
Happy template installing and content pipeline debugging.