Clickonce application won't run after installation in XNA 4.0

末鹿安然 提交于 2019-12-11 19:04:36

问题


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 =)


回答1:


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.



来源:https://stackoverflow.com/questions/15393005/clickonce-application-wont-run-after-installation-in-xna-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!