Setting "SpecificVersion" to true, in addition to specifying "hintPath", seems to be a solution because it "prevents visual studio from using multiple target rules to allow assembly."
However, as soon as foo.dll is unavailable (when creating or loading a project), Visual Studio starts the magic and changes the build path to the nearest build.
After that, it does not matter if the original foo.dll file is restored to its location (at the specified path) or even CHANGED ! - Visual Studio still refers to its recently found match. This is very undesirable .
Possible solutions:
The strong name is foo.dll, but then foo.dll can only refer to other strong named assemblies (often unwanted).
Configure assembly permission by registering for the event in the parent application. This allows you to pinpoint where to find the target assembly at runtime, but it seems too large to solve this simple problem.
My one working on this problem (easily) was to set LOCAL COPY to FALSE and add a post assembly to the project that manually copies the target assembly to the target bin folder. The bad part of this is the amount of duplication (and decoupling) created between the post-build phase and the configuration of the project links.
Please Microsoft - add an option to the Reference properties page that will prioritize hintPath (which we will explicitly indicate) by the magic path of surprise ... or at least throw a warning / error if they differ from each other!
Fortmann Mar 26 '14 at 13:05 2014-03-26 13:05
source share