System.Data.SQLite
Check-in [252b910ba5]
Not logged in

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

Overview
Comment:Improve debugging support in the design-time components installer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 252b910ba5fd4d414086f69878ab523dbe8602d7
User & Date: mistachkin 2014-07-31 20:40:15
Context
2014-07-31
21:01
Add more logging to the design-time components installer. check-in: 2741442819 user: mistachkin tags: trunk
20:40
Improve debugging support in the design-time components installer. check-in: 252b910ba5 user: mistachkin tags: trunk
19:25
Update the master release archive manifest. check-in: fa5d926c64 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/data/Installer_Test_Vs2010.log.

     1      1   Installer.exe: #1: Configuration.Process: No actual changes will be made to this system because "what-if" mode is enabled.
     2         -Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved.
            2  +Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved to "[file nativename [file join [getBuildDirectory] EntityFramework.dll]]".
     3      3   Installer.exe: #3: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.dll]]"
     4      4   Installer.exe: #4: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.Linq.dll]]"
     5      5   Installer.exe: #5: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.EF6.dll]]"
     6      6   Installer.exe: #6: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] SQLite.Designer.dll]]"
     7      7   Installer.exe: #7: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.0.30319", writable = False
     8      8   Installer.exe: #8: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx", writable = True
     9      9   Installer.exe: #9: RegistryHelper.DeleteSubKey: rootKey = "HKEY_LOCAL_MACHINE\Software${wow64}\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx", subKeyName = "SQLite"

Changes to Tests/data/Installer_Test_Vs2012.log.

     1      1   Installer.exe: #1: Configuration.Process: No actual changes will be made to this system because "what-if" mode is enabled.
     2         -Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved.
            2  +Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved to "[file nativename [file join [getBuildDirectory] EntityFramework.dll]]".
     3      3   Installer.exe: #3: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.dll]]"
     4      4   Installer.exe: #4: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.Linq.dll]]"
     5      5   Installer.exe: #5: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.EF6.dll]]"
     6      6   Installer.exe: #6: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] SQLite.Designer.dll]]"
     7      7   Installer.exe: #7: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.50709", writable = False
     8      8   Installer.exe: #8: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx", writable = True
     9      9   Installer.exe: #9: RegistryHelper.DeleteSubKey: rootKey = "HKEY_LOCAL_MACHINE\Software${wow64}\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx", subKeyName = "SQLite"

Changes to Tests/data/Installer_Test_Vs2013.log.

     1      1   Installer.exe: #1: Configuration.Process: No actual changes will be made to this system because "what-if" mode is enabled.
     2         -Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved.
            2  +Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved to "[file nativename [file join [getBuildDirectory] EntityFramework.dll]]".
     3      3   Installer.exe: #3: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.dll]]"
     4      4   Installer.exe: #4: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.Linq.dll]]"
     5      5   Installer.exe: #5: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.EF6.dll]]"
     6      6   Installer.exe: #6: Installer.Main: GacInstall: assemblyPath = "[file nativename [file join [getBuildDirectory] SQLite.Designer.dll]]"
     7      7   Installer.exe: #7: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.1", writable = False
     8      8   Installer.exe: #8: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.1\AssemblyFoldersEx", writable = True
     9      9   Installer.exe: #9: RegistryHelper.DeleteSubKey: rootKey = "HKEY_LOCAL_MACHINE\Software${wow64}\Microsoft\.NETFramework\v4.5.1\AssemblyFoldersEx", subKeyName = "SQLite"

Changes to Tests/data/Uninstaller_Test_Vs2010.log.

     1      1   Installer.exe: #1: Configuration.Process: No actual changes will be made to this system because "what-if" mode is enabled.
     2         -Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved.
            2  +Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved to "[file nativename [file join [getBuildDirectory] EntityFramework.dll]]".
     3      3   Installer.exe: #3: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] SQLite.Designer.dll]]"
     4      4   Installer.exe: #4: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.EF6.dll]]"
     5      5   Installer.exe: #5: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.Linq.dll]]"
     6      6   Installer.exe: #6: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.dll]]"
     7      7   Installer.exe: #7: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.0.30319", writable = False
     8      8   Installer.exe: #8: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx", writable = True
     9      9   Installer.exe: #9: RegistryHelper.DeleteSubKey: rootKey = "HKEY_LOCAL_MACHINE\Software${wow64}\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx", subKeyName = "System.Data.SQLite"

