title: "Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0' is not registered for COM Interop. Please register it with regasm.exe /tlb
body: <p>i have installed vs 2013, and i am trying to create my Custom VisualStudio tool, but when build my project i accrued this error:</p>
  
  <pre><code>The assembly "Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered for COM Interop. Please register it with regasm.exe /tlb
  </code></pre>
  
  <p>i tried to register it with regasm but this not fixed my problem, my code looks like:</p>
  
  <pre><code>[Guid("6ECD98B5-C7E5-462E-8922-24890A8F3FE1")]
      [ComVisible(true)]
      public class GPFDicKeyToEnumGenerator : BaseCodeGeneratorWithSite
      {
          protected override byte[] GenerateCode(string inputFileName, string inputFileContent)
          {
              return System.Text.Encoding.ASCII.GetBytes(
  @"
  using System;
  
  namespace My.Name.Space
  {
      public class foo
      {
      }
  }
  ");
          }
  
          public override string GetDefaultExtension()
          {
              return ".cs";
          }
  
          #region Registration
          private static Guid CustomToolGuid =
              new Guid("{6ECD98B5-C7E5-462E-8922-24890A8F3FE1}");
  
          private static Guid CSharpCategory =
              new Guid("{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}");
  
          private const string CustomToolName = "GAMA.gpf.SDK.Tools";
  
          private const string CustomToolDescription = "Generate Enum of Keys for GPFDictionary";
  
          private const string KeyFormat
              = @"SOFTWARE\Microsoft\VisualStudio\{0}\Generators\{1}\{2}";
  
          protected static void Register(Version vsVersion, Guid categoryGuid)
          {
              string subKey = String.Format(KeyFormat,
                  vsVersion, categoryGuid.ToString("B"), CustomToolName);
  
              using (RegistryKey key = Registry.LocalMachine.CreateSubKey(subKey))
              {
                  key.SetValue("", CustomToolDescription);
                  key.SetValue("CLSID", CustomToolGuid.ToString("B"));
                  key.SetValue("GeneratesDesignTimeSource", 1);
              }
          }
  
          protected static void Unregister(Version vsVersion, Guid categoryGuid)
          {
              string subKey = String.Format(KeyFormat,
                  vsVersion, categoryGuid.ToString("B"), CustomToolName);
  
              Registry.LocalMachine.DeleteSubKey(subKey, false);
          }
  
          [ComRegisterFunction]
          public static void RegisterClass(Type t)
          {
              // Register for both VS.NET 2012, 2013 (C#)
              Register(new Version(11, 0), CSharpCategory);
              Register(new Version(12, 0), CSharpCategory);
          }
  
          [ComUnregisterFunction]
          public static void UnregisterClass(Type t)
          {
              // UnRegister for both VS.NET 2012, 2013 (C#)
              Register(new Version(11, 0), CSharpCategory);
              Register(new Version(12, 0), CSharpCategory);
          }
  
          #endregion Registration
      }
  </code></pre>
  
  <p>please help me to fix this problem.</p>