Changing C# .dll references from absolute to relative
问题 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? 回答1: Edit the .csproj file and change the <HintPath> elements from absolute paths to relative paths. 回答2: You may also write your handler for resolving assemblies. In the simplest form it may look like this: AppDomain.CurrentDomain