Changes to Tests/data/Uninstaller_Test_Vs2012.log.

     1      1   Installer.exe: #1: Configuration.Process: No actual changes will be made to this system because "what-if" mode is enabled.
     2         -Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved.
            2  +Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved to "[file nativename [file join [getBuildDirectory] EntityFramework.dll]]".
     3      3   Installer.exe: #3: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] SQLite.Designer.dll]]"
     4      4   Installer.exe: #4: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.EF6.dll]]"
     5      5   Installer.exe: #5: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.Linq.dll]]"
     6      6   Installer.exe: #6: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.dll]]"
     7      7   Installer.exe: #7: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.50709", writable = False
     8      8   Installer.exe: #8: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx", writable = True
     9      9   Installer.exe: #9: RegistryHelper.DeleteSubKey: rootKey = "HKEY_LOCAL_MACHINE\Software${wow64}\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx", subKeyName = "System.Data.SQLite"

Changes to Tests/data/Uninstaller_Test_Vs2013.log.

     1      1   Installer.exe: #1: Configuration.Process: No actual changes will be made to this system because "what-if" mode is enabled.
     2         -Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved.
            2  +Installer.exe: #2: Configuration.IsSystemEf6AssemblyAvailable: Entity Framework 6 assembly was resolved to "[file nativename [file join [getBuildDirectory] EntityFramework.dll]]".
     3      3   Installer.exe: #3: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] SQLite.Designer.dll]]"
     4      4   Installer.exe: #4: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.EF6.dll]]"
     5      5   Installer.exe: #5: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.Linq.dll]]"
     6      6   Installer.exe: #6: Installer.Main: GacRemove: assemblyPath = "[file nativename [file join [getBuildDirectory] System.Data.SQLite.dll]]"
     7      7   Installer.exe: #7: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.1", writable = False
     8      8   Installer.exe: #8: RegistryHelper.OpenSubKey: rootKey = "HKEY_LOCAL_MACHINE", subKeyName = "Software${wow64}\Microsoft\.NETFramework\v4.5.1\AssemblyFoldersEx", writable = True
     9      9   Installer.exe: #9: RegistryHelper.DeleteSubKey: rootKey = "HKEY_LOCAL_MACHINE\Software${wow64}\Microsoft\.NETFramework\v4.5.1\AssemblyFoldersEx", subKeyName = "System.Data.SQLite"

Changes to tools/install/Installer.cs.

  1945   1945               private const string Ef6FactoryTypeName =
  1946   1946                   "System.Data.SQLite.EF6.SQLiteProviderFactory";
  1947   1947               #endregion
  1948   1948   
  1949   1949               ///////////////////////////////////////////////////////////////////
  1950   1950   
  1951   1951               #region Private Static Data
         1952  +            private static readonly Process CurrentProcess =
         1953  +                System.Diagnostics.Process.GetCurrentProcess();
         1954  +
         1955  +            ///////////////////////////////////////////////////////////////////
         1956  +
  1952   1957               private static Assembly systemEf6Assembly;
  1953   1958               #endregion
  1954   1959   
  1955   1960               ///////////////////////////////////////////////////////////////////
  1956   1961   
  1957   1962               #region Private Data
  1958   1963               private AssemblyName coreAssemblyName;
