Skip to content

Commit c7966a4

Browse files
authored
Merge pull request #1222 from Sergio0694/user/sergiopedri/aot-safe
Add trim/AOT annotations to make code trim/AOT-safe
2 parents 1aef905 + 340109c commit c7966a4

File tree

7 files changed

+968
-148
lines changed

7 files changed

+968
-148
lines changed

global.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.100"
3+
"version": "9.0.100",
4+
"rollForward": "latestFeature"
45
}
56
}

nuget/SQLite-net-base/SQLite-net-base.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
55
<AssemblyName>SQLite-net</AssemblyName>
66
<PackageId>sqlite-net-base</PackageId>
77
<AssemblyTitle>SQLite-net .NET Standard Base Library</AssemblyTitle>
@@ -10,15 +10,16 @@
1010
It is meant to give you all the power of SQLite-net but with the freedom to choose your own provider.
1111
Please use the package sqlite-net-pcl if you have no idea what any of this means.
1212
</Description>
13+
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
1314
</PropertyGroup>
1415

1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
1617
<DefineConstants>USE_SQLITEPCL_RAW;NO_SQLITEPCL_RAW_BATTERIES;RELEASE</DefineConstants>
17-
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
18+
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
1819
</PropertyGroup>
1920
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2021
<DefineConstants>USE_SQLITEPCL_RAW;NO_SQLITEPCL_RAW_BATTERIES;DEBUG</DefineConstants>
21-
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
22+
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
2223
</PropertyGroup>
2324

2425
<ItemGroup>

nuget/SQLite-net-sqlcipher/SQLite-net-sqlcipher.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
55
<AssemblyName>SQLite-net</AssemblyName>
66
<PackageId>sqlite-net-sqlcipher</PackageId>
77
<AssemblyTitle>SQLite-net SQLCipher .NET Standard Library</AssemblyTitle>
@@ -11,15 +11,16 @@
1111
This enables secure access to the database with password (key) access.
1212
</Description>
1313
<PackageTags>sqlite-net;sqlite;database;orm;encryption;sqlcipher</PackageTags>
14+
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
1415
</PropertyGroup>
1516

1617
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
1718
<DefineConstants>USE_SQLITEPCL_RAW;RELEASE</DefineConstants>
18-
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
19+
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
1920
</PropertyGroup>
2021
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2122
<DefineConstants>USE_SQLITEPCL_RAW;DEBUG</DefineConstants>
22-
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
23+
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
2324
</PropertyGroup>
2425

2526
<ItemGroup>

nuget/SQLite-net-static/SQLite-net-static.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
55
<AssemblyName>SQLite-net</AssemblyName>
66
<PackageId>sqlite-net-static</PackageId>
77
<AssemblyTitle>SQLite-net .NET Standard P/Invoke Library</AssemblyTitle>
@@ -10,15 +10,16 @@
1010
This version uses P/Invokes to the "sqlite3" native library provided by the operating system.
1111
This works on Xamarin.iOS, Xamarin.Mac, Wilderness Labs' Meadow, and any other platform that has a "sqlite3" library in the path.
1212
</Description>
13+
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
1314
</PropertyGroup>
1415

1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
1617
<DefineConstants>RELEASE</DefineConstants>
17-
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
18+
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
1819
</PropertyGroup>
1920
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2021
<DefineConstants>DEBUG</DefineConstants>
21-
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
22+
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
2223
</PropertyGroup>
2324

2425
<ItemGroup>

nuget/SQLite-net-std/SQLite-net-std.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
55
<AssemblyName>SQLite-net</AssemblyName>
66
<PackageId>sqlite-net-pcl</PackageId>
77
<AssemblyTitle>SQLite-net Official .NET Standard Library</AssemblyTitle>
88
<Description>
99
SQLite-net is an open source and light weight library providing easy SQLite database storage for .NET, Mono, and Xamarin applications.
1010
This version uses SQLitePCLRaw to provide platform independent versions of SQLite.
1111
</Description>
12+
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
1213
</PropertyGroup>
1314

1415
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
1516
<DefineConstants>USE_SQLITEPCL_RAW;RELEASE</DefineConstants>
16-
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
17+
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
1718
</PropertyGroup>
1819
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1920
<DefineConstants>USE_SQLITEPCL_RAW;DEBUG</DefineConstants>
20-
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
21+
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
2122
</PropertyGroup>
2223

2324
<ItemGroup>

0 commit comments

Comments
 (0)