title: Cannot load library into assembly (GAC)
body: <p>I am using visual studio 2010 on windows server 2010 with Sharepoint 2010 server. I am deploying webparts to a Sharepoint instance running on the same server. </p>
  
  <p>My new webpart makes use of a custom library, <code>AE.Net.Mail</code>. When I deploy this webpart, I get the <code>Could not load file or assembly...</code> error for <code>AE.Net.Mail</code>. I have run <code>gacutil</code> but I do not see the assembly in <code>C:\Windows\assembly</code>. I do see it in a subdirectory of <code>C:\Windows\Microsoft.NET\assembly</code>. </p>
  
  <p>Now I am not sure about this but I think when my Sharepoint instance runs, it only looks at <code>C:\Windows\assembly</code>. And that is why it is not able to find the library. The reason I believe this is that the name of my webpart is present in <code>C:\Windows\assembly</code>. It's being cached there and not in a subdirectory of <code>C:\Windows\Microsoft.NET\assembly</code>.</p>
  
  <p>I am using version <code>AE.Net.Mail Version 1.6.0.0</code> which is compatible with <code>.NET 3.5</code>. I think my Sharepoint server is using 3.5 although 4.0 is present on the machine. I think so because when I tried to install the the library using nuget, I couldn't install the latest version that requires .NET 4.0. The error said that my project is using 3.5. Version 1.6.0.0 is compatible with 3.5</p>
  
  <p>So, what do you guys think is going on and how do you think I can get <code>AE.Net.Mail</code> into <code>C:\Windows\assembly</code>? Been at this for hours now and I can't figure it out (Dragging and dropping doesn't work)</p>
  
  <p>Thanks guys. :)</p>