Add the following project file immediately after the comment section:
<Target Name="BeforeResolveReferences"> <CreateProperty Value="YOUR_FIRST_PATH;YOUR_SECOND_PATH;$(AssemblySearchPaths)"> <Output TaskParameter="Value" PropertyName="AssemblySearchPaths" /> </CreateProperty> </Target>
Replacing YOUR_FIRST_PATH and YOUR_SECOND_PATH your paths.
It is important that this happens after the next line or your setting will be overwritten:
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Writing $(AssemblySearchPaths) at the end of the DLL string in your paths will invalidate the normal resolution. If you move it to the beginning, the usual resolution is executed first, and additional paths are checked for all that were not found. Normal resolution includes <HintPath> sections, so there is no need to delete them if your paths go first.
Vladimir Shutow Apr 04 '13 at 16:32 2013-04-04 16:32
source share