System.Data.SQLite
Check-in [284310b5a6]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the concept of trace priority to the VS designer component installer tool. Attempt to get the AssemblyName object before making any changes to the system. Always log changes to the GAC, even when not in 'what-if' mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 284310b5a6da4603146da975ae2d7a9405db748d
User & Date: mistachkin 2012-01-01 01:31:26
Context
2012-01-01
04:24
Add unit tests for the new VS designer component installer tool. Update the Eagle script library in externals to support this. check-in: debc754698 user: mistachkin tags: trunk
01:31
Add the concept of trace priority to the VS designer component installer tool. Attempt to get the AssemblyName object before making any changes to the system. Always log changes to the GAC, even when not in 'what-if' mode. check-in: 284310b5a6 user: mistachkin tags: trunk
2011-12-25
08:40
Update Eagle in externals to the official beta 21 release. check-in: 2585b7c6f9 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tools/install/Installer.cs.

    83     83           VsDataSource = 0x10,
    84     84           VsDataProvider = 0x20,
    85     85           Framework = GAC | AssemblyFolders | DbProviderFactory,
    86     86           Vs = VsPackage | VsDataSource | VsDataProvider,
    87     87           All = Framework | Vs,
    88     88           Default = All
    89     89       }
           90  +
           91  +    ///////////////////////////////////////////////////////////////////////////
           92  +
           93  +    [Flags()]
           94  +    public enum TracePriority
           95  +    {
           96  +        None = 0x0,
           97  +        Lowest = 0x1,
           98  +        Lower = 0x2,
           99  +        Low = 0x4,
          100  +        Medium = 0x8,
          101  +        High = 0x10,
          102  +        Higher = 0x20,
          103  +        Highest = 0x40,
          104  +        Default = Medium
          105  +    }
    90    106       #endregion
    91    107   
    92    108       ///////////////////////////////////////////////////////////////////////////
    93    109   
    94    110       #region Installer Class
    95    111       internal static class Installer
    96    112       {
................................................................................
   154    170               #region Private Constants
   155    171               private const string Iso8601DateTimeOutputFormat =
   156    172                   "yyyy.MM.ddTHH:mm:ss.fffffff";
   157    173               #endregion
   158    174   
   159    175               ///////////////////////////////////////////////////////////////////
   160    176   
   161         -            #region Private Data
          177  +            #region Private Static Data
   162    178               private static object syncRoot = new object();
   163    179               private static long nextId;
          180  +            private static TracePriority tracePriority = TracePriority.Default;
          181  +            #endregion
          182  +
          183  +            ///////////////////////////////////////////////////////////////////
          184  +
          185  +            #region Public Static Properties
          186  +            public static TracePriority TracePriority
          187  +            {
          188  +                get { lock (syncRoot) { return tracePriority; } }
          189  +                set { lock (syncRoot) { tracePriority = value; } }
          190  +            }
   164    191               #endregion
   165    192   
   166    193               ///////////////////////////////////////////////////////////////////
   167    194   
   168    195               #region Interactive Support Methods
   169    196               public static string GetAssemblyTitle(
   170    197                   Assembly assembly
................................................................................
   193    220   
   194    221                   return null;
   195    222               }
   196    223   
   197    224               ///////////////////////////////////////////////////////////////////
   198    225   
   199    226               public static DialogResult ShowMessage(
          227  +                TracePriority tracePriority,
   200    228                   TraceCallback traceCallback,
   201    229                   Assembly assembly,
   202    230                   string message,
   203    231                   string category,
   204    232                   MessageBoxButtons buttons,
   205    233                   MessageBoxIcon icon
   206    234                   )
   207    235               {
   208    236                   DialogResult result = DialogResult.OK;
   209    237   
   210         -                Trace(traceCallback, message, category);
          238  +                Trace(tracePriority, traceCallback, message, category);
   211    239   
   212    240                   if (SystemInformation.UserInteractive)
   213    241                   {
   214    242                       string title = GetAssemblyTitle(assembly);
   215    243   
   216    244                       if (title == null)
   217    245                           title = Application.ProductName;
   218    246   
   219    247                       result = MessageBox.Show(message, title, buttons, icon);
   220    248   
   221         -                    Trace(traceCallback, String.Format(
          249  +                    Trace(tracePriority, traceCallback, String.Format(
   222    250                           "User choice of \"{0}\".", result), category);
   223    251   
   224    252                       return result;
   225    253                   }
   226    254   
   227         -                Trace(traceCallback, String.Format(
          255  +                Trace(tracePriority, traceCallback, String.Format(
   228    256                       "Default choice of \"{0}\".", result), category);
   229    257   
   230    258                   return result;
   231    259               }
   232    260               #endregion
   233    261   
   234    262               ///////////////////////////////////////////////////////////////////
................................................................................
   324    352                   }
   325    353               }
   326    354   
   327    355               ///////////////////////////////////////////////////////////////////
   328    356   
   329    357               [MethodImpl(MethodImplOptions.NoInlining)]
   330    358               public static string Trace(
          359  +                TracePriority tracePriority,
   331    360                   TraceCallback traceCallback,
   332    361                   Exception exception,
   333    362                   string category
   334    363                   )
   335    364               {
   336    365                   if (exception != null)
   337         -                    return Trace(traceCallback,
          366  +                    return Trace(tracePriority, traceCallback,
   338    367                           new StackTrace(exception, true), 0,
   339    368                           exception.ToString(), category);
   340    369   
   341    370                   return null;
   342    371               }
   343    372   
   344    373               ///////////////////////////////////////////////////////////////////
   345    374   
   346    375               [MethodImpl(MethodImplOptions.NoInlining)]
   347    376               public static string Trace(
          377  +                TracePriority tracePriority,
   348    378                   TraceCallback traceCallback,
   349    379                   string message,
   350    380                   string category
   351    381                   )
   352    382               {
   353         -                return Trace(traceCallback, null, 1, message, category);
          383  +                return Trace(
          384  +                    tracePriority, traceCallback, null, 1, message, category);
   354    385               }
   355    386   
   356    387               ///////////////////////////////////////////////////////////////////
   357    388   
   358    389               [MethodImpl(MethodImplOptions.NoInlining)]
   359    390               private static string Trace(
          391  +                TracePriority tracePriority,
   360    392                   TraceCallback traceCallback,
   361    393                   StackTrace stackTrace,
   362    394                   int level,
   363    395                   string message,
   364    396                   string category
   365    397                   )
   366    398               {
          399  +                //
          400  +                // NOTE: If the priority of this message is less than what
          401  +                //       we currently care about, just return now.
          402  +                //
          403  +                if (tracePriority < TracePriority)
          404  +                    return message;
          405  +
   367    406                   //
   368    407                   // NOTE: Always skip this call frame if the stack trace is
   369    408                   //       going to be captured by GetMethodName.
   370    409                   //
   371    410                   if (stackTrace == null)
   372    411                       level++;
   373    412   
................................................................................
   946    985                   bool verbose
   947    986                   )
   948    987               {
   949    988                   if (rootKey == null)
   950    989                       return null;
   951    990   
   952    991                   if (verbose)
   953         -                    TraceOps.Trace(traceCallback, String.Format(
   954         -                        "rootKey = {0}, subKeyName = {1}, writable = {2}",
   955         -                        ForDisplay(rootKey), ForDisplay(subKeyName), writable),
   956         -                        traceCategory);
          992  +                    TraceOps.Trace(
          993  +                        writable ? TracePriority.Highest : TracePriority.Higher,
          994  +                        traceCallback, String.Format("rootKey = {0}, " +
          995  +                        "subKeyName = {1}, writable = {2}", ForDisplay(rootKey),
          996  +                        ForDisplay(subKeyName), writable), traceCategory);
   957    997   
   958    998                   //
   959    999                   // HACK: Always forbid writable access when operating in
   960   1000                   //       'what-if' mode.
   961   1001                   //
   962   1002                   MockRegistryKey key = rootKey.OpenSubKey(
   963   1003                       subKeyName, whatIf ? false : writable);
................................................................................
   975   1015                   bool verbose
   976   1016                   )
   977   1017               {
   978   1018                   if (rootKey == null)
   979   1019                       return null;
   980   1020   
   981   1021                   if (verbose)
   982         -                    TraceOps.Trace(traceCallback, String.Format(
         1022  +                    TraceOps.Trace(
         1023  +                        TracePriority.Highest, traceCallback, String.Format(
   983   1024                           "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey),
   984   1025                           ForDisplay(subKeyName)), traceCategory);
   985   1026   
   986   1027                   try
   987   1028                   {
   988   1029                       //
   989   1030                       // HACK: Always open a key, rather than creating one when
................................................................................
  1025   1066                   bool verbose
  1026   1067                   )
  1027   1068               {
  1028   1069                   if (rootKey == null)
  1029   1070                       return;
  1030   1071   
  1031   1072                   if (verbose)
  1032         -                    TraceOps.Trace(traceCallback, String.Format(
         1073  +                    TraceOps.Trace(
         1074  +                        TracePriority.Highest, traceCallback, String.Format(
  1033   1075                           "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey),
  1034   1076                           ForDisplay(subKeyName)), traceCategory);
  1035   1077   
  1036   1078                   if (!whatIf)
  1037   1079                       rootKey.DeleteSubKey(subKeyName);
  1038   1080   
  1039   1081                   subKeysDeleted++;
................................................................................
  1048   1090                   bool verbose
  1049   1091                   )
  1050   1092               {
  1051   1093                   if (rootKey == null)
  1052   1094                       return;
  1053   1095   
  1054   1096                   if (verbose)
  1055         -                    TraceOps.Trace(traceCallback, String.Format(
         1097  +                    TraceOps.Trace(
         1098  +                        TracePriority.Highest, traceCallback, String.Format(
  1056   1099                           "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey),
  1057   1100                           ForDisplay(subKeyName)), traceCategory);
  1058   1101   
  1059   1102                   if (!whatIf)
  1060   1103                       rootKey.DeleteSubKeyTree(subKeyName);
  1061   1104   
  1062   1105                   subKeysDeleted++;
................................................................................
  1070   1113                   bool verbose
  1071   1114                   )
  1072   1115               {
  1073   1116                   if (key == null)
  1074   1117                       return null;
  1075   1118   
  1076   1119                   if (verbose)
  1077         -                    TraceOps.Trace(traceCallback, String.Format(
         1120  +                    TraceOps.Trace(
         1121  +                        TracePriority.High, traceCallback, String.Format(
  1078   1122                           "key = {0}", ForDisplay(key)), traceCategory);
  1079   1123   
  1080   1124                   return key.GetSubKeyNames();
  1081   1125               }
  1082   1126   
  1083   1127               ///////////////////////////////////////////////////////////////////
  1084   1128   
................................................................................
  1090   1134                   bool verbose
  1091   1135                   )
  1092   1136               {
  1093   1137                   if (key == null)
  1094   1138                       return null;
  1095   1139   
  1096   1140                   if (verbose)
  1097         -                    TraceOps.Trace(traceCallback, String.Format(
         1141  +                    TraceOps.Trace(
         1142  +                        TracePriority.High, traceCallback, String.Format(
  1098   1143                           "key = {0}, name = {1}, defaultValue = {2}",
  1099   1144                           ForDisplay(key), ForDisplay(name),
  1100   1145                           ForDisplay(defaultValue)), traceCategory);
  1101   1146   
  1102   1147                   return key.GetValue(name, defaultValue);
  1103   1148               }
  1104   1149   
................................................................................
  1112   1157                   bool verbose
  1113   1158                   )
  1114   1159               {
  1115   1160                   if (key == null)
  1116   1161                       return;
  1117   1162   
  1118   1163                   if (verbose)
  1119         -                    TraceOps.Trace(traceCallback, String.Format(
         1164  +                    TraceOps.Trace(
         1165  +                        TracePriority.Highest, traceCallback, String.Format(
  1120   1166                           "key = {0}, name = {1}, value = {2}", ForDisplay(key),
  1121   1167                           ForDisplay(name), ForDisplay(value)), traceCategory);
  1122   1168   
  1123   1169                   if (!whatIf)
  1124   1170                       key.SetValue(name, value);
  1125   1171   
  1126   1172                   keyValuesSet++;
................................................................................
  1135   1181                   bool verbose
  1136   1182                   )
  1137   1183               {
  1138   1184                   if (key == null)
  1139   1185                       return;
  1140   1186   
  1141   1187                   if (verbose)
  1142         -                    TraceOps.Trace(traceCallback, String.Format(
         1188  +                    TraceOps.Trace(
         1189  +                        TracePriority.Highest, traceCallback, String.Format(
  1143   1190                           "key = {0}, name = {1}", ForDisplay(key),
  1144   1191                           ForDisplay(name)), traceCategory);
  1145   1192   
  1146   1193                   if (!whatIf)
  1147   1194                       key.DeleteValue(name);
  1148   1195   
  1149   1196                   keyValuesDeleted++;
................................................................................
  1241   1288                   Assembly assembly,
  1242   1289                   string logFileName,
  1243   1290                   string directory,
  1244   1291                   string coreFileName,
  1245   1292                   string linqFileName,
  1246   1293                   string designerFileName,
  1247   1294                   InstallFlags installFlags,
         1295  +                TracePriority tracePriority,
  1248   1296                   bool install,
  1249   1297                   bool noDesktop,
  1250   1298                   bool noCompact,
  1251   1299                   bool noNetFx20,
  1252   1300                   bool noNetFx40,
  1253   1301                   bool noVs2008,
  1254   1302                   bool noVs2010,
................................................................................
  1263   1311                   this.assembly = assembly;
  1264   1312                   this.logFileName = logFileName;
  1265   1313                   this.directory = directory;
  1266   1314                   this.coreFileName = coreFileName;
  1267   1315                   this.linqFileName = linqFileName;
  1268   1316                   this.designerFileName = designerFileName;
  1269   1317                   this.installFlags = installFlags;
         1318  +                this.tracePriority = tracePriority;
  1270   1319                   this.install = install;
  1271   1320                   this.noDesktop = noDesktop;
  1272   1321                   this.noCompact = noCompact;
  1273   1322                   this.noNetFx20 = noNetFx20;
  1274   1323                   this.noNetFx40 = noNetFx40;
  1275   1324                   this.noVs2008 = noVs2008;
  1276   1325                   this.noVs2010 = noVs2010;
................................................................................
  1420   1469                   string linqFileName = null;
  1421   1470                   string designerFileName = null;
  1422   1471   
  1423   1472                   GetDefaultFileNames(
  1424   1473                       ref directory, ref coreFileName, ref linqFileName,
  1425   1474                       ref designerFileName);
  1426   1475   
  1427         -                return new Configuration(
  1428         -                    thisAssembly, null, directory, coreFileName, linqFileName,
  1429         -                    designerFileName, InstallFlags.Default, true, false, true,
  1430         -                    false, false, false, false, false, false, false, true,
  1431         -                    true, false);
         1476  +                return new Configuration(thisAssembly, null, directory,
         1477  +                    coreFileName, linqFileName, designerFileName,
         1478  +                    InstallFlags.Default, TracePriority.Default, true, false,
         1479  +                    true, false, false, false, false, false, false, false,
         1480  +                    true, true, false);
  1432   1481               }
  1433   1482   
  1434   1483               ///////////////////////////////////////////////////////////////////
  1435   1484   
  1436   1485               public static bool FromArgs(
  1437   1486                   string[] args,
  1438   1487                   bool strict,
................................................................................
  1467   1516                               //       to it now.  If we fail, we are done.
  1468   1517                               //
  1469   1518                               index++;
  1470   1519   
  1471   1520                               if (index >= length)
  1472   1521                               {
  1473   1522                                   error = TraceOps.Trace(
         1523  +                                    TracePriority.Lowest,
  1474   1524                                       traceCallback, String.Format(
  1475         -                                        "Missing value for option: {0}",
  1476         -                                        ForDisplay(arg)), traceCategory);
         1525  +                                    "Missing value for option: {0}",
         1526  +                                    ForDisplay(arg)), traceCategory);
  1477   1527   
  1478   1528                                   if (strict)
  1479   1529                                       return false;
  1480   1530   
  1481   1531                                   break;
  1482   1532                               }
  1483   1533   
................................................................................
  1495   1545                               //
  1496   1546                               if (MatchOption(newArg, "strict"))
  1497   1547                               {
  1498   1548                                   bool? value = ParseBoolean(text);
  1499   1549   
  1500   1550                                   if (value == null)
  1501   1551                                   {
  1502         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1552  +                                    error = TraceOps.Trace(
         1553  +                                        TracePriority.Lowest,
         1554  +                                        traceCallback, String.Format(
  1503   1555                                           "Invalid {0} boolean value: {1}",
  1504   1556                                           ForDisplay(arg), ForDisplay(text)),
  1505   1557                                           traceCategory);
  1506   1558   
  1507   1559                                       if (strict)
  1508   1560                                           return false;
  1509   1561   
................................................................................
  1570   1622                               {
  1571   1623                                   configuration.linqFileName = text;
  1572   1624                               }
  1573   1625                               else if (MatchOption(newArg, "designerFileName"))
  1574   1626                               {
  1575   1627                                   configuration.designerFileName = text;
  1576   1628                               }
         1629  +                            else if (MatchOption(newArg, "tracePriority"))
         1630  +                            {
         1631  +                                object value = ParseEnum(
         1632  +                                    typeof(TracePriority), text, true);
         1633  +
         1634  +                                if (value == null)
         1635  +                                {
         1636  +                                    error = TraceOps.Trace(
         1637  +                                        TracePriority.Lowest,
         1638  +                                        traceCallback, String.Format(
         1639  +                                        "Invalid trace priority value: {0}",
         1640  +                                        ForDisplay(text)), traceCategory);
         1641  +
         1642  +                                    if (strict)
         1643  +                                        return false;
         1644  +
         1645  +                                    continue;
         1646  +                                }
         1647  +
         1648  +                                configuration.tracePriority = (TracePriority)value;
         1649  +                                TraceOps.TracePriority = configuration.tracePriority;
         1650  +                            }
  1577   1651                               else if (MatchOption(newArg, "installFlags"))
  1578   1652                               {
  1579   1653                                   object value = ParseEnum(
  1580   1654                                       typeof(InstallFlags), text, true);
  1581   1655   
  1582   1656                                   if (value == null)
  1583   1657                                   {
  1584         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1658  +                                    error = TraceOps.Trace(
         1659  +                                        TracePriority.Lowest,
         1660  +                                        traceCallback, String.Format(
  1585   1661                                           "Invalid install flags value: {0}",
  1586   1662                                           ForDisplay(text)), traceCategory);
  1587   1663   
  1588   1664                                       if (strict)
  1589   1665                                           return false;
  1590   1666   
  1591   1667                                       continue;
................................................................................
  1595   1671                               }
  1596   1672                               else if (MatchOption(newArg, "install"))
  1597   1673                               {
  1598   1674                                   bool? value = ParseBoolean(text);
  1599   1675   
  1600   1676                                   if (value == null)
  1601   1677                                   {
  1602         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1678  +                                    error = TraceOps.Trace(
         1679  +                                        TracePriority.Lowest,
         1680  +                                        traceCallback, String.Format(
  1603   1681                                           "Invalid {0} boolean value: {1}",
  1604   1682                                           ForDisplay(arg), ForDisplay(text)),
  1605   1683                                           traceCategory);
  1606   1684   
  1607   1685                                       if (strict)
  1608   1686                                           return false;
  1609   1687   
................................................................................
  1614   1692                               }
  1615   1693                               else if (MatchOption(newArg, "whatIf"))
  1616   1694                               {
  1617   1695                                   bool? value = ParseBoolean(text);
  1618   1696   
  1619   1697                                   if (value == null)
  1620   1698                                   {
  1621         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1699  +                                    error = TraceOps.Trace(
         1700  +                                        TracePriority.Lowest,
         1701  +                                        traceCallback, String.Format(
  1622   1702                                           "Invalid {0} boolean value: {1}",
  1623   1703                                           ForDisplay(arg), ForDisplay(text)),
  1624   1704                                           traceCategory);
  1625   1705   
  1626   1706                                       if (strict)
  1627   1707                                           return false;
  1628   1708   
................................................................................
  1633   1713                               }
  1634   1714                               else if (MatchOption(newArg, "verbose"))
  1635   1715                               {
  1636   1716                                   bool? value = ParseBoolean(text);
  1637   1717   
  1638   1718                                   if (value == null)
  1639   1719                                   {
  1640         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1720  +                                    error = TraceOps.Trace(
         1721  +                                        TracePriority.Lowest,
         1722  +                                        traceCallback, String.Format(
  1641   1723                                           "Invalid {0} boolean value: {1}",
  1642   1724                                           ForDisplay(arg), ForDisplay(text)),
  1643   1725                                           traceCategory);
  1644   1726   
  1645   1727                                       if (strict)
  1646   1728                                           return false;
  1647   1729   
................................................................................
  1652   1734                               }
  1653   1735                               else if (MatchOption(newArg, "confirm"))
  1654   1736                               {
  1655   1737                                   bool? value = ParseBoolean(text);
  1656   1738   
  1657   1739                                   if (value == null)
  1658   1740                                   {
  1659         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1741  +                                    error = TraceOps.Trace(
         1742  +                                        TracePriority.Lowest,
         1743  +                                        traceCallback, String.Format(
  1660   1744                                           "Invalid {0} boolean value: {1}",
  1661   1745                                           ForDisplay(arg), ForDisplay(text)),
  1662   1746                                           traceCategory);
  1663   1747   
  1664   1748                                       if (strict)
  1665   1749                                           return false;
  1666   1750   
................................................................................
  1671   1755                               }
  1672   1756                               else if (MatchOption(newArg, "noDesktop"))
  1673   1757                               {
  1674   1758                                   bool? value = ParseBoolean(text);
  1675   1759   
  1676   1760                                   if (value == null)
  1677   1761                                   {
  1678         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1762  +                                    error = TraceOps.Trace(
         1763  +                                        TracePriority.Lowest,
         1764  +                                        traceCallback, String.Format(
  1679   1765                                           "Invalid {0} boolean value: {1}",
  1680   1766                                           ForDisplay(arg), ForDisplay(text)),
  1681   1767                                           traceCategory);
  1682   1768   
  1683   1769                                       if (strict)
  1684   1770                                           return false;
  1685   1771   
................................................................................
  1690   1776                               }
  1691   1777                               else if (MatchOption(newArg, "noCompact"))
  1692   1778                               {
  1693   1779                                   bool? value = ParseBoolean(text);
  1694   1780   
  1695   1781                                   if (value == null)
  1696   1782                                   {
  1697         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1783  +                                    error = TraceOps.Trace(
         1784  +                                        TracePriority.Lowest,
         1785  +                                        traceCallback, String.Format(
  1698   1786                                           "Invalid {0} boolean value: {1}",
  1699   1787                                           ForDisplay(arg), ForDisplay(text)),
  1700   1788                                           traceCategory);
  1701   1789   
  1702   1790                                       if (strict)
  1703   1791                                           return false;
  1704   1792   
................................................................................
  1709   1797                               }
  1710   1798                               else if (MatchOption(newArg, "noNetFx20"))
  1711   1799                               {
  1712   1800                                   bool? value = ParseBoolean(text);
  1713   1801   
  1714   1802                                   if (value == null)
  1715   1803                                   {
  1716         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1804  +                                    error = TraceOps.Trace(
         1805  +                                        TracePriority.Lowest,
         1806  +                                        traceCallback, String.Format(
  1717   1807                                           "Invalid {0} boolean value: {1}",
  1718   1808                                           ForDisplay(arg), ForDisplay(text)),
  1719   1809                                           traceCategory);
  1720   1810   
  1721   1811                                       if (strict)
  1722   1812                                           return false;
  1723   1813   
................................................................................
  1728   1818                               }
  1729   1819                               else if (MatchOption(newArg, "noNetFx40"))
  1730   1820                               {
  1731   1821                                   bool? value = ParseBoolean(text);
  1732   1822   
  1733   1823                                   if (value == null)
  1734   1824                                   {
  1735         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1825  +                                    error = TraceOps.Trace(
         1826  +                                        TracePriority.Lowest,
         1827  +                                        traceCallback, String.Format(
  1736   1828                                           "Invalid {0} boolean value: {1}",
  1737   1829                                           ForDisplay(arg), ForDisplay(text)),
  1738   1830                                           traceCategory);
  1739   1831   
  1740   1832                                       if (strict)
  1741   1833                                           return false;
  1742   1834   
................................................................................
  1747   1839                               }
  1748   1840                               else if (MatchOption(newArg, "noVs2008"))
  1749   1841                               {
  1750   1842                                   bool? value = ParseBoolean(text);
  1751   1843   
  1752   1844                                   if (value == null)
  1753   1845                                   {
  1754         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1846  +                                    error = TraceOps.Trace(
         1847  +                                        TracePriority.Lowest,
         1848  +                                        traceCallback, String.Format(
  1755   1849                                           "Invalid {0} boolean value: {1}",
  1756   1850                                           ForDisplay(arg), ForDisplay(text)),
  1757   1851                                           traceCategory);
  1758   1852   
  1759   1853                                       if (strict)
  1760   1854                                           return false;
  1761   1855   
................................................................................
  1766   1860                               }
  1767   1861                               else if (MatchOption(newArg, "noVs2010"))
  1768   1862                               {
  1769   1863                                   bool? value = ParseBoolean(text);
  1770   1864   
  1771   1865                                   if (value == null)
  1772   1866                                   {
  1773         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1867  +                                    error = TraceOps.Trace(
         1868  +                                        TracePriority.Lowest,
         1869  +                                        traceCallback, String.Format(
  1774   1870                                           "Invalid {0} boolean value: {1}",
  1775   1871                                           ForDisplay(arg), ForDisplay(text)),
  1776   1872                                           traceCategory);
  1777   1873   
  1778   1874                                       if (strict)
  1779   1875                                           return false;
  1780   1876   
................................................................................
  1785   1881                               }
  1786   1882                               else if (MatchOption(newArg, "noTrace"))
  1787   1883                               {
  1788   1884                                   bool? value = ParseBoolean(text);
  1789   1885   
  1790   1886                                   if (value == null)
  1791   1887                                   {
  1792         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1888  +                                    error = TraceOps.Trace(
         1889  +                                        TracePriority.Lowest,
         1890  +                                        traceCallback, String.Format(
  1793   1891                                           "Invalid {0} boolean value: {1}",
  1794   1892                                           ForDisplay(arg), ForDisplay(text)),
  1795   1893                                           traceCategory);
  1796   1894   
  1797   1895                                       if (strict)
  1798   1896                                           return false;
  1799   1897   
................................................................................
  1804   1902                               }
  1805   1903                               else if (MatchOption(newArg, "noConsole"))
  1806   1904                               {
  1807   1905                                   bool? value = ParseBoolean(text);
  1808   1906   
  1809   1907                                   if (value == null)
  1810   1908                                   {
  1811         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1909  +                                    error = TraceOps.Trace(
         1910  +                                        TracePriority.Lowest,
         1911  +                                        traceCallback, String.Format(
  1812   1912                                           "Invalid {0} boolean value: {1}",
  1813   1913                                           ForDisplay(arg), ForDisplay(text)),
  1814   1914                                           traceCategory);
  1815   1915   
  1816   1916                                       if (strict)
  1817   1917                                           return false;
  1818   1918   
................................................................................
  1823   1923                               }
  1824   1924                               else if (MatchOption(newArg, "noLog"))
  1825   1925                               {
  1826   1926                                   bool? value = ParseBoolean(text);
  1827   1927   
  1828   1928                                   if (value == null)
  1829   1929                                   {
  1830         -                                    error = TraceOps.Trace(traceCallback, String.Format(
         1930  +                                    error = TraceOps.Trace(
         1931  +                                        TracePriority.Lowest,
         1932  +                                        traceCallback, String.Format(
  1831   1933                                           "Invalid {0} boolean value: {1}",
  1832   1934                                           ForDisplay(arg), ForDisplay(text)),
  1833   1935                                           traceCategory);
  1834   1936   
  1835   1937                                       if (strict)
  1836   1938                                           return false;
  1837   1939   
................................................................................
  1838   1940                                       continue;
  1839   1941                                   }
  1840   1942   
  1841   1943                                   configuration.noLog = (bool)value;
  1842   1944                               }
  1843   1945                               else
  1844   1946                               {
  1845         -                                error = TraceOps.Trace(traceCallback, String.Format(
         1947  +                                error = TraceOps.Trace(
         1948  +                                    TracePriority.Lowest,
         1949  +                                    traceCallback, String.Format(
  1846   1950                                       "Unsupported command line option: {0}",
  1847   1951                                       ForDisplay(arg)), traceCategory);
  1848   1952   
  1849   1953                                   if (strict)
  1850   1954                                       return false;
  1851   1955                               }
  1852   1956                           }
  1853   1957                           else
  1854   1958                           {
  1855         -                            error = TraceOps.Trace(traceCallback, String.Format(
         1959  +                            error = TraceOps.Trace(
         1960  +                                TracePriority.Lowest,
         1961  +                                traceCallback, String.Format(
  1856   1962                                   "Unsupported command line argument: {0}",
  1857   1963                                   ForDisplay(arg)), traceCategory);
  1858   1964   
  1859   1965                               if (strict)
  1860   1966                                   return false;
  1861   1967                           }
  1862   1968                       }
  1863   1969   
  1864   1970                       return true;
  1865   1971                   }
  1866   1972                   catch (Exception e)
  1867   1973                   {
  1868         -                    TraceOps.Trace(traceCallback, e, traceCategory);
         1974  +                    TraceOps.Trace(
         1975  +                        TracePriority.Highest, traceCallback, e,
         1976  +                        traceCategory);
  1869   1977   
  1870   1978                       error = "Failed to modify configuration.";
  1871   1979                   }
  1872   1980   
  1873   1981                   return false;
  1874   1982               }
  1875   1983   
................................................................................
  1921   2029                           }
  1922   2030                       }
  1923   2031   
  1924   2032                       //
  1925   2033                       // NOTE: Dump the configuration now in case we need to
  1926   2034                       //       troubleshoot any issues.
  1927   2035                       //
  1928         -                    configuration.Dump();
         2036  +                    if (configuration.tracePriority <= TracePriority.Medium)
         2037  +                        configuration.Dump();
  1929   2038   
  1930   2039                       //
  1931   2040                       // NOTE: Show where we are running from and how we were
  1932   2041                       //       invoked.
  1933   2042                       //
  1934   2043                       string location = assembly.Location;
  1935   2044   
  1936         -                    TraceOps.Trace(traceCallback, String.Format(
         2045  +                    TraceOps.Trace(
         2046  +                        TracePriority.Medium, traceCallback, String.Format(
  1937   2047                           "Original command line is: {0}",
  1938   2048                           Environment.CommandLine), traceCategory);
  1939   2049   
  1940   2050                       //
  1941   2051                       // NOTE: If the debugger is attached and What-If mode is
  1942   2052                       //       [now] disabled, issue a warning.
  1943   2053                       //
  1944   2054                       if (!configuration.whatIf && Debugger.IsAttached)
  1945   2055                       {
  1946         -                        TraceOps.Trace(traceCallback,
         2056  +                        TraceOps.Trace(
         2057  +                            TracePriority.Medium, traceCallback,
  1947   2058                               "Forced to disable \"what-if\" mode with " +
  1948   2059                               "debugger attached.", traceCategory);
  1949   2060                       }
  1950   2061   
  1951   2062                       //
  1952   2063                       // NOTE: If the command line has not been manually
  1953   2064                       //       confirmed (i.e. via the explicit command line
................................................................................
  1964   2075                           return false;
  1965   2076                       }
  1966   2077   
  1967   2078                       return true;
  1968   2079                   }
  1969   2080                   catch (Exception e)
  1970   2081                   {
  1971         -                    TraceOps.Trace(traceCallback, e, traceCategory);
         2082  +                    TraceOps.Trace(
         2083  +                        TracePriority.Highest, traceCallback, e,
         2084  +                        traceCategory);
  1972   2085   
  1973   2086                       error = "Failed to process configuration.";
  1974   2087                   }
  1975   2088   
  1976   2089                   return false;
  1977   2090               }
  1978   2091               #endregion
................................................................................
  2020   2133                       traceCallback(String.Format(NameAndValueFormat,
  2021   2134                           "DesignerFileName", ForDisplay(designerFileName)),
  2022   2135                           traceCategory);
  2023   2136   
  2024   2137                       traceCallback(String.Format(NameAndValueFormat,
  2025   2138                           "InstallFlags", ForDisplay(installFlags)),
  2026   2139                           traceCategory);
         2140  +
         2141  +                    traceCallback(String.Format(NameAndValueFormat,
         2142  +                        "TracePriority", ForDisplay(tracePriority)),
         2143  +                        traceCategory);
  2027   2144   
  2028   2145                       traceCallback(String.Format(NameAndValueFormat,
  2029   2146                           "Install", ForDisplay(install)),
  2030   2147                           traceCategory);
  2031   2148   
  2032   2149                       traceCallback(String.Format(NameAndValueFormat,
  2033   2150                           "NoDesktop", ForDisplay(noDesktop)),
................................................................................
  2139   2256   
  2140   2257               private InstallFlags installFlags;
  2141   2258               public InstallFlags InstallFlags
  2142   2259               {
  2143   2260                   get { return installFlags; }
  2144   2261                   set { installFlags = value; }
  2145   2262               }
         2263  +
         2264  +            ///////////////////////////////////////////////////////////////////
         2265  +
         2266  +            private TracePriority tracePriority;
         2267  +            public TracePriority TracePriority
         2268  +            {
         2269  +                get { return tracePriority; }
         2270  +                set { tracePriority = value; }
         2271  +            }
  2146   2272   
  2147   2273               ///////////////////////////////////////////////////////////////////
  2148   2274   
  2149   2275               private bool install;
  2150   2276               public bool Install
  2151   2277               {
  2152   2278                   get { return install; }
................................................................................
  2738   2864                       (frameworkVersionList == null))
  2739   2865                   {
  2740   2866                       continue;
  2741   2867                   }
  2742   2868   
  2743   2869                   foreach (Version frameworkVersion in frameworkVersionList)
  2744   2870                   {
  2745         -                    TraceOps.Trace(traceCallback, String.Format(
         2871  +                    TraceOps.Trace(
         2872  +                        TracePriority.Lower, traceCallback, String.Format(
  2746   2873                           "frameworkName = {0}, frameworkVersion = {1}, " +
  2747   2874                           "platformName = {2}", ForDisplay(frameworkName),
  2748   2875                           ForDisplay(frameworkVersion),
  2749   2876                           ForDisplay(platformName)), traceCategory);
  2750   2877   
  2751   2878                       if (!HaveFramework(
  2752   2879                               rootKey, frameworkName, frameworkVersion,
  2753   2880                               platformName, whatIf, verbose))
  2754   2881                       {
  2755         -                        TraceOps.Trace(traceCallback,
         2882  +                        TraceOps.Trace(
         2883  +                            TracePriority.Low, traceCallback,
  2756   2884                               ".NET Framework not found, skipping...",
  2757   2885                               traceCategory);
  2758   2886   
  2759   2887                           continue;
  2760   2888                       }
  2761   2889   
  2762   2890                       if (callback == null)
................................................................................
  2763   2891                           continue;
  2764   2892   
  2765   2893                       string directory = GetFrameworkDirectory(
  2766   2894                           rootKey, frameworkVersion, whatIf, verbose);
  2767   2895   
  2768   2896                       if (String.IsNullOrEmpty(directory))
  2769   2897                       {
  2770         -                        TraceOps.Trace(traceCallback, String.Format(
         2898  +                        TraceOps.Trace(
         2899  +                            TracePriority.Low, traceCallback, String.Format(
  2771   2900                               ".NET Framework v{0} directory is invalid, " +
  2772   2901                               "skipping...", frameworkVersion), traceCategory);
  2773   2902   
  2774   2903                           continue;
  2775   2904                       }
  2776   2905   
  2777   2906                       directory = Path.Combine(directory, "Config");
  2778   2907   
  2779   2908                       if (!Directory.Exists(directory))
  2780   2909                       {
  2781         -                        TraceOps.Trace(traceCallback, String.Format(
         2910  +                        TraceOps.Trace(
         2911  +                            TracePriority.Low, traceCallback, String.Format(
  2782   2912                               ".NET Framework v{0} directory \"{1}\" does not " +
  2783   2913                               "exist, skipping...", frameworkVersion, directory),
  2784   2914                               traceCategory);
  2785   2915   
  2786   2916                           continue;
  2787   2917                       }
  2788   2918   
  2789   2919                       string fileName = Path.Combine(directory, "machine.config");
  2790   2920   
  2791   2921                       if (!File.Exists(fileName))
  2792   2922                       {
  2793         -                        TraceOps.Trace(traceCallback, String.Format(
         2923  +                        TraceOps.Trace(
         2924  +                            TracePriority.Low, traceCallback, String.Format(
  2794   2925                               ".NET Framework v{0} file \"{1}\" does not exist, " +
  2795   2926                               "skipping...", frameworkVersion, fileName),
  2796   2927                               traceCategory);
  2797   2928   
  2798   2929                           continue;
  2799   2930                       }
  2800   2931   
................................................................................
  2809   2940                       }
  2810   2941                       else
  2811   2942                       {
  2812   2943                           if (localSaved && !saved)
  2813   2944                               saved = true;
  2814   2945   
  2815   2946                           if (verbose)
  2816         -                            TraceOps.Trace(traceCallback, String.Format(
         2947  +                            TraceOps.Trace(
         2948  +                                TracePriority.Lowest, traceCallback, String.Format(
  2817   2949                                   "localSaved = {0}, saved = {1}", localSaved,
  2818   2950                                   saved), traceCategory);
  2819   2951                       }
  2820   2952                   }
  2821   2953               }
  2822   2954   
  2823   2955               return true;
................................................................................
  2895   3027                       (frameworkVersionList == null))
  2896   3028                   {
  2897   3029                       continue;
  2898   3030                   }
  2899   3031   
  2900   3032                   foreach (Version frameworkVersion in frameworkVersionList)
  2901   3033                   {
  2902         -                    TraceOps.Trace(traceCallback, String.Format(
         3034  +                    TraceOps.Trace(
         3035  +                        TracePriority.Lower, traceCallback, String.Format(
  2903   3036                           "frameworkName = {0}, frameworkVersion = {1}, " +
  2904   3037                           "platformName = {2}", ForDisplay(frameworkName),
  2905   3038                           ForDisplay(frameworkVersion),
  2906   3039                           ForDisplay(platformName)), traceCategory);
  2907   3040   
  2908   3041                       if (!HaveFramework(
  2909   3042                               rootKey, frameworkName, frameworkVersion,
  2910   3043                               platformName, whatIf, verbose))
  2911   3044                       {
  2912         -                        TraceOps.Trace(traceCallback,
         3045  +                        TraceOps.Trace(TracePriority.Low, traceCallback,
  2913   3046                               ".NET Framework not found, skipping...",
  2914   3047                               traceCategory);
  2915   3048   
  2916   3049                           continue;
  2917   3050                       }
  2918   3051   
  2919   3052                       if (callback == null)
................................................................................
  3046   3179               {
  3047   3180                   error = "no VS versions found";
  3048   3181                   return false;
  3049   3182               }
  3050   3183   
  3051   3184               foreach (Version vsVersion in vsVersionList)
  3052   3185               {
  3053         -                TraceOps.Trace(traceCallback, String.Format(
         3186  +                TraceOps.Trace(
         3187  +                    TracePriority.Lower, traceCallback, String.Format(
  3054   3188                       "vsVersion = {0}", ForDisplay(vsVersion)),
  3055   3189                       traceCategory);
  3056   3190   
  3057   3191                   if (!HaveVsVersion(rootKey, vsVersion, whatIf, verbose))
  3058   3192                   {
  3059         -                    TraceOps.Trace(traceCallback,
         3193  +                    TraceOps.Trace(TracePriority.Low, traceCallback,
  3060   3194                           "Visual Studio version not found, skipping...",
  3061   3195                           traceCategory);
  3062   3196   
  3063   3197                       continue;
  3064   3198                   }
  3065   3199   
  3066   3200                   if (callback == null)
................................................................................
  3167   3301                   element.SetAttribute("type", fullTypeName);
  3168   3302                   dirty = true;
  3169   3303               }
  3170   3304   
  3171   3305               if (dirty)
  3172   3306               {
  3173   3307                   if (verbose)
  3174         -                    TraceOps.Trace(traceCallback, String.Format(
         3308  +                    TraceOps.Trace(
         3309  +                        TracePriority.Lowest, traceCallback, String.Format(
  3175   3310                           "element = {0}", ForDisplay(element)), traceCategory);
  3176   3311   
  3177   3312                   if (!whatIf)
  3178   3313                       document.Save(fileName);
  3179   3314   
  3180   3315                   saved = true;
  3181   3316               }
................................................................................
  3217   3352                   element.ParentNode.RemoveChild(element);
  3218   3353                   dirty = true;
  3219   3354               }
  3220   3355   
  3221   3356               if (dirty)
  3222   3357               {
  3223   3358                   if (verbose)
  3224         -                    TraceOps.Trace(traceCallback, String.Format(
         3359  +                    TraceOps.Trace(
         3360  +                        TracePriority.Lowest, traceCallback, String.Format(
  3225   3361                           "element = {0}", ForDisplay(element)), traceCategory);
  3226   3362   
  3227   3363                   if (!whatIf)
  3228   3364                       document.Save(fileName);
  3229   3365   
  3230   3366                   saved = true;
  3231   3367               }
................................................................................
  4057   4193               #region Command Line Processing
  4058   4194               if (!Configuration.FromArgs(
  4059   4195                       args, true, ref configuration, ref error) ||
  4060   4196                   !Configuration.Process(
  4061   4197                       args, configuration, true, ref error))
  4062   4198               {
  4063   4199                   TraceOps.ShowMessage(
  4064         -                    traceCallback, thisAssembly, error, traceCategory,
  4065         -                    MessageBoxButtons.OK, MessageBoxIcon.Error);
         4200  +                    TracePriority.Highest, traceCallback, thisAssembly,
         4201  +                    error, traceCategory, MessageBoxButtons.OK,
         4202  +                    MessageBoxIcon.Error);
  4066   4203   
  4067   4204                   return 1;
  4068   4205               }
  4069   4206   
  4070   4207               ///////////////////////////////////////////////////////////////////
  4071   4208   
  4072   4209               InitializeAllFrameworks(configuration);
  4073   4210               InitializeAllVsVersions(configuration);
  4074   4211               #endregion
         4212  +
         4213  +            ///////////////////////////////////////////////////////////////////
         4214  +
         4215  +            AssemblyName assemblyName = AssemblyName.GetAssemblyName(
         4216  +                configuration.CoreFileName); /* throw */
  4075   4217   
  4076   4218               ///////////////////////////////////////////////////////////////////
  4077   4219   
  4078   4220               AnyPair<string, bool> directoryPair = new AnyPair<string, bool>(
  4079   4221                   configuration.Directory, configuration.Install);
  4080   4222   
  4081   4223               AnyPair<string, bool> fileNamePair = new AnyPair<string, bool>(
................................................................................
  4087   4229               if (configuration.HasFlags(InstallFlags.GAC, true))
  4088   4230               {
  4089   4231                   Publish publish = new Publish();
  4090   4232   
  4091   4233                   if (configuration.Install)
  4092   4234                   {
  4093   4235                       if (!configuration.WhatIf)
  4094         -                    {
  4095   4236                           publish.GacInstall(configuration.CoreFileName); /* throw */
         4237  +
         4238  +                    TraceOps.Trace(
         4239  +                        TracePriority.Highest, traceCallback, String.Format(
         4240  +                        "GacInstall: assemblyPath = {0}",
         4241  +                        configuration.CoreFileName), traceCategory);
         4242  +
         4243  +                    if (!configuration.WhatIf)
  4096   4244                           publish.GacInstall(configuration.LinqFileName); /* throw */
  4097         -                    }
  4098         -                    else
  4099         -                    {
  4100         -                        TraceOps.Trace(traceCallback, String.Format(
  4101         -                            "GacInstall: assemblyPath = {0}",
  4102         -                            configuration.CoreFileName), traceCategory);
  4103   4245   
  4104         -                        TraceOps.Trace(traceCallback, String.Format(
  4105         -                            "GacInstall: assemblyPath = {0}",
  4106         -                            configuration.LinqFileName), traceCategory);
  4107         -                    }
         4246  +                    TraceOps.Trace(
         4247  +                        TracePriority.Highest, traceCallback, String.Format(
         4248  +                        "GacInstall: assemblyPath = {0}",
         4249  +                        configuration.LinqFileName), traceCategory);
  4108   4250                   }
  4109   4251                   else
  4110   4252                   {
  4111   4253                       if (!configuration.WhatIf)
  4112         -                    {
  4113   4254                           publish.GacRemove(configuration.LinqFileName); /* throw */
         4255  +
         4256  +                    TraceOps.Trace(
         4257  +                        TracePriority.Highest, traceCallback, String.Format(
         4258  +                        "GacRemove: assemblyPath = {0}",
         4259  +                        configuration.LinqFileName), traceCategory);
         4260  +
         4261  +                    if (!configuration.WhatIf)
  4114   4262                           publish.GacRemove(configuration.CoreFileName); /* throw */
  4115         -                    }
  4116         -                    else
  4117         -                    {
  4118         -                        TraceOps.Trace(traceCallback, String.Format(
  4119         -                            "GacRemove: assemblyPath = {0}",
  4120         -                            configuration.LinqFileName), traceCategory);
  4121   4263   
  4122         -                        TraceOps.Trace(traceCallback, String.Format(
  4123         -                            "GacRemove: assemblyPath = {0}",
  4124         -                            configuration.CoreFileName), traceCategory);
  4125         -                    }
         4264  +                    TraceOps.Trace(
         4265  +                        TracePriority.Highest, traceCallback, String.Format(
         4266  +                        "GacRemove: assemblyPath = {0}",
         4267  +                        configuration.CoreFileName), traceCategory);
  4126   4268                   }
  4127   4269               }
  4128   4270               #endregion
  4129   4271   
  4130   4272               ///////////////////////////////////////////////////////////////////
  4131   4273   
  4132   4274               #region .NET AssemblyFolders
................................................................................
  4133   4275               if (configuration.HasFlags(InstallFlags.AssemblyFolders, true))
  4134   4276               {
  4135   4277                   if (!ForEachFrameworkRegistry(ProcessAssemblyFolders,
  4136   4278                           directoryPair, configuration.WhatIf,
  4137   4279                           configuration.Verbose, ref error))
  4138   4280                   {
  4139   4281                       TraceOps.ShowMessage(
  4140         -                        traceCallback, null, error, traceCategory,
  4141         -                        MessageBoxButtons.OK, MessageBoxIcon.Error);
         4282  +                        TracePriority.Highest, traceCallback, null,
         4283  +                        error, traceCategory, MessageBoxButtons.OK,
         4284  +                        MessageBoxIcon.Error);
  4142   4285   
  4143   4286                       return 1;
  4144   4287                   }
  4145   4288               }
  4146   4289               #endregion
  4147   4290   
  4148   4291               ///////////////////////////////////////////////////////////////////
................................................................................
  4150   4293               #region .NET DbProviderFactory
  4151   4294               if (configuration.HasFlags(InstallFlags.DbProviderFactory, true))
  4152   4295               {
  4153   4296                   bool saved = false;
  4154   4297   
  4155   4298                   if (!ForEachFrameworkConfig(ProcessDbProviderFactory,
  4156   4299                           InvariantName, ProviderName, Description,
  4157         -                        FactoryTypeName, AssemblyName.GetAssemblyName(
  4158         -                            configuration.CoreFileName), directoryPair,
         4300  +                        FactoryTypeName, assemblyName, directoryPair,
  4159   4301                           configuration.WhatIf, configuration.Verbose,
  4160   4302                           ref saved, ref error))
  4161   4303                   {
  4162   4304                       TraceOps.ShowMessage(
  4163         -                        traceCallback, null, error, traceCategory,
  4164         -                        MessageBoxButtons.OK, MessageBoxIcon.Error);
         4305  +                        TracePriority.Highest, traceCallback, null,
         4306  +                        error, traceCategory, MessageBoxButtons.OK,
         4307  +                        MessageBoxIcon.Error);
  4165   4308   
  4166   4309                       return 1;
  4167   4310                   }
  4168   4311               }
  4169   4312               #endregion
  4170   4313   
  4171   4314               ///////////////////////////////////////////////////////////////////
................................................................................
  4176   4319                   if (!ForEachVsVersionRegistry(ProcessVsPackage,
  4177   4320                           (Guid)vsPackageId, (Guid)vsServiceId,
  4178   4321                           (Guid)vsDataSourcesId, (Guid)vsDataProviderId,
  4179   4322                           fileNamePair, configuration.WhatIf,
  4180   4323                           configuration.Verbose, ref error))
  4181   4324                   {
  4182   4325                       TraceOps.ShowMessage(
  4183         -                        traceCallback, null, error, traceCategory,
  4184         -                        MessageBoxButtons.OK, MessageBoxIcon.Error);
         4326  +                        TracePriority.Highest, traceCallback, null,
         4327  +                        error, traceCategory, MessageBoxButtons.OK,
         4328  +                        MessageBoxIcon.Error);
  4185   4329   
  4186   4330                       return 1;
  4187   4331                   }
  4188   4332               }
  4189   4333               #endregion
  4190   4334   
  4191   4335               ///////////////////////////////////////////////////////////////////
................................................................................
  4196   4340                   if (!ForEachVsVersionRegistry(ProcessVsDataSource,
  4197   4341                           (Guid)vsPackageId, (Guid)vsServiceId,
  4198   4342                           (Guid)vsDataSourcesId, (Guid)vsDataProviderId,
  4199   4343                           fileNamePair, configuration.WhatIf,
  4200   4344                           configuration.Verbose, ref error))
  4201   4345                   {
  4202   4346                       TraceOps.ShowMessage(
  4203         -                        traceCallback, null, error, traceCategory,
  4204         -                        MessageBoxButtons.OK, MessageBoxIcon.Error);
         4347  +                        TracePriority.Highest, traceCallback, null,
         4348  +                        error, traceCategory, MessageBoxButtons.OK,
         4349  +                        MessageBoxIcon.Error);
  4205   4350   
  4206   4351                       return 1;
  4207   4352                   }
  4208   4353               }
  4209   4354               #endregion
  4210   4355   
  4211   4356               ///////////////////////////////////////////////////////////////////
................................................................................
  4216   4361                   if (!ForEachVsVersionRegistry(ProcessVsDataProvider,
  4217   4362                           (Guid)vsPackageId, (Guid)vsServiceId,
  4218   4363                           (Guid)vsDataSourcesId, (Guid)vsDataProviderId,
  4219   4364                           fileNamePair, configuration.WhatIf,
  4220   4365                           configuration.Verbose, ref error))
  4221   4366                   {
  4222   4367                       TraceOps.ShowMessage(
  4223         -                        traceCallback, null, error, traceCategory,
  4224         -                        MessageBoxButtons.OK, MessageBoxIcon.Error);
         4368  +                        TracePriority.Highest, traceCallback, null,
         4369  +                        error, traceCategory, MessageBoxButtons.OK,
         4370  +                        MessageBoxIcon.Error);
  4225   4371   
  4226   4372                       return 1;
  4227   4373                   }
  4228   4374               }
  4229   4375               #endregion
  4230   4376   
  4231   4377               ///////////////////////////////////////////////////////////////////
  4232   4378   
  4233         -            TraceOps.Trace(traceCallback, String.Format(
         4379  +            TraceOps.Trace(
         4380  +                TracePriority.Higher, traceCallback, String.Format(
  4234   4381                   "subKeysCreated = {0}, subKeysDeleted = {1}, " +
  4235   4382                   "keyValuesSet = {2}, keyValuesDeleted = {3}",
  4236   4383                   RegistryHelper.SubKeysCreated, RegistryHelper.SubKeysDeleted,
  4237   4384                   RegistryHelper.KeyValuesSet, RegistryHelper.KeyValuesDeleted),
  4238   4385                   traceCategory);
  4239   4386   
  4240   4387               ///////////////////////////////////////////////////////////////////