public static void Unregister(Type t)
 {
     try
     {
         ShellUtility.UnregisterVsShellContextMenuHandler(t.GUID, ".cs");
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message); // Log the error
         throw;                         // Re-throw the exception
     }
 }
 public static void Register(Type t)
 {
     try
     {
         ShellUtility.RegisterVsShellContextMenuHandler(t.GUID, ".sln",
                                                        "VsVsShellContextMenuHandler.Extension Class");
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message); // Log the error
         throw;                         // Re-throw the exception
     }
 }