How to fix platform extensions add-in store errors that can occur when using XNA Game Studio

Every once in a while, I see a post on the App Hub forums (for example, here or here) where someone runs into an error related to the XNA Game Studio platform extensions add-in store when trying to open an XNA Game Studio project for Xbox 360 or Windows Phone.  The error message looks like the following:

---------------------------
Microsoft XNA Game Studio
---------------------------
The XNA Game Studio platform extensions add-in store returned the following error:

    Could not find the add-in deployment cache file, "C:\Program Files (x86)\Common Files\Microsoft Shared\XNA\PlatformExtensions\PipelineSegments.store".  Please run AddInStore.Update or Rebuild (or run AddInUtil.exe on the command line).  Also, ensure your code has permission to read this file.

Please run Setup for Microsoft XNA Game Studio Platform Tools to repair your installation.
---------------------------
OK  
---------------------------

If you encounter an error like this while trying to use XNA Game Studio, there are a few different options that can be used to resolve it.  I suggest trying them in the order listed below, and skip to the next option if the current option does not resolve the error for you.

Option 1 – re-install Microsoft XNA Game Studio Platform Tools

The XNA Game Studio Platform Tools is one of the sub-components that is installed behind the scenes by XNA Game Studio setup.  You can re-install it by right-clicking on the platform tools MSI, choosing to uninstall it, then double-click on it and choose to install it.  The platform tools MSI can be found at the following location on a computer that has XNA Game Studio 4.0 (or the 4.0 Refresh) installed.

On a 32-bit OS:

  • %ProgramFiles%\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnags_platform_tools.msi

On a 64-bit OS:

  • %ProgramFiles(x86)%\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnags_platform_tools.msi

Option 2 – re-install Microsoft XNA Game Studio

For this option, you can go to the Programs and Features (or Add/Remove Programs) control panel and uninstall all of the following components:

  • Microsoft XNA Game Studio 4.0 (or 4.0 Refresh)
  • Microsoft XNA Framework Redistributable 4.0 (or 4.0 Refresh)
  • Microsoft XNA Game Studio Platform Tools

Alternatively, you can use the XNA Game Studio cleanup tool.

After uninstalling the above components, re-download and re-install XNA Game Studio.

Option 3 – re-build the XNA Game Studio Platform Tools add-in store manually

If the above steps do not help, it might help to manually re-build the XNA Game Studio Platform Tools add-in store.  These steps are run during Platform Tools setup, but in some cases they will fail, and running them manually can provide more useful error information for troubleshooting purposes.

Note – even though XNA Game Studio 4.0 (and the 4.0 Refresh) require VS 2010 and the .NET Framework 4, they will attempt to use the .NET Framework 3.5 to build the add-in store if the .NET Framework 3.5 is installed because platform tools components are shared by previous versions of XNA Game Studio (3.0 and 3.1), and older versions of XNA Game Studio cannot read the add-in store if it is re-built by the .NET Framework 4.  Because of that, I recommend using the .NET Framework 3.5 to re-build the add-in store if you have it installed.

If you have the .NET Framework 3.5 installed, run the following commands from an elevated cmd prompt:

On a 32-bit OS:

  • "%windir%\Microsoft.NET\Framework\v3.5\AddInUtil.exe" -PipelineRoot:"%ProgramFiles%\Common Files\microsoft shared\XNA\PipelineHosting\." -Rebuild
  • "%windir%\Microsoft.NET\Framework\v3.5\AddInUtil.exe" -PipelineRoot:"%ProgramFiles%\Common Files\microsoft shared\XNA\PlatformExtensions\." -Rebuild

On a 64-bit OS:

  • "%windir%\Microsoft.NET\Framework\v3.5\AddInUtil.exe" -PipelineRoot:"%ProgramFiles(x86)%\Common Files\microsoft shared\XNA\PipelineHosting\." -Rebuild
  • "%windir%\Microsoft.NET\Framework\v3.5\AddInUtil.exe" -PipelineRoot:"%ProgramFiles(x86)%\Common Files\microsoft shared\XNA\PlatformExtensions\." -Rebuild

If you do not have the .NET Framework 3.5 installed, but have the .NET Framework 4 installed, run the following commands from an elevated cmd prompt:

On a 32-bit OS:

  • "%windir%\Microsoft.NET\Framework\v4.0.30319\AddInUtil.exe" -PipelineRoot:"%ProgramFiles%\Common Files\microsoft shared\XNA\PipelineHosting\." -Rebuild
  • "%windir%\Microsoft.NET\Framework\v4.0.30319\AddInUtil.exe" -PipelineRoot:"%ProgramFiles%\Common Files\microsoft shared\XNA\PlatformExtensions\." -Rebuild

On a 64-bit OS:

  • "%windir%\Microsoft.NET\Framework\v4.0.30319\AddInUtil.exe" -PipelineRoot:"%ProgramFiles(x86)%\Common Files\microsoft shared\XNA\PipelineHosting\." -Rebuild
  • "%windir%\Microsoft.NET\Framework\v4.0.30319\AddInUtil.exe" -PipelineRoot:"%ProgramFiles(x86)%\Common Files\microsoft shared\XNA\PlatformExtensions\." -Rebuild

Option 4 – re-install the .NET Framework

If the above options do not help, it might be necessary to repair/re-install the .NET Framework on your computer.  As I described in the notes for option 3 above, the XNA Game Studio Platform Tools will use the .NET Framework 3.5 to build the add-in store if the .NET Framework 3.5 is installed on the computer.  As a result, you will need to try to repair/re-install both the .NET Framework 3.5 and the .NET Framework 4.

Option 5 – if none of the above help

If none of the above options solve this error, please do the following:

  1. Use the log collection tool to collect all of your setup log files.
  2. Upload the file named %temp%\vslogs.cab that the log collection tool will create to a file server (such as https://skydrive.live.com).
  3. Post a comment on this blog post that includes a link that I can use to download your log files and take a closer look.