Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retargeting core project for .NET Standard 2.0 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions System.Data.SQLite.Benchmark/System.Data.SQLite.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -12,6 +12,8 @@
<AssemblyName>Benchmark</AssemblyName>
<StartupObject>Benchmark</StartupObject>
<ApplicationIcon>C#-SQLite.ico</ApplicationIcon>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -23,6 +25,7 @@
<WarningLevel>4</WarningLevel>
<NoWarn>0168;0414;0219</NoWarn>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand All @@ -33,6 +36,7 @@
<WarningLevel>4</WarningLevel>
<NoWarn>0168;0414;0219</NoWarn>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -61,4 +65,7 @@
<Name>System.Data.SQLite</Name>
</ProjectReference>
</ItemGroup>
</Project>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
</Project>
9 changes: 5 additions & 4 deletions System.Data.SQLite/Client/SQLiteConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
using System.Data.Common;
using System.Text;
using System.Collections.Generic;
using System.Reflection;

namespace System.Data.SQLite
{
Expand Down Expand Up @@ -227,10 +228,10 @@ private void SetConnectionString(string connstring)
#if !(SQLITE_SILVERLIGHT || WINDOWS_MOBILE)
}
else if(tvalue_lc.StartsWith("|DataDirectory|", StringComparison.InvariantCultureIgnoreCase))
{
AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation;
string filePath = String.Format("App_Data{0}{1}", Path.DirectorySeparatorChar, tvalue_lc.Substring(15));
db_file = Path.Combine(ads.ApplicationBase, filePath);
{
var applicationPath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location) ?? "";
string filePath = String.Format("App_Data{0}{1}", Path.DirectorySeparatorChar, tvalue_lc.Substring(15));
db_file = Path.Combine(applicationPath, filePath);
#endif
}
else
Expand Down
33 changes: 0 additions & 33 deletions System.Data.SQLite/Properties/AssemblyInfo.cs

This file was deleted.

156 changes: 21 additions & 135 deletions System.Data.SQLite/System.Data.SQLite.csproj
Original file line number Diff line number Diff line change
@@ -1,146 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F1653F20-D47D-4F29-8C55-3C835542AF5F}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>System.Data.SQLite</RootNamespace>
<AssemblyName>System.Data.SQLite</AssemblyName>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>C#-SQLite is an independent reimplementation of the SQLite software library</Description>
<Authors>Pioneer Software Consulting</Authors>
<Company>Pioneer Software Consulting</Company>
<Product>C#-SQLite3 shell</Product>
<Copyright>Copyright © 2009-2013</Copyright>
<Version>3.7.7.1</Version>
<RepositoryUrl>https://github.com/CsharpDatabase/CsharpSQLite</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/CsharpDatabase/CsharpSQLite</PackageProjectUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\Run\Debug</OutputPath>
<DefineConstants>DEBUG;TRUE;NDEBUG;SQLITE_ASCII;SQLITE_DISABLE_LFS;SQLITE_ENABLE_OVERSIZE_CELL_CHECK;SQLITE_MUTEX_OMIT;SQLITE_OMIT_AUTHORIZATION;SQLITE_OMIT_DEPRECATED;SQLITE_OMIT_GET_TABLE;SQLITE_OMIT_INCRBLOB;SQLITE_OMIT_LOOKASIDE;SQLITE_OMIT_SHARED_CACHE;SQLITE_OMIT_UTF16;SQLITE_OMIT_WAL;SQLITE_OS_WIN;SQLITE_SYSTEM_MALLOC;VDBE_PROFILE_OFF;SQLITE_DEFAULT_FOREIGN_KEYS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DefineConstants>TRACE;DEBUG;TRUE;NDEBUG;SQLITE_ASCII;SQLITE_DISABLE_LFS;SQLITE_ENABLE_OVERSIZE_CELL_CHECK;SQLITE_MUTEX_OMIT;SQLITE_OMIT_AUTHORIZATION;SQLITE_OMIT_DEPRECATED;SQLITE_OMIT_GET_TABLE;SQLITE_OMIT_INCRBLOB;SQLITE_OMIT_LOOKASIDE;SQLITE_OMIT_SHARED_CACHE;SQLITE_OMIT_UTF16;SQLITE_OMIT_WAL;SQLITE_OS_WIN;SQLITE_SYSTEM_MALLOC;VDBE_PROFILE_OFF;SQLITE_DEFAULT_FOREIGN_KEYS</DefineConstants>
<NoWarn>0168;0169;0414;0618;0649;0219;0162;0429</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>True</Optimize>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\Run\Release</OutputPath>
<DefineConstants>TRUE;NDEBUG;SQLITE_ASCII;SQLITE_DISABLE_LFS;SQLITE_ENABLE_OVERSIZE_CELL_CHECK;SQLITE_MUTEX_OMIT;SQLITE_OMIT_AUTHORIZATION;SQLITE_OMIT_DEPRECATED;SQLITE_OMIT_GET_TABLE;SQLITE_OMIT_INCRBLOB;SQLITE_OMIT_LOOKASIDE;SQLITE_OMIT_SHARED_CACHE;SQLITE_OMIT_UTF16;SQLITE_OMIT_WAL;SQLITE_OS_WIN;SQLITE_SYSTEM_MALLOC;VDBE_PROFILE_OFF;SQLITE_DEFAULT_FOREIGN_KEYS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DefineConstants>TRACE;TRUE;NDEBUG;SQLITE_ASCII;SQLITE_DISABLE_LFS;SQLITE_ENABLE_OVERSIZE_CELL_CHECK;SQLITE_MUTEX_OMIT;SQLITE_OMIT_AUTHORIZATION;SQLITE_OMIT_DEPRECATED;SQLITE_OMIT_GET_TABLE;SQLITE_OMIT_INCRBLOB;SQLITE_OMIT_LOOKASIDE;SQLITE_OMIT_SHARED_CACHE;SQLITE_OMIT_UTF16;SQLITE_OMIT_WAL;SQLITE_OS_WIN;SQLITE_SYSTEM_MALLOC;VDBE_PROFILE_OFF;SQLITE_DEFAULT_FOREIGN_KEYS</DefineConstants>
<NoWarn>0168;0169;0414;0618;0649;0219;0162;0429</NoWarn>
</PropertyGroup>

<ItemGroup>
<Compile Include="src\alter_c.cs" />
<Compile Include="src\analyze_c.cs" />
<Compile Include="src\attach_c.cs" />
<Compile Include="src\auth_c.cs" />
<Compile Include="src\backup_c.cs" />
<Compile Include="src\bitvec_c.cs" />
<Compile Include="src\btmutex_c.cs" />
<Compile Include="src\BtreeInt_h.cs" />
<Compile Include="src\btree_c.cs" />
<Compile Include="src\Btree_h.cs" />
<Compile Include="src\build_c.cs" />
<Compile Include="src\callback_c.cs" />
<Compile Include="src\complete_c.cs" />
<Compile Include="src\crypto.cs" />
<Compile Include="src\ctime_c.cs" />
<Compile Include="src\date_c.cs" />
<Compile Include="src\Delegates.cs" />
<Compile Include="src\delete_c.cs" />
<Compile Include="src\expr_c.cs" />
<Compile Include="src\fault_c.cs" />
<Compile Include="src\fkey_c.cs" />
<Compile Include="src\func_c.cs" />
<Compile Include="src\global_c.cs" />
<Compile Include="src\hash_c.cs" />
<Compile Include="src\Hash_h.cs" />
<Compile Include="src\hwtime_c.cs" />
<Compile Include="src\insert_c.cs" />
<Compile Include="src\journal_c.cs" />
<Compile Include="src\keywordhash_h.cs" />
<Compile Include="src\legacy_c.cs" />
<Compile Include="src\loadext_c.cs" />
<Compile Include="src\main_c.cs" />
<Compile Include="src\malloc_c.cs" />
<Compile Include="src\memjournal_c.cs" />
<Compile Include="src\mem_Pool.cs" />
<Compile Include="src\mutex_c.cs" />
<Compile Include="src\mutex_h.cs" />
<Compile Include="src\mutex_noop_c.cs" />
<Compile Include="src\mutex_w32.cs" />
<Compile Include="src\notify_c.cs" />
<Compile Include="src\opcodes_c.cs" />
<Compile Include="src\opcodes_h.cs" />
<Compile Include="src\os_c.cs" />
<Compile Include="src\os_common_h.cs" />
<Compile Include="src\os_h.cs" />
<Compile Include="src\os_win_c.cs" />
<Compile Include="src\pager_c.cs" />
<Compile Include="src\pager_h.cs" />
<Compile Include="src\parse_c.cs" />
<Compile Include="src\parse_h.cs" />
<Compile Include="src\pcache1_c.cs" />
<Compile Include="src\pcache_c.cs" />
<Compile Include="src\pcache_h.cs" />
<Compile Include="src\pragma_c.cs" />
<Compile Include="src\prepare_c.cs" />
<Compile Include="src\printf_c.cs" />
<Compile Include="src\random_c.cs" />
<Compile Include="src\resolve_c.cs" />
<Compile Include="src\rowset_c.cs" />
<Compile Include="src\select_c.cs" />
<Compile Include="src\sqlite3_h.cs" />
<Compile Include="src\sqliteInt_h.cs" />
<Compile Include="src\sqliteLimit_h.cs" />
<Compile Include="src\status_c.cs" />
<Compile Include="src\table_c.cs" />
<Compile Include="src\tokenize_c.cs" />
<Compile Include="src\trigger_c.cs" />
<Compile Include="src\update_c.cs" />
<Compile Include="src\utf_c.cs" />
<Compile Include="src\util_c.cs" />
<Compile Include="src\vacuum_c.cs" />
<Compile Include="src\vdbeapi_c.cs" />
<Compile Include="src\vdbeaux_c.cs" />
<Compile Include="src\vdbeblob_c.cs" />
<Compile Include="src\VdbeInt_h.cs" />
<Compile Include="src\vdbemem_c.cs" />
<Compile Include="src\vdbetrace_c.cs" />
<Compile Include="src\vdbe_c.cs" />
<Compile Include="src\Vdbe_h.cs" />
<Compile Include="src\vtab_c.cs" />
<Compile Include="src\walker_c.cs" />
<Compile Include="src\wal_c.cs" />
<Compile Include="src\wal_h.cs" />
<Compile Include="src\where_c.cs" />
<Compile Include="src\_Custom.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Client\SQLiteClientFactory.cs" />
<Compile Include="Client\SQLiteCommand.cs" />
<Compile Include="Client\SQLiteCommandBuilder.cs" />
<Compile Include="Client\SQLiteConnection.cs" />
<Compile Include="Client\SQLiteConnectionStringBuilder.cs" />
<Compile Include="Client\SQLiteDataAdapter.cs" />
<Compile Include="Client\SQLiteDataReader.cs" />
<Compile Include="Client\SQLiteDataSourceEnumerator.cs" />
<Compile Include="Client\SQLiteError.cs" />
<Compile Include="Client\SQLiteExceptions.cs" />
<Compile Include="Client\SQLiteParameter.cs" />
<Compile Include="Client\SQLiteParameterCollection.cs" />
<Compile Include="Client\SQLiteRowUpdatedEventArgs.cs" />
<Compile Include="Client\SQLiteRowUpdatedEventHandler.cs" />
<Compile Include="Client\SQLiteRowUpdatingEventArgs.cs" />
<Compile Include="Client\SQLiteRowUpdatingEventHandler.cs" />
<Compile Include="Client\SQLiteTransaction.cs" />
<Compile Include="Client\SQLiteConvert.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

