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

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Amer
User
Posts: 79

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

Post 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


MichaelG
User
Posts: 1110

Post by MichaelG »

Try adding the package in Tools -> NuGet Packages.


Amer
User
Posts: 79

Post 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.


MichaelG
User
Posts: 1110

Post 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
}


Amer
User
Posts: 79

Post 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.


Post Reply