................................................................................
  2189   2194                   {
  2190   2195                       systemEf6Assembly = Assembly.ReflectionOnlyLoad(
  2191   2196                           SystemEf6AssemblyName);
  2192   2197   
  2193   2198                       if (systemEf6Assembly != null)
  2194   2199                       {
  2195   2200                           TraceOps.DebugAndTrace(TracePriority.Highest,
  2196         -                            debugCallback, traceCallback,
  2197         -                            "Entity Framework 6 assembly was resolved.",
         2201  +                            debugCallback, traceCallback, String.Format(
         2202  +                            "Entity Framework 6 assembly was resolved to {0}.",
         2203  +                            ForDisplay(systemEf6Assembly.Location)),
  2198   2204                               traceCategory);
  2199   2205   
  2200   2206                           return true;
  2201   2207                       }
  2202   2208                   }
  2203   2209                   catch
  2204   2210                   {
................................................................................
  2213   2219                   return false;
  2214   2220               }
  2215   2221               #endregion
  2216   2222   
  2217   2223               ///////////////////////////////////////////////////////////////////
  2218   2224   
  2219   2225               #region Public Static Methods
         2226  +            public static void BreakIntoDebugger()
         2227  +            {
         2228  +                Console.WriteLine(
         2229  +                    "Attach a debugger to process {0} and press any key to " +
         2230  +                    "continue.", (CurrentProcess != null) ?
         2231  +                    CurrentProcess.Id.ToString() : "<unknown>");
         2232  +
         2233  +                try
         2234  +                {
         2235  +                    Console.ReadKey(true); /* throw */
         2236  +                }
         2237  +                catch (InvalidOperationException) // Console.ReadKey
         2238  +                {
         2239  +                    // do nothing.
         2240  +                }
         2241  +
         2242  +                Debugger.Break();
         2243  +            }
         2244  +
         2245  +            ///////////////////////////////////////////////////////////////////
         2246  +
  2220   2247               public static Configuration CreateDefault()
  2221   2248               {
  2222   2249                   string directory = null;
  2223   2250                   string coreFileName = null;
  2224   2251                   string linqFileName = null;
  2225   2252                   string ef6FileName = null;
  2226   2253                   string designerFileName = null;
................................................................................
  2330   2357   
  2331   2358                           //
  2332   2359                           // NOTE: Figure out which command line option this is
  2333   2360                           //       (based on a partial name match) and then try
  2334   2361                           //       to interpret the textual value as the correct
  2335   2362                           //       type.
  2336   2363                           //
  2337         -                        if (MatchOption(newArg, "configVersion"))
         2364  +                        if (MatchOption(newArg, "break"))
         2365  +                        {
         2366  +                            bool? value = ParseBoolean(text);
         2367  +
         2368  +                            if (value == null)
         2369  +                            {
         2370  +                                error = TraceOps.DebugAndTrace(
         2371  +                                    TracePriority.Lowest, debugCallback,
         2372  +                                    traceCallback, String.Format(
         2373  +                                    "Invalid {0} boolean value: {1}",
         2374  +                                    ForDisplay(arg), ForDisplay(text)),
         2375  +                                    traceCategory);
         2376  +
         2377  +                                if (strict)
         2378  +                                    return false;
         2379  +
         2380  +                                continue;
         2381  +                            }
         2382  +
         2383  +                            if ((bool)value)
         2384  +                                BreakIntoDebugger();
         2385  +                        }
         2386  +                        else if (MatchOption(newArg, "configVersion"))
  2338   2387                           {
  2339   2388                               configuration.configVersion = text;
  2340   2389                           }
  2341   2390                           else if (MatchOption(newArg, "confirm"))
  2342   2391                           {
  2343   2392                               bool? value = ParseBoolean(text);
  2344   2393   
................................................................................
  6628   6677   
  6629   6678           #region Application Entry Point
  6630   6679           [MethodImpl(MethodImplOptions.NoInlining)]
  6631   6680           private static int Main(
  6632   6681               string[] args
  6633   6682               )
  6634   6683           {
         6684  +            if (Environment.GetEnvironmentVariable("BREAK") != null)
         6685  +                Configuration.BreakIntoDebugger();
         6686  +
         6687  +            ///////////////////////////////////////////////////////////////////
         6688  +
  6635   6689               try
  6636   6690               {
  6637   6691                   Configuration configuration = null;
  6638   6692                   string error = null;
  6639   6693   
  6640   6694                   ///////////////////////////////////////////////////////////////
  6641   6695