.net - Visual Studio 2010 - how to force project reference to use exact path NOT GAC or Program Files? -


we're forever having problem, have number of solutions , adjacent /components/ folder. dlls want reference in folder. of them we've built source use specific version number existins in components binary when user on different machine gets-latest of tfs , has exact on disk structure visual studio still changes references ones installed in program files, gac or elsewhere.

have tried manually editing proj file include hintpath, e.g.

<reference include="foo, version=5.5.5.5, culture=neutral, processorarchitecture=msil">     <specificversion>false</specificversion>     <hintpath>..\components\foo.dll</hintpath> </reference> 

to no avail. how force visual studio respect path?

setting "specificversion" true, in addition specifying "hintpath" seemed solution because "prevents visual studio using multiple target rules assembly resolution".

however, once foo.dll unavailable (while building or loading project) visual studio magic kicks in , changes assembly target path nearest 'matching' assembly.

after point, doesn't matter whether original foo.dll restored location (at target pathname) or changed! - visual studio still refers newly found match. this undesirable.

possible solutions:

  1. strong name foo.dll, foo.dll may reference other strong named assemblies (often undesirable).

  2. customize assembly resolution registering event in parent application. allows define find target assembly @ runtime - seems far effort resolve simple problem.

my work around problem (easily) set local copy false, , add post build step project, manually copies target assembly target bin folder. bad part amount of duplication (and decoupling) created between post-build step , references configuration of project.

please microsoft - add option reference property page that prioritize hintpath (which explicitly specify) on surprise magic path... or @ least, throw warning/error if 2 differ 1 another!


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -