Modified:
branches/5.1/CHANGES
branches/5.1/Driver/Source/Installer.cs
Log:
- Fixed problem with installer where the installation would fail if the performance
counter categories had already been removed for some reason
Modified: branches/5.1/CHANGES
===================================================================
--- branches/5.1/CHANGES 2007-10-15 15:04:22 UTC (rev 1032)
+++ branches/5.1/CHANGES 2007-10-15 21:40:12 UTC (rev 1033)
@@ -3,6 +3,8 @@
(Bug #31185)
- Fixed problem where closing the connection before the reader where the reader was
opened with CloseConnection would cause a object disposed exception to be thrown
+ - Fixed problem with installer where the installation would fail if the performance
+ counter categories had already been removed for some reason
Version 5.1.3 - 9/19/2007
- Fixed problem with using a stored procedure that takes a parameter as a select
routine
Modified: branches/5.1/Driver/Source/Installer.cs
===================================================================
--- branches/5.1/Driver/Source/Installer.cs 2007-10-15 15:04:22 UTC (rev 1032)
+++ branches/5.1/Driver/Source/Installer.cs 2007-10-15 21:40:12 UTC (rev 1033)
@@ -38,6 +38,8 @@
[RunInstaller(true)]
public class CustomInstaller : Installer
{
+ int perfMonIndex;
+
public CustomInstaller()
{
// add in a perf mon installer
@@ -58,7 +60,7 @@
p.Counters.Add(ccd1);
p.Counters.Add(ccd2);
- Installers.Add(p);
+ perfMonIndex = Installers.Add(p);
}
/// <summary>
@@ -152,6 +154,11 @@
/// <param name="savedState"></param>
public override void Uninstall(System.Collections.IDictionary savedState)
{
+ // if our category doesn't exist, then we don't want to run the perf mon
+ // installer
+ if (!PerformanceCounterCategory.Exists(Resources.PerfMonCategoryName))
+ base.Installers.RemoveAt(perfMonIndex);
+
base.Uninstall(savedState);
RemoveProviderFromMachineConfig();
| Thread |
|---|
| • Connector/NET commit: r1033 - in branches/5.1: . Driver/Source | rburnett | 15 Oct |