Page 1 of 1

Adding a reference to an external DLL library for one specific project

Posted: Sun Nov 15, 2020 2:16 am
by Amer

Hello,

I need to reference an external DLL library for only one of my projects.

I know how to include one using the "usercode.js" but that js file is an IDE-Level file (not Project-Level) so it is shared with all projects and will cause the library to be included with all of them (the thing which I am trying to avoid).

What is the correct way to do that at a Project-Level? (referencing the dll in the .csproj is not an option since it will be overwritten with every generates).

Thank you


Re: Adding a reference to an external DLL library for one specific project

Posted: Sun Nov 15, 2020 8:39 am
by MichaelG

Try adding the package in Tools -> NuGet Packages.


Re: Adding a reference to an external DLL library for one specific project

Posted: Sun Nov 15, 2020 12:16 pm
by Amer

Thanks for your response, unfortunately, it is not available as a NuGet package, only as a DLL.

by the way, can I add a reference to a nuget package from my local drive? I read in the documents that a package can be added from nuget.org, with no mention of other sources.


Re: Adding a reference to an external DLL library for one specific project

Posted: Mon Nov 16, 2020 7:20 am
by MichaelG

I know how to include one using the "usercode.js" but that js file is an IDE-Level file (not Project-Level) so it is shared with all projects and will cause the library to be included with all of them (the thing which I am trying to avoid).

You can try to add checking for ProjName in usercode.js. For example:

if (PROJ.ProjName == "Project1") {
//... Add namespace
}


Re: Adding a reference to an external DLL library for one specific project

Posted: Tue Nov 17, 2020 7:07 am
by Amer

Thank you Michael, nice workaround 👍
I will use it as a temporary solution, but still wishing this feature to be added in a future release.