System.Data.SQLite

Check-in [6b6fb5374d]
Login

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

Overview
Comment:Include the 'LINQ' partial classes in the primary managed assembly for .NET Standard 2.1. Fix for [ad28d8e026]. Also, enhancements to related diagnostic functionality, including the new 'SQLite_ForceLogLifecycle' environment variable.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6b6fb5374dabb52e1be5f27f365275e98db09a00
User & Date: mistachkin 2019-12-08 04:01:17.902
References
2020-04-03
17:01
Partial cherry-pick of [6b6fb5374d]. check-in: c08d07c823 user: mistachkin tags: branch-1.0.112
Context
2020-05-24
00:36
Get this branch up-to-date with most trunk changes. check-in: bf714af93b user: mistachkin tags: branch-1.0.112
2020-04-03
17:01
Partial cherry-pick of [6b6fb5374d]. check-in: c08d07c823 user: mistachkin tags: branch-1.0.112
2019-12-08
04:59
Bump version to 1.0.113.0. Update version history docs. check-in: ebd945280e user: mistachkin tags: trunk
04:01
Include the 'LINQ' partial classes in the primary managed assembly for .NET Standard 2.1. Fix for [ad28d8e026]. Also, enhancements to related diagnostic functionality, including the new 'SQLite_ForceLogLifecycle' environment variable. check-in: 6b6fb5374d user: mistachkin tags: trunk
2019-10-27
20:40
Final updates for release 1.0.112.0. check-in: 7727af784b user: mistachkin tags: trunk, release, release-1.0.112.0
Changes
Unified Diff Ignore Whitespace Patch
Changes to Doc/Extra/Provider/environment.html.
267
268
269
270
271
272
273






274
275
276
277
278
279
280
        </tr>
        <tr valign="top">
          <td>SQLite_ForceLogPrepare</td>
          <td>If this environment variable is set [to anything], all calls to
          prepare a SQL query will be logged, regardless of the flags for the
          associated connection.</td>
        </tr>






        <tr valign="top">
          <td>TypeName_SQLiteProviderServices</td>
          <td>If this environment variable is set [to anything], it will be
          used by the System.Data.SQLite.SQLiteFactory class as the type name
          containing the System.Data.Common.DbProviderServices implementation
          that should be used.</td>
        </tr>







>
>
>
>
>
>







267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
        </tr>
        <tr valign="top">
          <td>SQLite_ForceLogPrepare</td>
          <td>If this environment variable is set [to anything], all calls to
          prepare a SQL query will be logged, regardless of the flags for the
          associated connection.</td>
        </tr>
        <tr valign="top">
          <td>SQLite_ForceLogLifecycle</td>
          <td>If this environment variable is set [to anything], calls into
          key members pertaining to the lifecycle of connections and their
          associated classes (e.g. LINQ, EF6, etc) will be logged.</td>
        </tr>
        <tr valign="top">
          <td>TypeName_SQLiteProviderServices</td>
          <td>If this environment variable is set [to anything], it will be
          used by the System.Data.SQLite.SQLiteFactory class as the type name
          containing the System.Data.Common.DbProviderServices implementation
          that should be used.</td>
        </tr>
Changes to System.Data.SQLite.Linq/SQLiteProviderFactory.cs.
137
138
139
140
141
142
143




144
145
146

147
148
149

150
151


152
153
154
155

156
157
158
159
160
161
162
        public object GetService(
            Type serviceType
            )
        {
            if ((serviceType == typeof(ISQLiteSchemaExtensions)) ||
                (serviceType == typeof(DbProviderServices)))
            {




                SQLiteLog.LogMessage(HelperMethods.StringFormat(
                    CultureInfo.CurrentCulture,
                    "IServiceProvider.GetService for type \"{0}\" (success).",

                    serviceType));

                return SQLiteProviderServices.Instance;

            }



            SQLiteLog.LogMessage(HelperMethods.StringFormat(
                CultureInfo.CurrentCulture,
                "IServiceProvider.GetService for type \"{0}\" (failure).",
                serviceType));


            return null;
        }
        #endregion

        ///////////////////////////////////////////////////////////////////////








>
>
>
>
|
|
|
>
|
|
|
>


