Sunday, May 23, 2010

Visual Studio - Search order for assemblies

Search order for assemblies when building a project of a solution in Visual Studio:

* Files from the current project indicated by {CandidateAssemblyFiles}.
* $(ReferencePath) property that comes from .user/targets file.
* $(HintPath) indicated by reference item.
* Target framework directory.
* Directories found in registry that uses AssemblyFoldersEx Registration.
* Registered assembly folders, indicated by {AssemblyFolders}.
* $(OutputPath) or $(OutDir)
* GAC

If the desired assembly is found by HintPath, but an alternate assembly can be found using ReferencePath, it will prefer the ReferencePath to the HintPath one.
Share/Bookmark

No comments: