共用方式為


XNA Windows Phone project templates are not available if Visual Studio 2012 is installed to a non-default path

The XNA Game Studio component that ships with the Windows Phone SDK 8.0 has a setup bug that causes some of the project templates to be installed to an incorrect location if Visual Studio 2012 or the Windows Phone SDK 8.0 is installed to a non-default path.  If you run into this issue, you can use the following steps to restore the missing project templates.

If you are using Visual Studio 2012 Professional, Premium or Ultimate:

  1. Copy the following files from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0 to <Visual Studio non-default install path>\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0:

    CSXnaWindowsPhoneGame-v4.0.zip
    CSXnaWindowsPhoneLibrary-v4.0.zip

  2. Copy the following files from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\VisualBasic\XNA Game Studio 4.0 to <Visual Studio non-default install path>\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\VisualBasic\XNA Game Studio 4.0:

    VBXnaWindowsPhoneGame-v4.0.zip
    VBXnaWindowsPhoneLibrary-v4.0.zip

  3. From an elevated cmd prompt, run <Visual Studio install path>\Common7\IDE\devenv.exe /setup

If you are using Visual Studio 2012 Express for Windows Phone:

  1. Copy the following files from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VPDExpressExtensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0 to <Visual Studio non-default install path>\Common7\IDE\VPDExpressExtensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0:

    CSXnaWindowsPhoneGame-v4.0.zip
    CSXnaWindowsPhoneLibrary-v4.0.zip

  2. Copy the following files from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VPDExpressExtensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\VisualBasic\XNA Game Studio 4.0 to <Visual Studio non-default install path>\Common7\IDE\VPDExpressExtensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\VisualBasic\XNA Game Studio 4.0:

    VBXnaWindowsPhoneGame-v4.0.zip
    VBXnaWindowsPhoneLibrary-v4.0.zip

  3. From an elevated cmd prompt, run <Visual Studio install path>\Common7\IDE\vpdexpress.exe /setup

Comments

  • Anonymous
    July 14, 2013
    Worked great. This my exact issue having VS installed on the D: drive.