【问题标题】:MonoTouch/MonoDevelop: when setting project to target iPhone device assemblies end up missing?MonoTouch/MonoDevelop:将项目设置为目标 iPhone 设备组件时最终丢失?
【发布时间】:2011-07-26 06:41:29
【问题描述】:

我正在使用 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)

【问题讨论】:

  • 已编辑和添加,但我真的看不出它有什么帮助,当构建针对模拟器时,会找到并编译所有缺少的程序集。

标签: c# mono xamarin.ios monodevelop


【解决方案1】:

如果您使用的是 MT 4.x,那么在将程序集编译为本机代码时会出现一些竞争。但是,您描述中的错误似乎来自编译托管代码(并且这不是并行完成的,因此不应该有任何竞争条件影响构建的该部分)。

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-25
    • 1970-01-01
    • 2012-12-23
    • 2015-02-12
    • 1970-01-01
    • 1970-01-01
    • 2010-12-11
    • 1970-01-01
    相关资源
    最近更新 更多