MSBuild - setting a reference path
Posted
by Ryan
on Stack Overflow
See other posts from Stack Overflow
or by Ryan
Published on 2010-06-18T15:49:15Z
Indexed on
2010/06/18
15:53 UTC
Read the original article
Hit count: 392
I have several assemblies my project is dependant upon.
These are stored in the Project's directory under the "Dependencies" folder.
So something like this.
Solution
- Project
- Dependancies
FunkyAssembly.dll
- bin
- Debug
- Release
SomeCode.cs
I've referenced FunkyAssembly.dll using Browse and in project.csproj I see
<Reference Include="FunkyAssembly">
<HintPath>Dependancies\FunkyAssembly.dll</HintPath>
</Reference>
So far so good - except after a release build FunkyAssembly.dll is copied to the Release directory (not a problem in itself) but then future debug builds will reference this copy rather than the copy in Dependencies.
You can see this if you at Path in the reference properties.
This means that if Dependencies\FunkyAssembly.dll is updated the build won't pick it up as its referencing the old copy in bin/Release.
Any way to FORCE the damn thing to pick up Dependencies\FunkyAssembly.dll rather than HINT?
© Stack Overflow or respective owner