简体   繁体   English

XNA Game在具有XNA Redistributable 4.0 Refresh的计算机上崩溃,但在XNA Game Studio 4.0上运行

[英]XNA Game crashes on computers with XNA Redistributable 4.0 Refresh, but runs with XNA Game Studio 4.0

I've created a game in XNA and I'm attempting to run it on other computers. 我已经在XNA中创建了一个游戏,并且试图在其他计算机上运行它。 It works fine if Visual Studio and XNA Studio 4.0 are installed, but otherwise the game won't even open. 如果安装了Visual Studio和XNA Studio 4.0,它可以很好地工作,但否则游戏将无法打开。

If I just copy the Release folder over and try to run the executable, nothing happens. 如果我只是复制Release文件夹并尝试运行可执行文件,则不会发生任何事情。 No crashes, no reports, no windows. 没有崩溃,没有报告,没有窗口。

If I install the game using an installation package I made the game will "stop working" immediately and reference three files: 如果我使用安装包安装了游戏,则我将使游戏立即“停止运行”并引用以下三个文件:

C:\Users\user\AppData\Local\Temp\WERA006.tmp.WERInternalMetadata.xml    
C:\Users\user\AppData\Local\Temp\WERB674.tmp.appcompat.txt    
C:\Users\user\AppData\Local\Temp\WERB6E2.tmp.mdmp

I've opened these up and found nothing all that useful in them. 我打开了它们,却发现其中没有什么有用的。 The installation package works fine on my computer. 安装软件包在我的计算机上可以正常工作。

The other computers that I've tried it on have had the XNA Redistributable 4.0 Refresh installed, and I've gotten smaller XNA projects to work on them...just not this one. 我尝试过的其他计算机都安装了XNA Redistributable 4.0 Refresh,并且我得到了一些较小的XNA项目来使用它们……而不仅仅是这个。 I use XMLSerialization and a StorageContainer, but I don't see why those would be an issue. 我使用XMLSerialization和StorageContainer,但是我不明白为什么这些会成为问题。 Any ideas? 有任何想法吗?

Firstly prove that its your program and not bad installs. 首先证明它是您的程序并且可以不错的安装。 Compile any of the XNA samples and then copy the release folder across. 编译任何XNA示例,然后复制发行文件夹。 If it runs then the redist is good and its something in your code. 如果它运行,则redist很好,代码中也有它。

So you are probably calling something that isn't in the redist eg Any XNA networking functions, any Content Pipeline stuff other than Load<> - all of those things are only in the developer tools. 因此,您可能正在调用不在Redist中的某些内容,例如,任何XNA网络功能,除Load <>之外的任何Content Pipeline内容-所有这些内容仅在开发人员工具中。 Or its nothing to do with XNA and there's another dependency you forgot. 或与XNA无关,您忘记了另一个依赖项。

Add a top level handler like this How to implement top level exception handling? 添加这样的顶级处理程序。 如何实现顶级异常处理? and write the exception/stack trace to a file. 并将异常/堆栈跟踪写入文件。

There's an FAQ we wrote here that might help http://xboxforums.create.msdn.com/forums/t/1988.aspx 我们在此处编写了一个常见问题解答,可能会对http://xboxforums.create.msdn.com/forums/t/1988.aspx有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM