SOLVED:此错误仅发生在Visual Studio 2010中,它不会出现在Visual Studio 2008中,可能是因为内容管道在两者中加载不同。虽然错误我一直与MSVCR90.dll,是下一个问题。
我已经开始使用Goblin XNA框架创建一个增强现实应用程序。尽管到目前为止进展并不顺利。我在stackoverflow.com上问这个问题的原因是因为这看起来像是Goblin XNA和Visual Studio问题的混合体,所以我希望我能在这里找到一些帮助。
You need to add 'DebugFont.spritefont' file to your content directory before you can display debug information
当我调试相机校准。如果我得到上面的错误,有人知道如何解决这个问题吗?
提前感谢!
——编辑:此错误显示在事件查看器中:
故障应用程序名称:camerac校准.exe,版本:1.0.0.0,时间戳:0x4e67259c
故障模块名称:MSVCR90.dll,版本:9.0.30729.4974,时间戳:0x4b7a226f
异常码:0xc0000417
故障偏移量:0x0006ccb5
故障进程id: 0xdc0
应用程序启动时间:0x01cc6d34cfa769a0
故障应用程序路径:D:My DocumentsuserAR-DemoGoblinXNAv3.6tools camer校准binx86Release camer校准.exe
故障模块路径:c: windows winss x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cbMSVCR90.dll
报表Id: 1296c1c0-d928-11e0-8928-fa12135e51e5
你可以在这里找到抛出这个异常的源文件:https://goblinxna.svn.codeplex.com/svn/src/UI/UIRenderer.cs
try
{
debugFont = State.Content.Load<SpriteFont>(@"" + Path.Combine(
State.GetSettingVariable("FontDirectory"), "DebugFont"));
}
catch (Exception exp)
{
}
[…]
if (debugFont == null)
throw new GoblinException("You need to add 'DebugFont.spritefont' file to your " +
"content directory before you can display debug information");
毕竟,这听起来确实像是一个数据问题。检查DebugFont的文件属性。