title: Trouble registering ChilkatDotNet4.dll to the GAC
body: <p>I'm trying to add a .NET 4.0 .dll to the GAC.  I am attempting to do this because it is published by a 3rd party company as both a 32 and 64bit .dll which I must use from different apps on different platforms in both formats.</p>
  
  <p>At any rate, I am having trouble registering this dll to the GAC on a Windows Server 2008 environment.</p>
  
  <p>I have tried copying gacutil.exe (and supporting file) found at "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools" on my local machine to the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" folder on the target production server per the suggestions found <a href="http://social.msdn.microsoft.com/Forums/en/netfxsetup/thread/8289751b-be25-4a23-a5e2-709645b8c651" rel="noreferrer">here</a>.</p>
  
  <p>I then tried copying them to "C:\Windows\Microsoft.NET\Framework64\v4.0.30319".</p>
  
  <p>Running from both locations indicated successful installation.  And indeed, the registration appears successful:</p>
  
  <ul>
  <li>C:\Windows\Microsoft.NET\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll</li>
  <li>C:\Windows\Microsoft.NET\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll</li>
  </ul>
  
  <p>However, running a console app that refers to the (64bit) version of the dll errors out with the following message:</p>
  
  <blockquote>
    <p>System.IO.FileNotFoundException: Could
    not load file or assembly
    'ChilkatDotNet4.dll' or one of its
    dependencies. The specified module
    could not be found. File name:
    'ChilkatDotNet4.dll'</p>
  </blockquote>
  
  <p>So, I have now manually created the following GAC entries using mkdir and copy from a command prompt (which may or may not actually work.  I have no clue what is so special about gacutil.exe):</p>
  
  <ul>
  <li>C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll (using the 64bit version of the dll)</li>
  <li>C:\Windows\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll</li>
  <li>C:\Windows\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll</li>
  </ul>
  
  <p>After each "install" of the dll, I tested and received the same error.  Any ideas welcome!</p>
  
  <hr>
  
  <p><strong>EDIT</strong>: the GAC issue above may not actually be the culprit.  Turns out, even when I create a brand new Console App project and add the .dll directly (so that it lives in the bin), I still can't run it on the sever.  Also, I've noted that Console apps are created targeting the .NET 4.0 Client Profile rather than the .NET Framework 4.  When I try to run it targeting the client profile, it appears that none of the System.Web* libraries are available.  However, I tried running a <em>very simple</em> test app targeting both and neither would run on the server while referencing the bad .dll.  </p>
  
  <p>Is there a special kind of install that was to occur to run .NET 4.0 Console Apps?</p>