Last post Jan 25, 2021 08:47 AM by PatriceSc
Jan 22, 2021 03:25 PM|apgallon|LINK
First of all, I have to say that I'm new in .NET development, that's why this question may be a little bit silly but I need some guidance. I recently started working with a development team. When this project was shared with me, it had no libraries
inside the project and I had to add them all manually from a local folder I was given. The references were there but they all were marked with warnings because VS was unable to find the files. So I was wondering if there is a way to make relative paths to
references and keep the DLL files inside a project folder to avoid adding them manually.
Thanks in advance!
Jan 22, 2021 09:41 PM|SurferOnWww|LINK
Try putting the required assemblies (i.e., .dll files) in the bin folder of the project?
See following Microsoft document for your reference:
Shared Code Folders in ASP.NET Web Sites
ASP.net assembly loading from GAC or Bin
Jan 25, 2021 06:20 AM|yij sun|LINK
Accroding to your description,I'm guessing that you want to make relative path to references.
If you are visual studio 2017,it is automatic. So just Add Reference as usually.
Note that in Reference Properties absolute path is shown, but in .vbproj/.csproj relative is used.
Just like this:
If it's not automatic.You could do like this:
1.Add the reference in Visual Studio GUI by right-clicking the project in Solution Explorer and selecting Add Reference...
2.Find the *.csproj where this reference exist and open it in a text editor
3.Edit the < HintPath > to be equal to
Jan 25, 2021 08:47 AM|PatriceSc|LINK
They are extenal or internal librairies? This local folder is updated from which source? See maybe with the team to better understand their suggested approach.
Another option could be to use
https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds which allows to share a DLL repository (including having multiple version for each DLL). Then packages are added thhrough nuget and any machine having access to that source can then fetch
the needed DLLs automatically.