views:

33

answers:

1

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?

+2  A: 

This is how I did it, not sure if there is a better way

<Reference Include="FunkyAssembly">
   <HintPath>Dependancies\FunkyAssembly.dll</HintPath>
</Reference>

to

<Reference Include="Dependancies\FunkyAssembly.dll">
</Reference>
Ryan
Is it me or has the msbuild/csproj thing been taken over by the same people who made Windows Installer so unintelligible? There are only 3 people in the world who really understand it, one is dead, one is mad and the other has forgotten...
Ryan