与 Unity 3D 一起使用时,Visual Studio 中缺少添加引用 - 需要 Npgsql.dll [英] Add Reference is missing in Visual Studio when using with Unity 3D - Need Npgsql.dll

查看:12
本文介绍了与 Unity 3D 一起使用时,Visual Studio 中缺少添加引用 - 需要 Npgsql.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio 2017 安装了 Unity 2017.我尝试通过解决方案资源管理器将外部 DLL 添加到 Visual Studio 项目.当我右键单击引用"时,添加引用"选项完全丢失了!

I installed Unity 2017 with Visual Studio 2017. I am attempting to add an external DLL to the Visual Studio project through the solution explorer. When I right click on References, the "Add Reference" option is completely missing!

我正在尝试使用 NpgSQL.因此,需要添加 npgsql.dll.

I'm trying to use NpgSQL. Hence, the need to add npgsql.dll.

有人可以发光吗?

推荐答案

Add Reference... 在这种情况下位于不同的位置.

The Add Reference... is in a different place in this case.

在 Unity 中要做的事情:

创建一个名为 Plugins 的文件夹作为 Assets 文件夹的子文件夹.(资产插件...)

Create a folder named Plugins as a child to your Assets folder. (AssetsPlugins...)

接下来将您的 DLL 复制到此插件文件夹.您可以使用 Windows 资源管理器执行此操作,也可以将其拖到 Unity 编辑器中的文件夹中,如下所示:

Next copy your DLL to this plugins folder. You can do this using Windows Explorer or just drag it into the folder in the Unity editor, like shown:

在 Visual Studio 中要做的事情:

点击您项目中的分析器,如下所示,然后点击菜单中的项目,然后导航添加参考...:

Click on Analyzers in your project as shown below, then click Project from your menu, then navigate to Add Reference...:

现在浏览到您的 DLL:

Now Browse to your DLL:

还有……就是这样:

这篇关于与 Unity 3D 一起使用时,Visual Studio 中缺少添加引用 - 需要 Npgsql.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