Skip to content

Commit

Permalink
progress on net6 xamarin support #467 -- use Xamarin.Legacy.Sdk, supe…
Browse files Browse the repository at this point in the history
…r-helpful package suggested by @jpobst.  change commands in build script to use dotnet build now instead of old desktop msbuild.  as indicated in xamarin/Xamarin.Legacy.Sdk#34 , tvos is not supported, so for now, this commit changes tvos build to net6 without including support for legacy.  none of this is tested yet.
  • Loading branch information
ericsink committed Jan 28, 2022
1 parent a0b19fa commit b6951fb
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Copyright>Copyright 2014-2021 SourceGear, LLC</Copyright>
<Company>SourceGear</Company>
<Authors>Eric Sink</Authors>
<Version>2.0.8-pre20220128122014</Version>
<Version>2.0.8-pre20220128123315</Version>
<AssemblyVersion>2.0.8.1488</AssemblyVersion>
<FileVersion>2.0.8.1488</FileVersion>
<Description>SQLitePCLRaw is a Portable Class Library (PCL) for low-level (raw) access to SQLite</Description>
Expand Down
10 changes: 6 additions & 4 deletions build/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ let main argv =
for s in msbuild_dirs do
let dir_name = sprintf "SQLitePCLRaw.%s" s
let dir = (Path.Combine(top, "src", dir_name))
exec "dotnet" "restore" dir
exec "msbuild" "/p:Configuration=Release" dir
//exec "dotnet" "restore" dir
//exec "msbuild" "/p:Configuration=Release" dir
exec "dotnet" "build -c Release" dir

let msbuild_pack_dirs = [
"lib.e_sqlite3.android"
Expand All @@ -136,8 +137,9 @@ let main argv =
for s in msbuild_pack_dirs do
let dir_name = sprintf "SQLitePCLRaw.%s" s
let dir = (Path.Combine(top, "src", dir_name))
exec "dotnet" "restore" dir
exec "msbuild" "/p:Configuration=Release /t:pack" dir
//exec "dotnet" "restore" dir
//exec "msbuild" "/p:Configuration=Release /t:pack" dir
exec "dotnet" "pack -c Release" dir

let get_build_prop p =
let path_xml = Path.Combine(top, "Directory.Build.props")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.ios10</TargetFrameworks>
<TargetFrameworks>net6-ios;xamarin.ios10</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyName>SQLitePCLRaw.batteries_v2</AssemblyName>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.batteries_v2.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.ios10</TargetFrameworks>
<TargetFrameworks>net6-ios;xamarin.ios10</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyName>SQLitePCLRaw.batteries_v2</AssemblyName>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.batteries_v2.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.tvos10</TargetFrameworks>
<TargetFrameworks>net6-tvos</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyName>SQLitePCLRaw.batteries_v2</AssemblyName>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.batteries_v2.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.ios10</TargetFrameworks>
<TargetFrameworks>net6-ios;xamarin.ios10</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyName>SQLitePCLRaw.batteries_v2</AssemblyName>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.batteries_v2.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>MonoAndroid80</TargetFrameworks>
<TargetFrameworks>net6-android;MonoAndroid80</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.lib.e_sqlcipher.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.ios10</TargetFrameworks>
<TargetFrameworks>net6-ios;xamarin.ios10</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.lib.e_sqlcipher.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>MonoAndroid80</TargetFrameworks>
<TargetFrameworks>net6-android;MonoAndroid80</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.lib.e_sqlite3.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.ios10</TargetFrameworks>
<TargetFrameworks>net6-ios;xamarin.ios10</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.lib.e_sqlite3.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.tvos10</TargetFrameworks>
<TargetFrameworks>net6-tvos</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\sn\SQLitePCLRaw.lib.e_sqlite3.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.ios10</TargetFrameworks>
<TargetFrameworks>net6-ios;xamarin.ios10</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<SignAssembly>true</SignAssembly>
<AssemblyName>SQLitePCLRaw.lib.sqlcipher</AssemblyName>
Expand Down
3 changes: 2 additions & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"msbuild-sdks":
{
"MSBuild.Sdk.Extras": "2.0.54"
"MSBuild.Sdk.Extras": "2.0.54",
"Xamarin.Legacy.Sdk": "0.1.2-alpha6"
}
}

0 comments on commit b6951fb

Please sign in to comment.