在XNA 4.0中安装后,Clickonce应用程序将无法运行 [英] Clickonce application won't run after installation in XNA 4.0

查看:92
本文介绍了在XNA 4.0中安装后,Clickonce应用程序将无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近阅读了有关将XNA游戏转换为独立的可执行文件的信息,发现通过Visual Studio发布它可以使我轻松地分发它。我了解发布过程,并且这样做没有问题。发布完成后,我得到了三个文件:文件夹,安装文件和clickonce文件。我可以运行并能够安装我的游戏,但是当它运行时,只有大约一秒钟的介绍性音乐播放,然后它停止了。当我尝试在开始菜单中运行快捷方式时,它也不会运行。我确实注意到了,但是安装文件只有440 KB,clickonce是6KB,包含所有源的文件夹是58.8 MB。创建的快捷方式也很小,只有340 KB。所以我的问题是,发布之前是否需要调整任何特殊属性?在应用程序文件中,所有文件都设置为包含(自动),而所有dll都设置为前提条件(自动)。先决条件是:Microsoft .NET FrameWork 4客户端配置文件(x86和x64),Microsoft XNA Framework Redistributable 4.0和Windows Installer 3.1。我看过这段视频 http://www.youtube.com/watch?v=sfjLeIDQV5Q ,运行他的游戏没问题,所以我看不到做错了。而且我以前从未使用过XNA 3.5,我开始使用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 =)

推荐答案

删除您的\bin\文件夹并构建应用程序。进入\bin\文件夹并双击exe。它行得通吗?

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

如果是,请发布并安装该应用。找到exe(您的个人档案\myapps\2.0\混淆文件夹\混淆文件夹\xxxx ... tion ...,其中xxxx是程序集名称的前四个字符),然后双击它并运行它。它行得通吗?

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.

这篇关于在XNA 4.0中安装后,Clickonce应用程序将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