public void Should_Be_Able_To_Install_Machine_Config_File_Changes()
        {
            // Ensure crmado dll is in gac.
            //  AddCrmAdoToGac();

            //  var crmAdoDllPath = System.IO.Path.Combine(CrmAdo.Installation.GAC.GacHelper.CurrentAssemblyDirectory, "CrmAdo.dll");
            // CrmAdo.Installation.GAC.GacHelper.AddToGac(crmAdoDllPath);
            // Now run config updater.
            var currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
            var sut = new CrmAdo.Installation.DataProviderConfigInstaller();
            sut.UpdateConfig("CrmAdo", currentVersion, "en-gb", "abc");
        }
Пример #2
0
        public void Should_Be_Able_To_Install_Machine_Config_File_Changes()
        {
            // Ensure crmado dll is in gac.
            //  AddCrmAdoToGac();

            //  var crmAdoDllPath = System.IO.Path.Combine(CrmAdo.Installation.GAC.GacHelper.CurrentAssemblyDirectory, "CrmAdo.dll");
            // CrmAdo.Installation.GAC.GacHelper.AddToGac(crmAdoDllPath);
            // Now run config updater.
            var currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
            var sut            = new CrmAdo.Installation.DataProviderConfigInstaller();

            sut.UpdateConfig("CrmAdo", currentVersion, "en-gb", "abc");
        }
Пример #3
0
 public static ActionResult RemoveCrmAdoDataProviderConfiguration(Session session)
 {
     try
     {
         DataProviderConfigInstaller configInstaller = new DataProviderConfigInstaller();
         configInstaller.RemoveConfig();
         return ActionResult.Success;
     }
     catch (Exception ex)
     {
         session.Log("ERROR in custom action RemoveCrmAdoDataProviderConfiguration {0}", ex.Message);
         return ActionResult.Failure;
     }
 }
Пример #4
0
 public static ActionResult RemoveCrmAdoDataProviderConfiguration(Session session)
 {
     try
     {
         DataProviderConfigInstaller configInstaller = new DataProviderConfigInstaller();
         configInstaller.RemoveConfig();
         return(ActionResult.Success);
     }
     catch (Exception ex)
     {
         session.Log("ERROR in custom action RemoveCrmAdoDataProviderConfiguration {0}", ex.Message);
         return(ActionResult.Failure);
     }
 }
Пример #5
0
        public static ActionResult ConfigureCrmAdoDataProvider(Session session)
        {
            try
            {
                DataProviderConfigInstaller configInstaller = new DataProviderConfigInstaller();

                // string msiPath = session["OriginalDatabase"];
                string assemblyName   = session.CustomActionData["CrmAdoAssemblyName"];
                string culture        = session.CustomActionData["CrmAdoAssemblyCulture"];
                string publicKeyToken = session.CustomActionData["CrmAdoPublicKeyToken"];
                string versionstring  = session.CustomActionData["CrmAdoVersion"];

                var version = new Version(versionstring);
                configInstaller.UpdateConfig(assemblyName, version, culture, publicKeyToken);
            }
            catch (Exception ex)
            {
                session.Log("ERROR in custom action ConfigureCrmAdoDataProvider {0}", ex.Message);
                return(ActionResult.Failure);
            }
            return(ActionResult.Success);
        }
Пример #6
0
        public static ActionResult ConfigureCrmAdoDataProvider(Session session)
        {
            try
            {
                DataProviderConfigInstaller configInstaller = new DataProviderConfigInstaller();

                // string msiPath = session["OriginalDatabase"];
                string assemblyName = session.CustomActionData["CrmAdoAssemblyName"];
                string culture = session.CustomActionData["CrmAdoAssemblyCulture"];
                string publicKeyToken = session.CustomActionData["CrmAdoPublicKeyToken"];
                string versionstring = session.CustomActionData["CrmAdoVersion"];

                var version = new Version(versionstring);
                configInstaller.UpdateConfig(assemblyName, version, culture, publicKeyToken);

            }
            catch (Exception ex)
            {
                session.Log("ERROR in custom action ConfigureCrmAdoDataProvider {0}", ex.Message);
                return ActionResult.Failure;
            }
            return ActionResult.Success;
        }
 public void Should_Be_Able_To_Uninstall_Machine_Config_File_Changes()
 {
     var sut = new DataProviderConfigInstaller();
     sut.RemoveConfig();
 }