>
>
|
|
|
|
>







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
        public object GetService(
            Type serviceType
            )
        {
            if ((serviceType == typeof(ISQLiteSchemaExtensions)) ||
                (serviceType == typeof(DbProviderServices)))
            {
                object result = SQLiteProviderServices.Instance;

                if (SQLite3.ForceLogLifecycle())
                {
                    SQLiteLog.LogMessage(HelperMethods.StringFormat(
                        CultureInfo.CurrentCulture,
                        "Success of \"{0}\" from SQLiteProviderFactory.GetService(\"{1}\")...",
                        (result != null) ? result.ToString() : "<null>",
                        (serviceType != null) ? serviceType.ToString() : "<null>"));
                }

                return result;
            }

            if (SQLite3.ForceLogLifecycle())
            {
                SQLiteLog.LogMessage(HelperMethods.StringFormat(
                    CultureInfo.CurrentCulture,
                    "Failure of SQLiteProviderFactory.GetService(\"{0}\")...",
                    (serviceType != null) ? serviceType.ToString() : "<null>"));
            }

            return null;
        }
        #endregion

        ///////////////////////////////////////////////////////////////////////

Changes to System.Data.SQLite/Configurations/System.Data.SQLite.dll.config.
260
261
262
263
264
265
266









267
268
269
270
271
272
273
        NOTE: If this environment variable is set [to anything], all calls to
              prepare a SQL query will be logged, regardless of the flags for
              the associated connection.
    -->
    <!--
    <add key="SQLite_ForceLogPrepare" value="1" />
    -->










    <!--
        NOTE: If this environment variable is set [to anything], it will be
              used by the System.Data.SQLite.SQLiteFactory class as the type
              name containing the System.Data.Common.DbProviderServices
              implementation that should be used.
    -->







>
>
>
>
>
>
>
>
>







260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
        NOTE: If this environment variable is set [to anything], all calls to
              prepare a SQL query will be logged, regardless of the flags for
              the associated connection.
    -->
    <!--
    <add key="SQLite_ForceLogPrepare" value="1" />
    -->

    <!--
        NOTE: If this environment variable is set [to anything], calls into
              key members pertaining to the lifecycle of connections and their
              associated classes (e.g. LINQ, EF6, etc) will be logged.
    -->
    <!--
    <add key="SQLite_ForceLogLifecycle" value="1" />
    -->

    <!--
        NOTE: If this environment variable is set [to anything], it will be
              used by the System.Data.SQLite.SQLiteFactory class as the type
              name containing the System.Data.Common.DbProviderServices
              implementation that should be used.
    -->
Changes to System.Data.SQLite/LINQ/SQLiteConnection_Linq.cs.
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
18


19











20
21
22
23
/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/

namespace System.Data.SQLite
{

  using System.Data.Common;

  public sealed partial class SQLiteConnection
  {
    /// <summary>
    /// Returns the <see cref="SQLiteFactory" /> instance.
    /// </summary>
    protected override DbProviderFactory DbProviderFactory
    {


      get { return SQLiteFactory.Instance; }











    }
  }
}










>









>
>
|
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/

namespace System.Data.SQLite
{
  using System.Globalization;
  using System.Data.Common;

  public sealed partial class SQLiteConnection
  {
    /// <summary>
    /// Returns the <see cref="SQLiteFactory" /> instance.
    /// </summary>
    protected override DbProviderFactory DbProviderFactory
    {
      get
      {
        DbProviderFactory result = SQLiteFactory.Instance;

        if (SQLite3.ForceLogLifecycle())
        {
          SQLiteLog.LogMessage(HelperMethods.StringFormat(
            CultureInfo.CurrentCulture,
            "Returning \"{0}\" from SQLiteConnection.DbProviderFactory...",
            (result != null) ? result.ToString() : "<null>"));
        }

        return result;
      }
    }
  }
}

Changes to System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs.
26
27
28
29
30
31
32
33
34
35
36
37
38
39


40
41











42
43
44
45
46











47
48
49
50
51
52
53
54
55
56
57


58
59
60
61
62
63
64
65
66
67
68
69




















70
71
72


73
74
75
76
77
78
79
80
    //       situation may need to change.
    //
    private static readonly string DefaultTypeName =
      "System.Data.SQLite.Linq.SQLiteProviderServices, System.Data.SQLite.Linq, " +
      "Version={0}, Culture=neutral, PublicKeyToken=db937bc2d44ff139";

    private static readonly BindingFlags DefaultBindingFlags =
        BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;

    ///////////////////////////////////////////////////////////////////////////

    private static Type _dbProviderServicesType;
    private static object _sqliteServices;



    static SQLiteFactory()
    {











#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
        UnsafeNativeMethods.Initialize();
#endif

        SQLiteLog.Initialize(typeof(SQLiteFactory).Name);












        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
            "4.0.0.0";
#else
            "3.5.0.0";
#endif

        _dbProviderServicesType = Type.GetType(HelperMethods.StringFormat(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
    }



    /// <summary>
    /// Will provide a <see cref="IServiceProvider" /> object in .NET 3.5.
    /// </summary>
    /// <param name="serviceType">The class or interface type to query for.</param>
    /// <returns></returns>
    object IServiceProvider.GetService(Type serviceType)
    {
      if (serviceType == typeof(ISQLiteSchemaExtensions) ||
        (_dbProviderServicesType != null && serviceType == _dbProviderServicesType))
      {
        return GetSQLiteProviderServicesInstance();
      }




















      return null;
    }



#if !NET_STANDARD_20 || NET_STANDARD_21
    [ReflectionPermission(SecurityAction.Assert, MemberAccess = true)]
#endif
    private object GetSQLiteProviderServicesInstance()
    {
        if (_sqliteServices == null)
        {
            string typeName = UnsafeNativeMethods.GetSettingValue(







|






>
>


>
>
>
>
>
>
>
>
>
>
>





>
>
>
>
>
>
>
>
>
>
>











>
>










|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



>
>
|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
    //       situation may need to change.
    //
    private static readonly string DefaultTypeName =
      "System.Data.SQLite.Linq.SQLiteProviderServices, System.Data.SQLite.Linq, " +
      "Version={0}, Culture=neutral, PublicKeyToken=db937bc2d44ff139";

    private static readonly BindingFlags DefaultBindingFlags =
        BindingFlags.NonPublic | BindingFlags.Static;

    ///////////////////////////////////////////////////////////////////////////

    private static Type _dbProviderServicesType;
    private static object _sqliteServices;

    ///////////////////////////////////////////////////////////////////////////

    static SQLiteFactory()
    {
      InitializeDbProviderServices();
    }

    ///////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// This method is called to perform preliminary static initialization
    /// necessary for this class.
    /// </summary>
    internal static void PreInitialize()
    {
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
        UnsafeNativeMethods.Initialize();
#endif

        SQLiteLog.Initialize(typeof(SQLiteFactory).Name);
    }

    ///////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// This method is called to perform some of the static initialization
    /// necessary for this class.
    /// </summary>
    private static void InitializeDbProviderServices()
    {
        PreInitialize();

        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
            "4.0.0.0";
#else
            "3.5.0.0";
#endif

        _dbProviderServicesType = Type.GetType(HelperMethods.StringFormat(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
    }

    ///////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// Will provide a <see cref="IServiceProvider" /> object in .NET 3.5.
    /// </summary>
    /// <param name="serviceType">The class or interface type to query for.</param>
    /// <returns></returns>
    object IServiceProvider.GetService(Type serviceType)
    {
      if (serviceType == typeof(ISQLiteSchemaExtensions) ||
        (_dbProviderServicesType != null && serviceType == _dbProviderServicesType))
      {
        object result = GetSQLiteProviderServicesInstance();

        if (SQLite3.ForceLogLifecycle())
        {
          SQLiteLog.LogMessage(HelperMethods.StringFormat(
            CultureInfo.CurrentCulture,
            "Success of \"{0}\" from SQLiteFactory.GetService(\"{1}\")...",
            (result != null) ? result.ToString() : "<null>",
            (serviceType != null) ? serviceType.ToString() : "<null>"));
        }

        return result;
      }

      if (SQLite3.ForceLogLifecycle())
      {
        SQLiteLog.LogMessage(HelperMethods.StringFormat(
          CultureInfo.CurrentCulture,
          "Failure of SQLiteFactory.GetService(\"{0}\")...",
          (serviceType != null) ? serviceType.ToString() : "<null>"));
      }

      return null;
    }

    ///////////////////////////////////////////////////////////////////////////

#if !NET_STANDARD_20 && !NET_STANDARD_21
    [ReflectionPermission(SecurityAction.Assert, MemberAccess = true)]
#endif
    private object GetSQLiteProviderServicesInstance()
    {
        if (_sqliteServices == null)
        {
            string typeName = UnsafeNativeMethods.GetSettingValue(
100
101
102
103
104
105
106

107
108
109
110
                FieldInfo field = type.GetField(
                    "Instance", DefaultBindingFlags);

                if (field != null)
                    _sqliteServices = field.GetValue(null);
            }
        }

        return _sqliteServices;
    }
  }
}







>




148
149
150
151
152
153
154
155
156
157
158
159
                FieldInfo field = type.GetField(
                    "Instance", DefaultBindingFlags);

                if (field != null)
                    _sqliteServices = field.GetValue(null);
            }
        }

        return _sqliteServices;
    }
  }
}
Changes to System.Data.SQLite/SQLite3.cs.
1342
1343
1344
1345
1346
1347
1348









1349
1350
1351
1352
1353
1354
1355
    /// "SQLite_ForceLogPrepare" environment variable has been queried.  If so,
    /// it will only be non-zero if the environment variable was present.
    /// </summary>
    private static bool? forceLogPrepare = null;

    ///////////////////////////////////////////////////////////////////////////////////////////////










    /// <summary>
    /// Determines if all calls to prepare a SQL query will be logged,
    /// regardless of the flags for the associated connection.
    /// </summary>
    /// <returns>
    /// Non-zero to log all calls to prepare a SQL query.
    /// </returns>







>
>
>
>
>
>
>
>
>







1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
    /// "SQLite_ForceLogPrepare" environment variable has been queried.  If so,
    /// it will only be non-zero if the environment variable was present.
    /// </summary>
    private static bool? forceLogPrepare = null;

    ///////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// This field is used to keep track of whether or not the
    /// "SQLite_ForceLogLifecycle" environment variable has been queried.  If
    /// so, it will only be non-zero if the environment variable was present.
    /// </summary>
    private static bool? forceLogLifecycle = null;

    ///////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// Determines if all calls to prepare a SQL query will be logged,
    /// regardless of the flags for the associated connection.
    /// </summary>
    /// <returns>
    /// Non-zero to log all calls to prepare a SQL query.
    /// </returns>
1369
1370
1371
1372
1373
1374
1375
































1376
1377
1378
1379
1380
1381
1382
                    forceLogPrepare = false;
                }
            }

            return (bool)forceLogPrepare;
        }
    }
































    #endregion

    ///////////////////////////////////////////////////////////////////////////////////////////////

    internal override SQLiteStatement Prepare(SQLiteConnection cnn, string strSql, SQLiteStatement previous, uint timeoutMS, ref string strRemain)
    {
      if (!String.IsNullOrEmpty(strSql)) strSql = strSql.Trim();







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







1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
                    forceLogPrepare = false;
                }
            }

            return (bool)forceLogPrepare;
        }
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// Determines if calls into key members pertaining to the lifecycle of
    /// connections and their associated classes will be logged, regardless
    /// of the flags for the associated connection.
    /// </summary>
    /// <returns>
    /// Non-zero to log calls into key members pertaining to the lifecycle of
    /// connections and their associated classes (e.g. LINQ, EF6, etc).
    /// </returns>
    internal static bool ForceLogLifecycle()
    {
        lock (syncRoot)
        {
            if (forceLogLifecycle == null)
            {
                if (UnsafeNativeMethods.GetSettingValue(
                        "SQLite_ForceLogLifecycle", null) != null)
                {
                    forceLogLifecycle = true;
                }
                else
                {
                    forceLogLifecycle = false;
                }
            }

            return (bool)forceLogLifecycle;
        }
    }
    #endregion

    ///////////////////////////////////////////////////////////////////////////////////////////////

    internal override SQLiteStatement Prepare(SQLiteConnection cnn, string strSql, SQLiteStatement previous, uint timeoutMS, ref string strRemain)
    {
      if (!String.IsNullOrEmpty(strSql)) strSql = strSql.Trim();
Changes to System.Data.SQLite/Targets/System.Data.SQLite.Files.targets.
91
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106
107
108
109
110
111
112

113
114
115
116
117
118
119
                        '$(NetFx451)' != 'false' Or
                        '$(NetFx452)' != 'false' Or
                        '$(NetFx46)' != 'false' Or
                        '$(NetFx461)' != 'false' Or
                        '$(NetFx462)' != 'false' Or
                        '$(NetFx47)' != 'false' Or
                        '$(NetFx471)' != 'false' Or
                        '$(NetFx472)' != 'false'"

             Include="LINQ\SQLiteConnection_Linq.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Condition="'$(NetFx35)' != 'false' Or
                        '$(NetFx40)' != 'false' Or
                        '$(NetFx45)' != 'false' Or
                        '$(NetFx451)' != 'false' Or
                        '$(NetFx452)' != 'false' Or
                        '$(NetFx46)' != 'false' Or
                        '$(NetFx461)' != 'false' Or
                        '$(NetFx462)' != 'false' Or
                        '$(NetFx47)' != 'false' Or
                        '$(NetFx471)' != 'false' Or
                        '$(NetFx472)' != 'false'"

             Include="LINQ\SQLiteFactory_Linq.cs">
      <SubType>Code</SubType>
    </Compile>
    <EmbeddedResource Include="Resources\SQLiteCommand.bmp" />
    <EmbeddedResource Include="Resources\SQLiteConnection.bmp" />
    <EmbeddedResource Include="Resources\SQLiteDataAdapter.bmp" />
  </ItemGroup>







|
>













|
>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
                        '$(NetFx451)' != 'false' Or
                        '$(NetFx452)' != 'false' Or
                        '$(NetFx46)' != 'false' Or
                        '$(NetFx461)' != 'false' Or
                        '$(NetFx462)' != 'false' Or
                        '$(NetFx47)' != 'false' Or
                        '$(NetFx471)' != 'false' Or
                        '$(NetFx472)' != 'false' Or
                        '$(NetStandard21)' != 'false'"
             Include="LINQ\SQLiteConnection_Linq.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Condition="'$(NetFx35)' != 'false' Or
                        '$(NetFx40)' != 'false' Or
                        '$(NetFx45)' != 'false' Or
                        '$(NetFx451)' != 'false' Or
                        '$(NetFx452)' != 'false' Or
                        '$(NetFx46)' != 'false' Or
                        '$(NetFx461)' != 'false' Or
                        '$(NetFx462)' != 'false' Or
                        '$(NetFx47)' != 'false' Or
                        '$(NetFx471)' != 'false' Or
                        '$(NetFx472)' != 'false' Or
                        '$(NetStandard21)' != 'false'"
             Include="LINQ\SQLiteFactory_Linq.cs">
      <SubType>Code</SubType>
    </Compile>
    <EmbeddedResource Include="Resources\SQLiteCommand.bmp" />
    <EmbeddedResource Include="Resources\SQLiteConnection.bmp" />
    <EmbeddedResource Include="Resources\SQLiteDataAdapter.bmp" />
  </ItemGroup>
Changes to System.Data.SQLite/Targets/System.Data.SQLite.Properties.targets.
1
2
3
4
5
6
7
8
9
10
11











12
13
14
15
16
17
18
19
<!--
 *
 * System.Data.SQLite.Properties.targets -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--
  ******************************************************************************











  **                             Define Constants                             **
  ******************************************************************************
  -->

  <!--
      NOTE: Only use functionality available in the .NET Framework 2.0?  By
            default, this is disabled.  This must be enabled to successfully
            build the project using Visual Studio 2005 and/or the .NET











>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!--
 *
 * System.Data.SQLite.Properties.targets -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--
  ******************************************************************************
  **                           Platform Properties                            **
  ******************************************************************************
  -->

  <PropertyGroup>
    <NetStandard21 Condition="'$(NetStandard21)' == '' And ('$(IsDotNetStandard)' == 'false' Or ('$(TargetFramework)' != 'netstandard2.1' And '$(TargetFramework)' != 'netcoreapp3.0'))">false</NetStandard21>
    <NetStandard21 Condition="'$(NetStandard21)' == '' And ('$(IsDotNetStandard)' != 'false' And ('$(TargetFramework)' == 'netstandard2.1' Or '$(TargetFramework)' == 'netcoreapp3.0'))">true</NetStandard21>
  </PropertyGroup>

  <!--
  ******************************************************************************
  **                        Platform Define Constants                         **
  ******************************************************************************
  -->

  <!--
      NOTE: Only use functionality available in the .NET Framework 2.0?  By
            default, this is disabled.  This must be enabled to successfully
            build the project using Visual Studio 2005 and/or the .NET