Exemplo n.º 1
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            AssemblyName name = typeof(Ankh.VS.VSVersionThunk).Assembly.GetName();

            using (Key key = context.CreateKey(GetKey()))
            {
                key.SetValue("name", name.Name);
                key.SetValue("culture", "neutral");
                key.SetValue("publicKeyToken", TokenToString(name.GetPublicKeyToken()));
                key.SetValue("version", name.Version);
                if (context.GetType().Name.ToUpperInvariant().Contains("PKGDEF"))
                {
                    string dllName = name.Name + "-V4.dll";

                    if (!context.GetType().FullName.Contains("Ankh"))
                    {
                        dllName = name.Name + ".dll"; // Doesn't work in debug mode at this time
                    }
                    key.SetValue("codeBase", Path.Combine("$PackageFolder$", dllName));
                }
                else
                {
                    key.SetValue("codeBase", "[#CF_" + name.Name + ".V4.dll" + "]");
                }
            }
        }
Exemplo n.º 2
0
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     // Create the visibility key.
     using (Key childKey = context.CreateKey(GetPath(context)))
     {
         // Set the value for the command UI guid.
         if (context.GetType().Name.ToUpperInvariant().Contains("PKGDEF"))
         {
             childKey.SetValue(RemapName, new System.Reflection.AssemblyName(context.ComponentType.Assembly.FullName).Version.ToString());
         }
         else
         {
             childKey.SetValue(RemapName, "[ProductVersion]");
         }
     }
 }
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            AssemblyName name = typeof(Ankh.ExtensionPoints.IssueTracker.IssueRepositorySettings).Assembly.GetName();

            using (Key key = context.CreateKey(GetKey()))
            {
                key.SetValue("name", name.Name);
                key.SetValue("culture", "neutral");
                key.SetValue("publicKeyToken", TokenToString(name.GetPublicKeyToken()));
                key.SetValue("oldVersion", "2.1.7172.0-" + name.Version);
                key.SetValue("newVersion", name.Version);
                if (context.GetType().Name.ToUpperInvariant().Contains("PKGDEF"))
                {
                    key.SetValue("codeBase", Path.Combine("$PackageFolder$", name.Name + ".dll"));
                }
                else
                {
                    key.SetValue("codeBase", "[#CF_" + name.Name + ".dll" + "]");
                }
            }
        }