MonoDevelop 和/或 MonoTouch 错误?
当尝试编译一些之前编译良好且没有错误的代码时,我开始收到有关名称空间中不存在的类的错误。
我知道这之前编译得很好,我没有修改它,我使用的Mac刚刚进入睡眠状态,我再次唤醒它,发现发生了这个错误。
错误如下:
'类型或命名空间 “ContentManager”不存在于 名称空间 'Microsoft.Xna.Framework.Content'。是 您缺少程序集参考吗?'
在 Mac 进入睡眠状态之前,这段代码运行良好,所以我想知道这是否是两者之间的链接。我已经检查过,并且 100% 确定 ContentManager 确实存在于 Microsoft.Xna.Framework.Content 中,甚至 MonoDevelop 也能够带我查看它的声明,所以我确信这不是损坏的代码。
我尝试将项目(MonoGame.Framework.iOS)卸载/重新加载到解决方案中,但这没有帮助,还尝试删除其中的 pidb 文件,仍然没有结果。
这实际上是第二次发生这种情况,我想上次我只是删除了该项目并重新开始,但这次我真的不想这样做。
那么关于修复这个错误有什么想法吗?
When trying to compile some code, which had been compiling fine before with no errors, I started getting an error about a class not existing in a namespace.
I know this was compiling before just fine and I had not modified it, the Mac I was using just went to sleep, I woke it up again and found this error occuring.
The error is as follows:
'The Type or namespace
'ContentManager' does not exist in the
namespace
'Microsoft.Xna.Framework.Content'. Are
you missing an assembly reference?'
Before the mac went to sleep this code was running fine, so I'm wondering if that's a link between the two. I have chekced and I am 100% certain that ContentManager does in fact exist in Microsoft.Xna.Framework.Content, even MonoDevelop is able to take me to its declaration so I know for sure it's not the code that's broken.
I tried unloading/reloading the project (MonoGame.Framework.iOS) into the solution but that didnt help, also tried deleting the pidb file to it, still no results.
This is actually the second time this has happened, I think last time I just deleted the project and started fresh, but I really don't want to do that this time.
So any ideas on fixing this bug?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您升级到 MonoTouch 4.0,您还需要将 Mono 升级到 2.10
If you upgraded to MonoTouch 4.0, you need to also upgrade your Mono to 2.10
在进行构建之前尝试进行“清理”。即:选择“rebuild”而不是“build”;或者选择“clean”,然后选择“build”;或者关闭 IDE 并删除“bin”和“obj”目录,然后再次尝试构建。
尝试检查您的游戏项目中是否确实存在程序集引用。
您的项目是否存在于网络共享上?
Try doing a "clean" before you do a build. That is: select "rebuild" instead of "build"; or select "clean" and then select "build"; or close your IDE and delete the "bin" and "obj" directories and then try your build again.
Try checking that assembly reference actually exists in your game project.
Do any of your projects exist on a network share?