Index: tools/install/Installer.cs ================================================================== --- tools/install/Installer.cs +++ tools/install/Installer.cs @@ -85,10 +85,26 @@ Framework = GAC | AssemblyFolders | DbProviderFactory, Vs = VsPackage | VsDataSource | VsDataProvider, All = Framework | Vs, Default = All } + + /////////////////////////////////////////////////////////////////////////// + + [Flags()] + public enum TracePriority + { + None = 0x0, + Lowest = 0x1, + Lower = 0x2, + Low = 0x4, + Medium = 0x8, + High = 0x10, + Higher = 0x20, + Highest = 0x40, + Default = Medium + } #endregion /////////////////////////////////////////////////////////////////////////// #region Installer Class @@ -156,13 +172,24 @@ "yyyy.MM.ddTHH:mm:ss.fffffff"; #endregion /////////////////////////////////////////////////////////////////// - #region Private Data + #region Private Static Data private static object syncRoot = new object(); private static long nextId; + private static TracePriority tracePriority = TracePriority.Default; + #endregion + + /////////////////////////////////////////////////////////////////// + + #region Public Static Properties + public static TracePriority TracePriority + { + get { lock (syncRoot) { return tracePriority; } } + set { lock (syncRoot) { tracePriority = value; } } + } #endregion /////////////////////////////////////////////////////////////////// #region Interactive Support Methods @@ -195,10 +222,11 @@ } /////////////////////////////////////////////////////////////////// public static DialogResult ShowMessage( + TracePriority tracePriority, TraceCallback traceCallback, Assembly assembly, string message, string category, MessageBoxButtons buttons, @@ -205,11 +233,11 @@ MessageBoxIcon icon ) { DialogResult result = DialogResult.OK; - Trace(traceCallback, message, category); + Trace(tracePriority, traceCallback, message, category); if (SystemInformation.UserInteractive) { string title = GetAssemblyTitle(assembly); @@ -216,17 +244,17 @@ if (title == null) title = Application.ProductName; result = MessageBox.Show(message, title, buttons, icon); - Trace(traceCallback, String.Format( + Trace(tracePriority, traceCallback, String.Format( "User choice of \"{0}\".", result), category); return result; } - Trace(traceCallback, String.Format( + Trace(tracePriority, traceCallback, String.Format( "Default choice of \"{0}\".", result), category); return result; } #endregion @@ -326,17 +354,18 @@ /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static string Trace( + TracePriority tracePriority, TraceCallback traceCallback, Exception exception, string category ) { if (exception != null) - return Trace(traceCallback, + return Trace(tracePriority, traceCallback, new StackTrace(exception, true), 0, exception.ToString(), category); return null; } @@ -343,29 +372,39 @@ /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static string Trace( + TracePriority tracePriority, TraceCallback traceCallback, string message, string category ) { - return Trace(traceCallback, null, 1, message, category); + return Trace( + tracePriority, traceCallback, null, 1, message, category); } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] private static string Trace( + TracePriority tracePriority, TraceCallback traceCallback, StackTrace stackTrace, int level, string message, string category ) { + // + // NOTE: If the priority of this message is less than what + // we currently care about, just return now. + // + if (tracePriority < TracePriority) + return message; + // // NOTE: Always skip this call frame if the stack trace is // going to be captured by GetMethodName. // if (stackTrace == null) @@ -948,14 +987,15 @@ { if (rootKey == null) return null; if (verbose) - TraceOps.Trace(traceCallback, String.Format( - "rootKey = {0}, subKeyName = {1}, writable = {2}", - ForDisplay(rootKey), ForDisplay(subKeyName), writable), - traceCategory); + TraceOps.Trace( + writable ? TracePriority.Highest : TracePriority.Higher, + traceCallback, String.Format("rootKey = {0}, " + + "subKeyName = {1}, writable = {2}", ForDisplay(rootKey), + ForDisplay(subKeyName), writable), traceCategory); // // HACK: Always forbid writable access when operating in // 'what-if' mode. // @@ -977,11 +1017,12 @@ { if (rootKey == null) return null; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); try { @@ -1027,11 +1068,12 @@ { if (rootKey == null) return; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); if (!whatIf) rootKey.DeleteSubKey(subKeyName); @@ -1050,11 +1092,12 @@ { if (rootKey == null) return; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); if (!whatIf) rootKey.DeleteSubKeyTree(subKeyName); @@ -1072,11 +1115,12 @@ { if (key == null) return null; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.High, traceCallback, String.Format( "key = {0}", ForDisplay(key)), traceCategory); return key.GetSubKeyNames(); } @@ -1092,11 +1136,12 @@ { if (key == null) return null; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.High, traceCallback, String.Format( "key = {0}, name = {1}, defaultValue = {2}", ForDisplay(key), ForDisplay(name), ForDisplay(defaultValue)), traceCategory); return key.GetValue(name, defaultValue); @@ -1114,11 +1159,12 @@ { if (key == null) return; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( "key = {0}, name = {1}, value = {2}", ForDisplay(key), ForDisplay(name), ForDisplay(value)), traceCategory); if (!whatIf) key.SetValue(name, value); @@ -1137,11 +1183,12 @@ { if (key == null) return; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( "key = {0}, name = {1}", ForDisplay(key), ForDisplay(name)), traceCategory); if (!whatIf) key.DeleteValue(name); @@ -1243,10 +1290,11 @@ string directory, string coreFileName, string linqFileName, string designerFileName, InstallFlags installFlags, + TracePriority tracePriority, bool install, bool noDesktop, bool noCompact, bool noNetFx20, bool noNetFx40, @@ -1265,10 +1313,11 @@ this.directory = directory; this.coreFileName = coreFileName; this.linqFileName = linqFileName; this.designerFileName = designerFileName; this.installFlags = installFlags; + this.tracePriority = tracePriority; this.install = install; this.noDesktop = noDesktop; this.noCompact = noCompact; this.noNetFx20 = noNetFx20; this.noNetFx40 = noNetFx40; @@ -1422,15 +1471,15 @@ GetDefaultFileNames( ref directory, ref coreFileName, ref linqFileName, ref designerFileName); - return new Configuration( - thisAssembly, null, directory, coreFileName, linqFileName, - designerFileName, InstallFlags.Default, true, false, true, - false, false, false, false, false, false, false, true, - true, false); + return new Configuration(thisAssembly, null, directory, + coreFileName, linqFileName, designerFileName, + InstallFlags.Default, TracePriority.Default, true, false, + true, false, false, false, false, false, false, false, + true, true, false); } /////////////////////////////////////////////////////////////////// public static bool FromArgs( @@ -1469,13 +1518,14 @@ index++; if (index >= length) { error = TraceOps.Trace( + TracePriority.Lowest, traceCallback, String.Format( - "Missing value for option: {0}", - ForDisplay(arg)), traceCategory); + "Missing value for option: {0}", + ForDisplay(arg)), traceCategory); if (strict) return false; break; @@ -1497,11 +1547,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1572,18 +1624,42 @@ } else if (MatchOption(newArg, "designerFileName")) { configuration.designerFileName = text; } + else if (MatchOption(newArg, "tracePriority")) + { + object value = ParseEnum( + typeof(TracePriority), text, true); + + if (value == null) + { + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( + "Invalid trace priority value: {0}", + ForDisplay(text)), traceCategory); + + if (strict) + return false; + + continue; + } + + configuration.tracePriority = (TracePriority)value; + TraceOps.TracePriority = configuration.tracePriority; + } else if (MatchOption(newArg, "installFlags")) { object value = ParseEnum( typeof(InstallFlags), text, true); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid install flags value: {0}", ForDisplay(text)), traceCategory); if (strict) return false; @@ -1597,11 +1673,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1616,11 +1694,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1635,11 +1715,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1654,11 +1736,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1673,11 +1757,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1692,11 +1778,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1711,11 +1799,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1730,11 +1820,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1749,11 +1841,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1768,11 +1862,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1787,11 +1883,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1806,11 +1904,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1825,11 +1925,13 @@ { bool? value = ParseBoolean(text); if (value == null) { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) @@ -1840,21 +1942,25 @@ configuration.noLog = (bool)value; } else { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Unsupported command line option: {0}", ForDisplay(arg)), traceCategory); if (strict) return false; } } else { - error = TraceOps.Trace(traceCallback, String.Format( + error = TraceOps.Trace( + TracePriority.Lowest, + traceCallback, String.Format( "Unsupported command line argument: {0}", ForDisplay(arg)), traceCategory); if (strict) return false; @@ -1863,11 +1969,13 @@ return true; } catch (Exception e) { - TraceOps.Trace(traceCallback, e, traceCategory); + TraceOps.Trace( + TracePriority.Highest, traceCallback, e, + traceCategory); error = "Failed to modify configuration."; } return false; @@ -1923,29 +2031,32 @@ // // NOTE: Dump the configuration now in case we need to // troubleshoot any issues. // - configuration.Dump(); + if (configuration.tracePriority <= TracePriority.Medium) + configuration.Dump(); // // NOTE: Show where we are running from and how we were // invoked. // string location = assembly.Location; - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Medium, traceCallback, String.Format( "Original command line is: {0}", Environment.CommandLine), traceCategory); // // NOTE: If the debugger is attached and What-If mode is // [now] disabled, issue a warning. // if (!configuration.whatIf && Debugger.IsAttached) { - TraceOps.Trace(traceCallback, + TraceOps.Trace( + TracePriority.Medium, traceCallback, "Forced to disable \"what-if\" mode with " + "debugger attached.", traceCategory); } // @@ -1966,11 +2077,13 @@ return true; } catch (Exception e) { - TraceOps.Trace(traceCallback, e, traceCategory); + TraceOps.Trace( + TracePriority.Highest, traceCallback, e, + traceCategory); error = "Failed to process configuration."; } return false; @@ -2022,10 +2135,14 @@ traceCategory); traceCallback(String.Format(NameAndValueFormat, "InstallFlags", ForDisplay(installFlags)), traceCategory); + + traceCallback(String.Format(NameAndValueFormat, + "TracePriority", ForDisplay(tracePriority)), + traceCategory); traceCallback(String.Format(NameAndValueFormat, "Install", ForDisplay(install)), traceCategory); @@ -2141,10 +2258,19 @@ public InstallFlags InstallFlags { get { return installFlags; } set { installFlags = value; } } + + /////////////////////////////////////////////////////////////////// + + private TracePriority tracePriority; + public TracePriority TracePriority + { + get { return tracePriority; } + set { tracePriority = value; } + } /////////////////////////////////////////////////////////////////// private bool install; public bool Install @@ -2740,21 +2866,23 @@ continue; } foreach (Version frameworkVersion in frameworkVersionList) { - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Lower, traceCallback, String.Format( "frameworkName = {0}, frameworkVersion = {1}, " + "platformName = {2}", ForDisplay(frameworkName), ForDisplay(frameworkVersion), ForDisplay(platformName)), traceCategory); if (!HaveFramework( rootKey, frameworkName, frameworkVersion, platformName, whatIf, verbose)) { - TraceOps.Trace(traceCallback, + TraceOps.Trace( + TracePriority.Low, traceCallback, ".NET Framework not found, skipping...", traceCategory); continue; } @@ -2765,11 +2893,12 @@ string directory = GetFrameworkDirectory( rootKey, frameworkVersion, whatIf, verbose); if (String.IsNullOrEmpty(directory)) { - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Low, traceCallback, String.Format( ".NET Framework v{0} directory is invalid, " + "skipping...", frameworkVersion), traceCategory); continue; } @@ -2776,11 +2905,12 @@ directory = Path.Combine(directory, "Config"); if (!Directory.Exists(directory)) { - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Low, traceCallback, String.Format( ".NET Framework v{0} directory \"{1}\" does not " + "exist, skipping...", frameworkVersion, directory), traceCategory); continue; @@ -2788,11 +2918,12 @@ string fileName = Path.Combine(directory, "machine.config"); if (!File.Exists(fileName)) { - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Low, traceCallback, String.Format( ".NET Framework v{0} file \"{1}\" does not exist, " + "skipping...", frameworkVersion, fileName), traceCategory); continue; @@ -2811,11 +2942,12 @@ { if (localSaved && !saved) saved = true; if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Lowest, traceCallback, String.Format( "localSaved = {0}, saved = {1}", localSaved, saved), traceCategory); } } } @@ -2897,21 +3029,22 @@ continue; } foreach (Version frameworkVersion in frameworkVersionList) { - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Lower, traceCallback, String.Format( "frameworkName = {0}, frameworkVersion = {1}, " + "platformName = {2}", ForDisplay(frameworkName), ForDisplay(frameworkVersion), ForDisplay(platformName)), traceCategory); if (!HaveFramework( rootKey, frameworkName, frameworkVersion, platformName, whatIf, verbose)) { - TraceOps.Trace(traceCallback, + TraceOps.Trace(TracePriority.Low, traceCallback, ".NET Framework not found, skipping...", traceCategory); continue; } @@ -3048,17 +3181,18 @@ return false; } foreach (Version vsVersion in vsVersionList) { - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Lower, traceCallback, String.Format( "vsVersion = {0}", ForDisplay(vsVersion)), traceCategory); if (!HaveVsVersion(rootKey, vsVersion, whatIf, verbose)) { - TraceOps.Trace(traceCallback, + TraceOps.Trace(TracePriority.Low, traceCallback, "Visual Studio version not found, skipping...", traceCategory); continue; } @@ -3169,11 +3303,12 @@ } if (dirty) { if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Lowest, traceCallback, String.Format( "element = {0}", ForDisplay(element)), traceCategory); if (!whatIf) document.Save(fileName); @@ -3219,11 +3354,12 @@ } if (dirty) { if (verbose) - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Lowest, traceCallback, String.Format( "element = {0}", ForDisplay(element)), traceCategory); if (!whatIf) document.Save(fileName); @@ -4059,21 +4195,27 @@ args, true, ref configuration, ref error) || !Configuration.Process( args, configuration, true, ref error)) { TraceOps.ShowMessage( - traceCallback, thisAssembly, error, traceCategory, - MessageBoxButtons.OK, MessageBoxIcon.Error); + TracePriority.Highest, traceCallback, thisAssembly, + error, traceCategory, MessageBoxButtons.OK, + MessageBoxIcon.Error); return 1; } /////////////////////////////////////////////////////////////////// InitializeAllFrameworks(configuration); InitializeAllVsVersions(configuration); #endregion + + /////////////////////////////////////////////////////////////////// + + AssemblyName assemblyName = AssemblyName.GetAssemblyName( + configuration.CoreFileName); /* throw */ /////////////////////////////////////////////////////////////////// AnyPair directoryPair = new AnyPair( configuration.Directory, configuration.Install); @@ -4089,42 +4231,42 @@ Publish publish = new Publish(); if (configuration.Install) { if (!configuration.WhatIf) - { publish.GacInstall(configuration.CoreFileName); /* throw */ + + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( + "GacInstall: assemblyPath = {0}", + configuration.CoreFileName), traceCategory); + + if (!configuration.WhatIf) publish.GacInstall(configuration.LinqFileName); /* throw */ - } - else - { - TraceOps.Trace(traceCallback, String.Format( - "GacInstall: assemblyPath = {0}", - configuration.CoreFileName), traceCategory); - - TraceOps.Trace(traceCallback, String.Format( - "GacInstall: assemblyPath = {0}", - configuration.LinqFileName), traceCategory); - } + + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( + "GacInstall: assemblyPath = {0}", + configuration.LinqFileName), traceCategory); } else { if (!configuration.WhatIf) - { publish.GacRemove(configuration.LinqFileName); /* throw */ + + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( + "GacRemove: assemblyPath = {0}", + configuration.LinqFileName), traceCategory); + + if (!configuration.WhatIf) publish.GacRemove(configuration.CoreFileName); /* throw */ - } - else - { - TraceOps.Trace(traceCallback, String.Format( - "GacRemove: assemblyPath = {0}", - configuration.LinqFileName), traceCategory); - - TraceOps.Trace(traceCallback, String.Format( - "GacRemove: assemblyPath = {0}", - configuration.CoreFileName), traceCategory); - } + + TraceOps.Trace( + TracePriority.Highest, traceCallback, String.Format( + "GacRemove: assemblyPath = {0}", + configuration.CoreFileName), traceCategory); } } #endregion /////////////////////////////////////////////////////////////////// @@ -4135,12 +4277,13 @@ if (!ForEachFrameworkRegistry(ProcessAssemblyFolders, directoryPair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( - traceCallback, null, error, traceCategory, - MessageBoxButtons.OK, MessageBoxIcon.Error); + TracePriority.Highest, traceCallback, null, + error, traceCategory, MessageBoxButtons.OK, + MessageBoxIcon.Error); return 1; } } #endregion @@ -4152,18 +4295,18 @@ { bool saved = false; if (!ForEachFrameworkConfig(ProcessDbProviderFactory, InvariantName, ProviderName, Description, - FactoryTypeName, AssemblyName.GetAssemblyName( - configuration.CoreFileName), directoryPair, + FactoryTypeName, assemblyName, directoryPair, configuration.WhatIf, configuration.Verbose, ref saved, ref error)) { TraceOps.ShowMessage( - traceCallback, null, error, traceCategory, - MessageBoxButtons.OK, MessageBoxIcon.Error); + TracePriority.Highest, traceCallback, null, + error, traceCategory, MessageBoxButtons.OK, + MessageBoxIcon.Error); return 1; } } #endregion @@ -4178,12 +4321,13 @@ (Guid)vsDataSourcesId, (Guid)vsDataProviderId, fileNamePair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( - traceCallback, null, error, traceCategory, - MessageBoxButtons.OK, MessageBoxIcon.Error); + TracePriority.Highest, traceCallback, null, + error, traceCategory, MessageBoxButtons.OK, + MessageBoxIcon.Error); return 1; } } #endregion @@ -4198,12 +4342,13 @@ (Guid)vsDataSourcesId, (Guid)vsDataProviderId, fileNamePair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( - traceCallback, null, error, traceCategory, - MessageBoxButtons.OK, MessageBoxIcon.Error); + TracePriority.Highest, traceCallback, null, + error, traceCategory, MessageBoxButtons.OK, + MessageBoxIcon.Error); return 1; } } #endregion @@ -4218,21 +4363,23 @@ (Guid)vsDataSourcesId, (Guid)vsDataProviderId, fileNamePair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( - traceCallback, null, error, traceCategory, - MessageBoxButtons.OK, MessageBoxIcon.Error); + TracePriority.Highest, traceCallback, null, + error, traceCategory, MessageBoxButtons.OK, + MessageBoxIcon.Error); return 1; } } #endregion /////////////////////////////////////////////////////////////////// - TraceOps.Trace(traceCallback, String.Format( + TraceOps.Trace( + TracePriority.Higher, traceCallback, String.Format( "subKeysCreated = {0}, subKeysDeleted = {1}, " + "keyValuesSet = {2}, keyValuesDeleted = {3}", RegistryHelper.SubKeysCreated, RegistryHelper.SubKeysDeleted, RegistryHelper.KeyValuesSet, RegistryHelper.KeyValuesDeleted), traceCategory);