Changing C# .dll references from absolute to relative

Oded Shaked picture Oded Shaked · Mar 13, 2011 · Viewed 18.5k times · Source

I have compiled my project and some of my project's added .dlls have absolute references. When I try to run my project on another machine, it looks for the .dlls from the original project path.

How can I make the project look for the .dlls using a relative path?

Answer

SLaks picture SLaks · Mar 13, 2011

Edit the .csproj file and change the <HintPath> elements from absolute paths to relative paths.