-2

I am running a C# web api project on Visual Studio 2019. The project is set up to pull a particular dependency from NuGet. However, I want that particular dependency to point to a local dll I have on my local machine that was built via another VS2019 solution.

When I try to reference it via a HintPath within ItemGroup it still appears to reference the binary from NuGet. I've also tried copy pasting the dll into the directory from which the project runs but am met with this error:

enter image description here

Any help would be appreciated. Thanks!

  • 1
    Can you either use a project reference, or package up the local dependency into a nupkg file and use a local package source? – Jon Skeet Aug 10 '21 at 06:03
  • Hi [https://stackoverflow.com/users/22656/jon-skeet](Jon Skeet). That totally worked. Thank you! – programmercurious82 Aug 10 '21 at 17:48
  • Does this answer your question? [How to add a .dll reference to a project in Visual Studio](https://stackoverflow.com/questions/12992286/how-to-add-a-dll-reference-to-a-project-in-visual-studio) and [How do I install a NuGet package .nupkg file locally?](https://stackoverflow.com/questions/10240029/how-do-i-install-a-nuget-package-nupkg-file-locally) –  Aug 12 '21 at 11:12

1 Answers1

-2

You make a right click on references in your project and click on "Add Reference". Then click on "Browse" and select your local dll.

arne
  • 123
  • 9