1
\$\begingroup\$

I published an XNA game (for Windows only) using Visual Studio's publish feature which is supposed to handle dependencies and all that.

When I installed it on myself it verified system requirements and installed correctly.

When I tried to install it on a fresh PC, it gave me an error that I was missing the XNA redist. I had to download it separately and then install the game. Is there a way of setting it to download XNA redist automatically as part of the 'one click' installation process? Or will the end user have to stay downloading the redist earlier?

\$\endgroup\$
7
  • \$\begingroup\$ the setup.exe should install XNA redistr. are you sure you ran the setup.exe first and then ran the one-click application? \$\endgroup\$ Commented Mar 10, 2013 at 14:20
  • \$\begingroup\$ Yeah I tried it both ways. It gave me an error when it was validating the requirements \$\endgroup\$
    – Haedrian
    Commented Mar 10, 2013 at 14:21
  • \$\begingroup\$ did you send the application files also? \$\endgroup\$ Commented Mar 10, 2013 at 14:22
  • \$\begingroup\$ Yeah it installs correctly when there's XNA installed. All the content and the rest work \$\endgroup\$
    – Haedrian
    Commented Mar 10, 2013 at 14:26
  • \$\begingroup\$ This is a strange issue ive never had this problem \$\endgroup\$ Commented Mar 10, 2013 at 14:50

1 Answer 1

3
\$\begingroup\$

Background: ClickOnce generates two files: The .application file - the "ClickOnce Application Deployment Manifest", and a setup.exe bootstrapper.

setup.exe will check for prerequisites, install any that are missing. When it's finished it will then run the .application file. The .application file will install and then run your application.

You can invoke the .application file directly, but then the prerequisites won't be installed.

Possible causes: Either you ran the .application file instead of setup.exe. Or the prerequisites specified in the bootstrapper are misconfigured.

How to fix: You can select which prerequisites are installed by opening the properties of your game project, selecting the Publish tab, and clicking "Prerequisites":

Publish tab

This will open a Prerequisites window, where you can select what redistributables will be installed by the bootstrapper.

Prerequisites window

For XNA, you need:

  • Microsoft .NET Framework 4 Client Profile (x86 and x64)
  • Microsoft XNA Framework Redistributable 4.0
  • Windows Installer 3.1

These are automatically selected by the default Game Project template, so it should "just work".

The only other thought is that the computer you were installing on wasn't able to install XNA for some reason. Possibly it could not connect to Microsoft's website to get the installer. Although I would expect it to display an error during installation in this case. It is safe to run setup.exe repeatedly.

\$\endgroup\$
6
  • \$\begingroup\$ Oh, I don't have XNA Framework Redist listed in there (or anything XNA related). Strange \$\endgroup\$
    – Haedrian
    Commented Mar 11, 2013 at 10:11
  • \$\begingroup\$ Most unusual. Perhaps a bad XNA Game Studio install? \$\endgroup\$ Commented Mar 11, 2013 at 15:09
  • \$\begingroup\$ I considered that, but XNA itself works. I tried downloading it again, and I get a 'repair' or 'remove' option so its installed right \$\endgroup\$
    – Haedrian
    Commented Mar 11, 2013 at 15:13
  • \$\begingroup\$ I downloaded and ran a repair both on XNA game studio and the redist. Still no XNA on the list. I downloaded the C# express edition, still not there. I wonder if I can modify the project manually... \$\endgroup\$
    – Haedrian
    Commented Mar 11, 2013 at 20:30
  • 1
    \$\begingroup\$ I unchecked the 'Create setup' checkbox, checked it again and lo and behold its there. That was weird. \$\endgroup\$
    – Haedrian
    Commented Mar 11, 2013 at 20:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .