System.Data.SQLite

Check-in [4c3bf14969]
Login

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

Overview
Comment:Preliminary support for an alternate DLL config file. Pursuant to [bd9c4375cc].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4c3bf14969ceef63b9a5ef865289cd267a174d33
User & Date: mistachkin 2020-06-09 23:00:19.303
Context
2020-09-22
21:23
Adjustments to native library integration for version 3.33. check-in: f95bfddecf user: mistachkin tags: trunk
2020-08-14
13:32
Update SQLite core library to the 3.33.0 release. Closed-Leaf check-in: 9a82d5c9c7 user: mistachkin tags: core-3-33
2020-06-09
23:00
Preliminary support for an alternate DLL config file. Pursuant to [bd9c4375cc]. check-in: 4c3bf14969 user: mistachkin tags: trunk
2020-06-01
22:50
Enhancements to the NuGet packaging automation. check-in: f33042c238 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to NuGet/SQLite.Core.Beta.nuspec.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    <file src="..\bin\2016\linux-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\linux-x64\native\netstandard2.1" />
    <file src="..\bin\2016\osx-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\osx-x64\native\netstandard2.1" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net46" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\netstandard2.0" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\netstandard2.1" />
  </files>
</package>







|
|
|
|
|
|
|


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    <file src="..\bin\2016\linux-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\linux-x64\native\netstandard2.1" />
    <file src="..\bin\2016\osx-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\osx-x64\native\netstandard2.1" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net46" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\netstandard2.0" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\netstandard2.1" />
  </files>
</package>
Changes to NuGet/SQLite.Core.Test.nuspec.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    <file src="..\bin\2016\linux-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\linux-x64\native\netstandard2.1" />
    <file src="..\bin\2016\osx-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\osx-x64\native\netstandard2.1" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net46" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\netstandard2.0" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\netstandard2.1" />
  </files>
</package>







|
|
|
|
|
|
|


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    <file src="..\bin\2016\linux-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\linux-x64\native\netstandard2.1" />
    <file src="..\bin\2016\osx-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\osx-x64\native\netstandard2.1" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net46" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\netstandard2.0" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\netstandard2.1" />
  </files>
</package>
Changes to NuGet/SQLite.Core.nuspec.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    <file src="..\bin\2016\linux-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\linux-x64\native\netstandard2.1" />
    <file src="..\bin\2016\osx-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\osx-x64\native\netstandard2.1" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net46" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\netstandard2.0" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\netstandard2.1" />
  </files>
</package>







|
|
|
|
|
|
|


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    <file src="..\bin\2016\linux-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\linux-x64\native\netstandard2.1" />
    <file src="..\bin\2016\osx-x64\ReleaseNativeOnly\SQLite.Interop.dll" target="runtimes\osx-x64\native\netstandard2.1" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\net46" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\netstandard2.0" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.altconfig" target="lib\netstandard2.1" />
  </files>
</package>
Name change from NuGet/shared/Core/lib/System.Data.SQLite.dll.config to NuGet/shared/Core/lib/System.Data.SQLite.dll.altconfig.
1
2
3
4
5
6
7
8
9
10
11
<?xml version="1.0"?>
<!--
 *
 * System.Data.SQLite.dll.config -
 *
 * WARNING: This XML configuration file is intended for use within the NuGet
 *          package directories only.  Please do not copy this file to any of
 *          the build output directories because it could interfere with the
 *          native library pre-loading feature.
 *
 * Written by Joe Mistachkin.



|







1
2
3
4
5
6
7
8
9
10
11
<?xml version="1.0"?>
<!--
 *
 * System.Data.SQLite.dll.altconfig -
 *
 * WARNING: This XML configuration file is intended for use within the NuGet
 *          package directories only.  Please do not copy this file to any of
 *          the build output directories because it could interfere with the
 *          native library pre-loading feature.
 *
 * Written by Joe Mistachkin.
Changes to Setup/data/verify.lst.
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
  NuGet/shared/Core/
  NuGet/shared/Core/build/
  NuGet/shared/Core/build/System.Data.SQLite.Core.targets
  NuGet/shared/Core/content/
  NuGet/shared/Core/content/config.install.xdt
  NuGet/shared/Core/content/config.transform
  NuGet/shared/Core/lib/
  NuGet/shared/Core/lib/System.Data.SQLite.dll.config
  NuGet/SQLite.Beta.nuspec
  NuGet/SQLite.Core.Beta.nuspec
  NuGet/SQLite.Core.MSIL.Beta.nuspec
  NuGet/SQLite.Core.MSIL.nuspec
  NuGet/SQLite.Core.MSIL.Test.nuspec
  NuGet/SQLite.Core.nuspec
  NuGet/SQLite.Core.Test.nuspec







|







243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
  NuGet/shared/Core/
  NuGet/shared/Core/build/
  NuGet/shared/Core/build/System.Data.SQLite.Core.targets
  NuGet/shared/Core/content/
  NuGet/shared/Core/content/config.install.xdt
  NuGet/shared/Core/content/config.transform
  NuGet/shared/Core/lib/
  NuGet/shared/Core/lib/System.Data.SQLite.dll.altconfig
  NuGet/SQLite.Beta.nuspec
  NuGet/SQLite.Core.Beta.nuspec
  NuGet/SQLite.Core.MSIL.Beta.nuspec
  NuGet/SQLite.Core.MSIL.nuspec
  NuGet/SQLite.Core.MSIL.Test.nuspec
  NuGet/SQLite.Core.nuspec
  NuGet/SQLite.Core.Test.nuspec
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474






