在C#中,我如何使用本地C#文件中的类?
在我的chatterbot.cs
文件中,我尝试使用ChatterBotAPI.ChatterBot
但我收到了错误
System.InvalidOperationException:类型或命名空间名称`ChatterBotAPI'无法找到。你错过了装配参考吗?
我有一个像这样的目录结构:
.
├── RunProject.exe
├── bot-api
│ ├── README.md
│ ├── dotnet
│ │ ├── ChatterBotAPI
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── ChatterBot.cs
│ │ │ ├── ChatterBotAPI.csproj
│ │ │ ├── ChatterBotFactory.cs
│ │ │ ├── ChatterBotSession.cs
│ │ │ ├── ChatterBotThought.cs
│ │ │ ├── ChatterBotType.cs
│ │ │ ├── Cleverbot.cs
│ │ │ ├── Pandorabots.cs
│ │ │ └── Utils.cs
│ │ ├── ChatterBotAPI.sln
│ │ ├── ChatterBotAPITest
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── ChatterBotAPITest.csproj
│ │ │ └── Main.cs
│ │ └── ChatterBotAPITestVB
│ │ ├── Application.vb
│ │ ├── AssemblyInfo.vb
│ │ └── ChatterBotAPITestVB.vbproj
└── chatterbot.cs
如何在chatterbot.cs文件中使用ChatterBotAPI中的类?
重要提示:我没有使用VS IDE进行编译。我正在使用RunProject.exe,它是一个C#.NET二进制文件,它可以动态运行C#脚本。它加载并运行chatterbot.cs