title: How does Visual Studio load libraries?
body: <p>I have a solution with C#, C++ &amp; C++/CLI projects. To be more specific: it is C++ core (~5 unmanaged dll's), C++/CLI core wrapper and C# assemblies with project-specific buisness logic. </p>
  
  <p>Some time ago I figured out that VS 2008 form designer (WinForms) sometimes can't load core wrapper assembly. After a few hours spent with VS debugger and Procmon I found out that VS can't load assembly because it can't resolve unmanaged libraries that wrapper depends on. VS searches in every system folder and folder from PATH environment variable, but not in folder where wrapper assembly is located. </p>
  
  <p>Moreover, I have 2 forms in one assembly, one is inherited from another: VS form designer loads parent form fine and fails with loading an inherited form.</p>
  
  <p>So, here is my question: does anyone knows the reason of this behavior?</p>
  
  <p>P.S. I used workaround: added folder with project binaries to PATH variable, but I still want to know the reason.</p>