gfcf14
gfcf14

Reputation: 350

Clickonce application won't run after installation in XNA 4.0

I've recently read about converting an XNA game into a stand-alone executable file, and found out that publishing it through Visual Studio enables me to simply distribute it. I understand the process to publish and have done so without problems. And when the publishing finishes, I get three files: a folder, the installation file, and the clickonce file. I run and am able to install my game, yet when it runs, only about a second of the intro music plays, then it stops. And when I try running the shortcut in the start menu it won't run either. I did notice though, that the setup file is only 440 KB, the clickonce is 6KB, and the folder which has all the sources is 58.8 MB. The shortcut created is quite small as well, only 340 KB. So my question is, Are there any special properties to adjust before publishing? In the Application Files all the files are set as "Include (auto)", while all the dlls are set as "Prerequisite (auto)". The prerequisites are: Microsoft .NET FrameWork 4 Client Profile (x86 and x64), Microsoft XNA Framework Redistributable 4.0, and Windows Installer 3.1. I've seen this video http://www.youtube.com/watch?v=sfjLeIDQV5Q and there was no problem running his game so I don't see what I'm doing wrong. And I never did use XNA 3.5 before, I started making the game with XNA 4.0 and never updated the project, so I don't think it could be a compatibility issue. Please anyone let me know if you have any ideas to solve this, and thank you for any help in advance =)

Upvotes: 0

Views: 583

Answers (1)

RobinDotNet
RobinDotNet

Reputation: 11877

Delete your \bin\ folders and build the application. Go to the \bin\ folder and double-click the exe. Does it work?

If so, publish the app and install it. Go find the exe (yourprofile\myapps\2.0\obfuscated folder\obfuscated folder\xxxx...tion... where xxxx is the 1st four characters of your assembly name) and double-click on it and run it. Does it work?

If not, then you are not including all of the files it needs.

Upvotes: 1

Related Questions