Is there a way to create a DLL in VS such that I don't have to keep drag and dropping the dll into unity?

In truth what I really want to do is to add references within VS so that I can use windows specific functions. Clearly Unity is built to allow games to work anywhere so I suspect that is where the challenge lies.

I can create a dll that I drop into the project and that adds a reference (not that I can make anything work…yet) What I would prefer to do is add a DLL project to the VS project created when I edit a script in Unity using VS as my default. That project would create a DLL in the plugins folder and therefore should be added to unity. Thus work in the DLL would show in the project.

That’s not how it appears to work though and I wondered if I am missing an easy work around some how or whether I just have to do the drag and drop all the time. Any help is appreciated.

Possibly I do not understand the question. I build a C++ dll in Visual Studio in a different project as compared to my Unity project. I set the post-build target of the compiled C+±based DLL to the Unity project’s plugin folder according to the type of DLL. For instance, the 64-bit Windows DLL is placed in the …assets\plugin\x86_64 folder along with all other DLL’s that are required. I do this with the following Post-Build event in the C++ project:
SETLOCAL
if “(PlatformShortName)" == "x86" ( set TARGET_PLUGIN_PATH=\Unity\Projects\MyProjectName\Assets\Plugins\x86 ) else ( set TARGET_PLUGIN_PATH=\Unity\Projects\MyProjectName\Assets\Plugins\x86_64 ) echo Target Plugin Path 2 is %TARGET_PLUGIN_PATH% mkdir "%TARGET_PLUGIN_PATH%" copy /Y "(TargetPath)” “%TARGET_PLUGIN_PATH%$(TargetFileName)”
ENDLOCAL

I’m using Managed code in C# so maybe this is the difference. I don’t think I can do what I wanted anyway as Unity simply does not want to work if I include any calls to anything it does not already have.

I wanted to re-use some old code and that meant accessing System.Drawings and System.Speech. I thought to get around challenges by building DLLs that called them and then put that in the directory. Saddly doesn’t work for me. Problem with half arsed trying to learn this and convert old code.

Thanks for the help though.