title: Why  the .NET framework takes so long to install? Why is it complex to make it portable?
body: <p>I am asking this question primarly to learn. Let's say I want to send a very small console application <code>(50 lines of code Also I am using the System.Text.RegularExpresion namespace.)</code> to a friend writen on c# on .net framework 4.0 . I will like to make the application portable therefore I just send him the output of the bin directory.</p>
  
  <p>Why does he has to install the .net framework 4.0 client  which it takes quite a while. Also it will be nice to include only the dll libraries that I plan on using in this case system.dll (that library contains system.text.regularexpressions namespace). </p>
  
  <p>In other words why is it that I cannot include system.dll in my console application in order to make it portable and for it to work on a computer that does not have the .net framework installed. </p>
  
  <p>Why is the installation of .net framework 4.0 so complex? What would happen if windows where to place all .net libraries on <code>C:\Program Files\.net framework 4.0\</code> and then on the installation write a key to the registry of the path where that framework was installed so that programs are able to find the nessesary dlls.</p>
  
  <p>Why are installations so complex on general?</p>
  
  <p><strong>I tried to decomplile system.dll with reflector then include that on my project and that did not worked</strong> </p>
  
  <h2>Edit</h2>
  
  <p>I guess my question should have been why .net framework 4.0 takes so long to instal? Why is it not posible to run the .net framework 4.0 if windows where to place the necessary dlls on program files and then write to the registry the path where those dlls are located. That process would have been much faster. Why not do it that way?</p>
  
  <hr>
  
  <h2><strong>So in conclusion</strong></h2>
  
  <p>Thanks for the help I understand now how important is the CLR. <strong>I guess the only part that I am missing to understand is why installations take so long.</strong> I understand that there are thousands of dlls. Unziping those dlls to program files and writing 10000 keys on the registry should be much more quicker. </p>