【问题标题】:Unable to build mobile MonoGame project because of a "could not import" error由于“无法导入”错误,无法构建移动 MonoGame 项目
【发布时间】:2016-06-27 03:55:46
【问题描述】:

我第一次制作移动 MonoGame 应用程序,但每当我尝试构建 iOS 时都会出现此错误

Error: /Users/edward/Library/Mobile Documents/com~apple~CloudDocs/apps/Xamarin/Android/Radiant/iOS/Radiant.iOS.csproj: /Users/edward/Library/Mobile Documents/com~apple~CloudDocs/apps/Xamarin/Android/Radiant/iOS/Radiant.iOS.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" (Radiant.iOS)

Android 会出现此错误

Error: /Users/edward/Library/Mobile Documents/com~apple~CloudDocs/apps/Xamarin/Android/Radiant/Android/Radiant.Droid.csproj: /Users/edward/Library/Mobile Documents/com~apple~CloudDocs/apps/Xamarin/Android/Radiant/Android/Radiant.Droid.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" (Radiant.Droid)

在参考栏左侧,MonoGame.Framework 是灰色的,旁边有一个红色的 X

【问题讨论】:

  • 看来您需要解决对 MonoGame 框架的引用。尝试删除引用并将其添加回来。
  • @jjhavokk 我试过了,但是当我点击编辑引用重新添加它时,monogame 没有出现,当我尝试删除插件并重新添加它时,它没有出现在已安装的插件或插件商店。

标签: c# android ios xamarin monogame


【解决方案1】:

好的,我自己解决了这个问题,我去了MonoGame addin page 并下载了稳定版本。然后我在 Xamarin 中打开插件列表,然后单击从文件安装。我选择了我下载的稳定版本,然后从那里安装它。它给了我一个关于 MonoDevelop 的错误,但我只是忽略了它,它工作正常。

【讨论】:

    猜你喜欢
    • 2014-06-25
    • 2018-03-07
    • 2015-04-17
    • 2022-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多