如何让 XNA 4.0 游戏在其他机器上运行? [英] How do I get an XNA 4.0 game to run on other machines?

查看:38
本文介绍了如何让 XNA 4.0 游戏在其他机器上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试在非用于开发的机器上运行在 XNA 4.0 中制作的游戏时,它就无法运行.我已按照此处的说明操作以确保所有依赖项都存在.

为了清楚起见,我做了以下工作:

  1. 下载并安装了 Microsoft .NET Framework 4 客户端配置文件.

  2. 下载并安装了 Microsoft XNA Framework Redistributable 4.0.

  3. 确保我没有使用 GamerServicesMicrosoft.Xna.Net.* 中包含的任何内容,我的参考如下:

<块引用>

Microsoft.Xna.Framework
Microsoft.Xna.Framework.Avatar
Microsoft.Xna.Framework.Game
Microsoft.Xna.Framework.Graphics
Microsoft.Xna.Framework.Storage
Microsoft.Xna.Framework.Video
Microsoft.Xna.Framework.Xact
mscorlib
系统 System.Core
系统.Windows.Forms
系统.Xml
System.Xml.Linq

我也遵循了此处的建议以确保问题不是在代码本身中.

<小时>

我尝试了以下方法来让它运行(在 Vista 和 7 上):

  • 使用内置的发布功能.这会导致错误提示 Microsoft.Xna.Input.Touch 需要存在于 GAC 中.我已经尝试将 Microsoft.Xna.Input.Touch 添加到引用中,但这并不能解决问题.
  • 在本地复制 XNA dll 文件.这会导致出现一条错误消息,指出无法找到 Microsoft.Xna.Game.dll 或其依赖项之一.
  • 复制Release 中包含的所有内容.这会导致 Application X 停止工作...APPCRASH 错误消息在它启动时出现.我的代码永远无法访问.

有什么办法可以让它发挥作用吗?我一直在尝试修复它,但随着最后期限的临近,它一直是不必要的压力来源.

解决方案

事实证明 XNA Beta 程序集仍在开发机器上运行,VS 出于某种原因选择使用这些程序集而不是正确的程序集.

>

Whenever I try and run a game made in XNA 4.0 on a machine other than ones used for development, it just won't run. I've followed the instructions here to ensure that all the dependencies are present.

To be clear I've done the following:

  1. Downloaded and installed the Microsoft .NET Framework 4 Client Profile.

  2. Downloaded and installed the Microsoft XNA Framework Redistributable 4.0.

  3. Made sure I am not using anything contained within GamerServices and Microsoft.Xna.Net.*, my references are as follows:

Microsoft.Xna.Framework
Microsoft.Xna.Framework.Avatar
Microsoft.Xna.Framework.Game
Microsoft.Xna.Framework.Graphics
Microsoft.Xna.Framework.Storage
Microsoft.Xna.Framework.Video
Microsoft.Xna.Framework.Xact
mscorlib
System System.Core
System.Windows.Forms
System.Xml
System.Xml.Linq

I also followed the advice here to ensure the problem was not within the code itself.


I've tried the follow methods to get it to run (on both Vista and 7):

  • Use the built in publishing functionality. This results in an error saying that Microsoft.Xna.Input.Touch needs to be present in the GAC. I've tried adding Microsoft.Xna.Input.Touch to the references, and this does not fix the issue.
  • Copy the XNA dll files locally. This results in an error message stating that Microsoft.Xna.Game.dll or one of its dependencies could not be located.
  • Copy over everything contained in Release. This results in an Application X stopped working... or APPCRASH error message the second it starts. My code is never reached.

Is there any way to get this to work? I've been attempting to fix it, and with the deadline looming it has been a source of unneeded stress.

解决方案

It turns out the XNA Beta assemblies were still kicking around on the dev machine, and VS opted to use those instead of the correct assemblies for some reason.

这篇关于如何让 XNA 4.0 游戏在其他机器上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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