title: Specify the search path for DllImport in .NET
body: <p>Is there a way to specify the paths to be searched for a given assembly that is imported with DllImport?</p>
  
  <pre><code>[DllImport("MyDll.dll")]
  static extern void Func();
  </code></pre>
  
  <p>This will search for the dll in the app dir and in the PATH environment variable. But at times the dll will be placed elsewhere. Can this information be specified in app.config or manifest file to avoid dynamic loading and dynamic invocation?</p>