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"); }
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 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; }