Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
980 views
in Technique[技术] by (71.8m points)

unity3d - Add Reference is missing in Visual Studio when using with Unity 3D - Need Npgsql.dll

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!

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

Can anyone give light?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


Things to do in Unity:

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

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:

enter image description here


Things to do in Visual Studio:

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

enter image description here

Now Browse to your DLL:

enter image description here

And... there it is:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...