Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

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

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
Oh, I don't have XNA Framework Redist listed in there (or anything XNA related). Strange –  Haedrian Mar 11 '13 at 10:11
    
Most unusual. Perhaps a bad XNA Game Studio install? –  Andrew Russell Mar 11 '13 at 15:09
    
I considered that, but XNA itself works. I tried downloading it again, and I get a 'repair' or 'remove' option so its installed right –  Haedrian Mar 11 '13 at 15:13
    
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... –  Haedrian Mar 11 '13 at 20:30
1  
I unchecked the 'Create setup' checkbox, checked it again and lo and behold its there. That was weird. –  Haedrian Mar 11 '13 at 20:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.