c# - Visual Studio 可以理解,但 Unity 不能?

标签 c# unity-game-engine using

我已在 Visual Studio 中安装了 Microsoft.Identity.Client,现在可以在代码中声明 using Microsoft.Identity.Client;。 Visual Studio 很高兴。然而,Unity 却并非如此。

Assets\Scripts\AutoKhan.cs(8,17): error CS0234: The type or namespace name 'Identity' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

我必须做什么才能让 Unity 同样满意?

最佳答案

我在使用外部库时遇到了类似的问题。由于 Unity 编译项目的方式不同,通常需要将 dll 添加到您的项目中。

这可能有用。 How to use an external dll

关于c# - Visual Studio 可以理解,但 Unity 不能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62223096/

相关文章:

unity-game-engine - Unity3D : is it possible to check the volume of both Android and iPhone devices?

c# - 没有 WaitForExit() 的 using 语句中的进程会发生什么情况?

C#CA2000 :Dispose objects before losing scope using FileStream/XmlTextReader

c# - 创建和下载 zip 存档作为 HttpContent 时的内存使用情况

c# - 如何确定 Excel 工作簿中有多少个工作表?

c# - 如何在 C# 中为窗口添加滚动条

java - Google Play 游戏无法再次登录

c# - 如何在不丢失任何形状的情况下简化基本网格?

c# - C#中基类的 `using`指令是否被子类继承?

c# - DLLImport 不适用于 Azure 应用服务网络。 3.1