title: Run .Net 2 DLL on .Net 4 using native host app
body: <p>As you know , we can run executable .net application on different .net CLR versions using application config file ( for example MyProject.exe.config ) by following content :</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;startup&gt; 
          &lt;supportedRuntime version="v4.0"/&gt;
          &lt;supportedRuntime version="v2.0.50727"/&gt;
        &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>i search for this trick to use it on .Net DLL files but nothing found , i test it using config file like MyDLL.dll.config , at the begining i think CLR do not use my dll config file ( my DLL builded using .Net framework 2 and on my VM i have just .Net Framework 4 )  when i run my native application that use .Net DLL , it throw the exception : Can't find CLR version or something like this .</p>
  
  <p>in my test process i see a strange encounter , if my DLL build using .Net Framework 4 and run it on VM's windows , it run properly ( VM's windows has .Net 4 and it's normal behavior ) , but if i put a config file inside my DLL ( MyDLL.dll.config ) and put the following content in it , it can't run and throw same exception as .Net Framework 2 , it meanse the CLR can see the dll's config file and use it !</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;startup&gt; 
          &lt;supportedRuntime version="v2.0.50727"/&gt;
        &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>What's your idea about this problem ? why .Net 4 can not run my .Net 2 DLL but it can run application (exe file) by same config properly ?</p>
  
  <p>Sorry for my bad English .</p>