11

Visual Studio 11 was released a few weeks back and now that ReSharper is available for it, I'm ready to start using it!

Some of the projects I'm working on are XNA projects. These don't appear to load in VS11 Beta, even after reinstalling XNA Game Studio 4 Refresh after installing VS11 Beta.

Has anyone got VS11 Beta working with XNA projects?

Charles
  • 50,943
  • 13
  • 104
  • 142
Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
  • Here's a link to a blog post that seems to have had some success working with Xna through VS11 on windows 8. http://blogs.msdn.com/b/astebner/archive/2012/02/29/10274694.aspx – Steve H Mar 13 '12 at 13:21
  • It's worth pointing out that the instructions you linked appear to be for Visual Studio **2010** on Windows 8. Not for Visual Studio **2011** as the original question asks. – Andrew Russell Mar 15 '12 at 01:22
  • thanks, I didn't clue into that. My VS11 beta start page has a reference to creating a new Xna project but since I didn't install Xna on my win 8 partition I didn't bother with it. That, and reading the blog post made me connect the two. false assumption I guess. – Steve H Mar 15 '12 at 02:24

2 Answers2

9

I have just gotten it to work, it required some hackery.

This will work after installing XNA Game Studio 4.0.

Find the Game Studio 4.0 directory in:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft

Copy the directory to:

%AppData%\Local\Microsoft\VisualStudio\11.0\Extensions

You can go there in Explorer by entering %AppDatain the address bar, hitting enter, and then navigating or filling out the rest of the address bar (for some reason just pasting the full relative url doesn't work)

Where %AppData% stands for your personal AppData directory. It is a hidden directory in your personal directory which is usually situated in C:\Users\YourUserName.

You are not done, open the directory you just created and open the extension.vsixmanifest file with a texteditor and change this block:

<SupportedProducts>
  <VisualStudio Version="10.0">
    <Edition>VSTS</Edition>
    <Edition>VSTD</Edition>
    <Edition>Pro</Edition>
    <Edition>VCSExpress</Edition>
    <Edition>VPDExpress</Edition>
  </VisualStudio>
</SupportedProducts>

To this:

<SupportedProducts>
  <VisualStudio Version="11.0">
    <Edition>Ultimate</Edition>
    <Edition>Premium</Edition>
    <Edition>Pro</Edition>
  </VisualStudio>
</SupportedProducts>

And save it. Now go up one directory level to the Extensions directory and remove any cache files that are present (don't worry they are automatically regenerated) and restart Visual Studio. You should now be able to open your XNA projects!

edit:

There is now a more popular up to date question here: How to install XNA game studio on Visual Studio 2012?

For me it did not work, the extension only showed up when I installed another extension (I updated nuget), removing caches did not seem to help at all.

Community
  • 1
  • 1
Tinco
  • 597
  • 3
  • 14
  • Hey Joh, what failed? Did nothing happen? I wrote the guide after I had already done it, so maybe I missed a step. – Tinco Apr 07 '12 at 11:20
  • VS could not load the content projects. Moreover, XNA did not appear in the list of extensions, that could be the problem. The path you mention did not exist on my system. I tried %AppData%\Microsoft\VisualStudio\11.0\Extensions instead. I had to create Extensions, it did not exist. I am using VS11 Beta Ultimate. – Joh Apr 07 '12 at 14:34
  • Maybe it only exists when you install a regular extension, try installing the git extension or something. You did find the %AppData%/Local folder right? – Tinco Apr 07 '12 at 15:50
  • By the way, what do you mean by "remove any cache files"? How do I recognize such files? Do they have a specific file extension, or are they all located in some specific directory? – Joh Apr 08 '12 at 10:19
  • They are located in the extensions directory. They are the files that are not specific extension directories. – Tinco Apr 09 '12 at 11:44
  • 2
    FYI: `%AppData%\Local` is not `c:\users\\AppData`. On most (all?) systems, it is `c:\users\\AppData\Roaming`. – moswald May 07 '12 at 14:16
  • Hey thanks mos, when I'm behind my windows machine I'll check why I thought it was there, maybe it's a Win8 thing.. – Tinco May 09 '12 at 12:14
  • For the record none of this seems to work with the 2012 Express. Not sure if extensions are even allowed in said version though. – mikeschuld Aug 29 '12 at 04:48
4

Note that I haven't tried the beta yet. But I can give you some information that may be relevant.

Historically XNA Game Studio has always been tied to a particular version of Visual Studio. For example XNA 3 only works with VS 2008 and XNA 4 only works with VS 2010.

While you can reference the XNA assemblies in a project in another version of Visual Studio, you cannot use XNA Game Studio features - most notably the Content Pipeline. This means you must create your XNB files some other way, or not use ContentManager. Also the profile setting (HiDef vs Reach) must be set manually, and cross-platform project updating is not available.

I'm not really sure if projects will even load successfully or not; and if they do, whether they will build. If you open up an XNA project file in a text editor, you will notice some MSBuild instructions that the newer Visual Studio may not understand. If you clean out these manually, the project should load.

Andrew Russell
  • 26,924
  • 7
  • 58
  • 104
  • So are us XNA users going to be stuck with VS2010 or is there a new XNA in the works that is going to come out for VS2011? – ClassicThunder Mar 13 '12 at 00:44
  • So far nothing beyond XNA 4.0 has been announced. Microsoft have not said anything either way, however there's a feeling in the community that XNA has been seriously cut back. I wrote an [optimistic blog post](http://andrewrussell.net/2011/11/predictions-on-xna-in-windows-8/) about it, but others are not so optimistic. Historically (I'm pretty sure) XNA versions have never been synchronised with Visual Studio or Windows releases. – Andrew Russell Mar 13 '12 at 01:10
  • I can definitely confirm what @AndrewRussell is saying here. I distinctly remember having to stick with VS 2008 for a while until they got XNA working for VS 2010. But no promises on if MS will actually get around to that. – rbwhitaker Aug 23 '12 at 21:12