1475
1476
1477
1478
1479
1480









1481
1482
1483
1484
1485
1486
1487
      /// <summary>
      /// The file extension used for dynamic link libraries.
      /// </summary>
      private static readonly string DllFileExtension = ".dll";

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// The file extension used for the XML configuration file.
      /// </summary>
      private static readonly string ConfigFileExtension = ".config";

      /////////////////////////////////////////////////////////////////////////
      /// <summary>






      /// This is the name of the XML configuration file specific to the
      /// System.Data.SQLite assembly.
      /// </summary>
      private static readonly string XmlConfigFileName =
          typeof(UnsafeNativeMethods).Namespace + DllFileExtension +
          ConfigFileExtension;










      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This is the XML configuratrion file token that will be replaced with
      /// the qualified path to the directory containing the XML configuration
      /// file.
      /// </summary>







|





>
>
>
>
>
>
|
|




>
>
>
>
>
>
>
>
>







1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
      /// <summary>
      /// The file extension used for dynamic link libraries.
      /// </summary>
      private static readonly string DllFileExtension = ".dll";

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// The primary file extension used for the XML configuration file.
      /// </summary>
      private static readonly string ConfigFileExtension = ".config";

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// The secondary file extension used for the XML configuration file.
      /// </summary>
      private static readonly string AltConfigFileExtension = ".altconfig";

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This is the name of the primary XML configuration file specific
      /// to the System.Data.SQLite assembly.
      /// </summary>
      private static readonly string XmlConfigFileName =
          typeof(UnsafeNativeMethods).Namespace + DllFileExtension +
          ConfigFileExtension;

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This is the name of the secondary XML configuration file specific
      /// to the System.Data.SQLite assembly.
      /// </summary>
      private static readonly string XmlAltConfigFileName =
          typeof(UnsafeNativeMethods).Namespace + DllFileExtension +
          AltConfigFileExtension;

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This is the XML configuratrion file token that will be replaced with
      /// the qualified path to the directory containing the XML configuration
      /// file.
      /// </summary>
1859
1860
1861
1862
1863
1864
1865












1866
1867
1868
1869
1870












1871
1872
1873
1874
1875
1876
1877
              lock (staticSyncRoot)
              {
                  cachedXmlConfigFileName = fileName;
              }

              return fileName;
          }












#endif

          directory = GetCachedAssemblyDirectory();
          fileName = MaybeCombinePath(directory, XmlConfigFileName);













          if (File.Exists(fileName))
          {
              lock (staticSyncRoot)
              {
                  cachedXmlConfigFileName = fileName;
              }








>
>
>
>
>
>
>
>
>
>
>
>





>
>
>
>
>
>
>
>
>
>
>
>







1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
              lock (staticSyncRoot)
              {
                  cachedXmlConfigFileName = fileName;
              }

              return fileName;
          }

          fileName = MaybeCombinePath(directory, XmlAltConfigFileName);

          if (File.Exists(fileName))
          {
              lock (staticSyncRoot)
              {
                  cachedXmlConfigFileName = fileName;
              }

              return fileName;
          }
#endif

          directory = GetCachedAssemblyDirectory();
          fileName = MaybeCombinePath(directory, XmlConfigFileName);

          if (File.Exists(fileName))
          {
              lock (staticSyncRoot)
              {
                  cachedXmlConfigFileName = fileName;
              }

              return fileName;
          }

          fileName = MaybeCombinePath(directory, XmlAltConfigFileName);

          if (File.Exists(fileName))
          {
              lock (staticSyncRoot)
              {
                  cachedXmlConfigFileName = fileName;
              }

2495
2496
2497
2498
2499
2500
2501
2502

2503
2504
2505

























2506
2507
2508
2509
2510
2511
2512
              if (File.Exists(xmlConfigFileName))
              {
#if !NET_COMPACT_20 && TRACE_DETECTION
                  try
                  {
                      Trace.WriteLine(HelperMethods.StringFormat(
                          CultureInfo.CurrentCulture,
                          "Native library pre-loader found XML configuration file " +

                          "via code base for currently executing assembly: \"{0}\"",
                          xmlConfigFileName)); /* throw */
                  }

























                  catch
                  {
                      // do nothing.
                  }
#endif

                  fileName = localFileName;







|
>
|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
              if (File.Exists(xmlConfigFileName))
              {
#if !NET_COMPACT_20 && TRACE_DETECTION
                  try
                  {
                      Trace.WriteLine(HelperMethods.StringFormat(
                          CultureInfo.CurrentCulture,
                          "Native library pre-loader found primary XML " +
                          "configuration file via code base for currently " +
                          "executing assembly: \"{0}\"",
                          xmlConfigFileName)); /* throw */
                  }
                  catch
                  {
                      // do nothing.
                  }
#endif

                  fileName = localFileName;
                  return true;
              }

              string xmlAltConfigFileName = MaybeCombinePath(
                  directory, XmlAltConfigFileName);

              if (File.Exists(xmlAltConfigFileName))
              {
#if !NET_COMPACT_20 && TRACE_DETECTION
                  try
                  {
                      Trace.WriteLine(HelperMethods.StringFormat(
                          CultureInfo.CurrentCulture,
                          "Native library pre-loader found secondary XML " +
                          "configuration file via code base for currently " +
                          "executing assembly: \"{0}\"",
                          xmlAltConfigFileName)); /* throw */
                  }
                  catch
                  {
                      // do nothing.
                  }
#endif

                  fileName = localFileName;