【问题标题】:Implementing WordNetdotNet in Unity在 Unity 中实现 WordNetdotNet
【发布时间】:2018-02-21 22:54:46
【问题描述】:

我目前在从 WordNetdotNet 集成 WordNet 库时遇到问题。我在“Settings.Designer.cs”文件中收到来自 Unity 的编译错误:

错误 CS0234:命名空间“System.Configuration”中不存在类型或命名空间名称“ApplicationSettingsBase”。您是否缺少程序集参考?

下面是“Settings.Designer.cs”的代码

namespace Properties {

[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase  {

    public static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

    public static Settings Default {
        get {
            return defaultInstance;
        }
    }
}

}

任何指导将不胜感激!

WordNetdotNet git:https://github.com/ebswift/wordnetdotnet

*Settings.Designer.cs 位于“Library > cs > Properties”文件夹中。

【问题讨论】:

  • 你能用你可以分享的代码创建一个最小完整的可验证示例吗? stackoverflow.com/help/mcve
  • @CharlieJoynt 我编辑了帖子以包含代码
  • 希望能回答的人早日出现。 :-)

标签: c# .net unity3d wordnet


【解决方案1】:

假设您使用的是 Xamarin Studio?

您没有引用程序集System.Configuration

只需右键单击您可以找到的References 文件夹和Edit References,然后添加此程序集。

【讨论】:

  • 标签上写着 Unity
  • 当然,但 Unity 使用 C# 的 IDE。根据操作系统,它通常是 Mac 上的 Xamarin 或 Windows 上的 VS/Sharp Develop。 OP 显然引用了缺少的程序集,因此他可以根据他的 IDE 搜索如何添加。
  • @EatatJoes 您好,感谢您的快速回复。我在 Unity 中使用 MonoDevelop 并完全按照您的建议进行操作;但是,当我将 System.Configuration 包添加到程序集引用时,仍然存在相同的错误。我保存了项目并重新启动了 Unity - 并注意到 System.Configuration 包丢失了(即使我之前添加了它并且它清楚地显示了)......我尝试在 Visual Studio 中添加包,它在我保存后消失了也退出程序。知道可能是什么问题吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-03-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多