MonoTouch / MonoDevelop:当设置项目到目标iPhone设备组件最终丢失?

时间:2011-04-29 17:46:06

标签: c# mono xamarin.ios monodevelop

我正在使用MonoTouch运行MonoDevelop,并且在构建代码时尝试定位设备(即Debug | iPhone)。但是,当我这样做时,编译器会引发一堆错误,引用缺少的程序集。

如果我构建目标模拟器这些错误没有显示,我知道我已经包含了程序集,甚至IDE'看到'这些程序集中的程序集和自动填充命名空间,因为我输入它们。

任何可能导致它的想法?我已经尝试过新的重建......

我从MonoTouch的试用版更新了,如果这有任何不同。

以下是一些错误(它们都是这种错误):

/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Util/UI/MenuObj.cs(31,31): Error CS0234: The type or namespace name `Audio' does not exist in the namespace `Microsoft.Xna.Framework'. Are you missing an assembly reference? (CS0234) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Util/UI/MenuObj.cs(31,31): Error CS0234: The type or namespace name `Media' does not exist in the namespace `Microsoft.Xna.Framework'. Are you missing an assembly reference? (CS0234) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/JabJect.cs(40,40): Error CS0246: The type or namespace name `ContentManager' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Media/Sprite.cs(31,31): Error CS0234: The type or namespace name `Audio' does not exist in the namespace `Microsoft.Xna.Framework'. Are you missing an assembly reference? (CS0234) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Scene/GameScene.cs(42,42): Error CS0246: The type or namespace name `ContentManager' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (Engine-MonoTouch)

1 个答案:

答案 0 :(得分:1)

如果你正在使用MT 4.x,那么在将程序集编译成本机代码时会有一些比赛。但是,您的描述中的错误看起来是来自编译托管代码(并且不是并行完成的,所以不应该有任何竞争条件影响构建的那部分)。

这会使它(有时)在链接时跳过程序集,导致(很难重现)构建错误。这将在下一版MonoTouch中修复。

这种情况永远不会发生在模拟器上,因为在这种情况下没有AOT(编译为本机)(即使用了JIT)。