</Project>
11 changes: 9 additions & 2 deletions Tests/SQLiteClientTests/SQLiteClientTests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -11,6 +11,8 @@
<RootNamespace>SQLiteClientTests</RootNamespace>
<AssemblyName>SQLiteClientTests</AssemblyName>
<StartupObject>SQLiteClientTests.SQLiteClientTestDriver</StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -22,6 +24,7 @@
<WarningLevel>4</WarningLevel>
<NoWarn>0168;0169;0414;0618;0649</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
Expand All @@ -31,6 +34,7 @@
<WarningLevel>4</WarningLevel>
<NoWarn>0168;0169;0414;0618;0649</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -79,4 +83,7 @@
<Name>System.Data.SQLite</Name>
</ProjectReference>
</ItemGroup>
</Project>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
</Project>
17 changes: 6 additions & 11 deletions Tests/System.Data.SQLite.Tests/App.config
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
</entityFramework>
<system.data>
<DbProviderFactories>

<remove invariant="System.Data.SQLite"/>
<add name="SQLite Data Provider"
invariant="System.Data.SQLite"
description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteClientFactory, System.Data.SQLite, Version=3.7.7.1, Culture=neutral"/>
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteClientFactory, System.Data.SQLite, Version=3.7.7.1, Culture=neutral"/>
</DbProviderFactories>
</system.data>
<connectionStrings>
<add name="DataContext"
connectionString="Data Source=test.db"
providerName="System.Data.SQLite" />
<add name="DataContext" connectionString="Data Source=test.db" providerName="System.Data.SQLite"/>
</connectionStrings>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/></startup></configuration>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -9,6 +9,8 @@
<OutputType>Library</OutputType>
<RootNamespace>System.Data.SQLite.Tests</RootNamespace>
<AssemblyName>System.Data.SQLite.Tests</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand All @@ -19,6 +21,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand All @@ -28,6 +31,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -77,4 +81,4 @@
<Name>System.Data.SQLite</Name>
</ProjectReference>
</ItemGroup>
</Project>
</Project>
Loading