diff --git a/Directory.Build.props b/Directory.Build.props
index 6f9a64654..de2c0e4d5 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -3,6 +3,9 @@
https://github.com/xamarin/GooglePlayServicesComponents.git
git
+
+ <_DefaultTargetFrameworks>MonoAndroid12.0;net6.0-android
+
false
false
@@ -17,4 +20,17 @@
true
+
+
+
+ <_TargetFrameworkNugetBuildFolders Include="build\monoandroid12.0" />
+ <_TargetFrameworkNugetBuildFolders Include="build\net6.0-android31.0" />
+ <_TargetFrameworkNugetBuildFolders Include="buildTransitive\monoandroid12.0" />
+ <_TargetFrameworkNugetBuildFolders Include="buildTransitive\net6.0-android31.0" />
+
+
+
+ <_TargetFrameworkNugetAarFolders Include="aar\monoandroid12.0" />
+ <_TargetFrameworkNugetAarFolders Include="aar\net6.0-android31.0" />
+
diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props
index 35f092ffa..7d1d98441 100644
--- a/samples/Directory.Build.props
+++ b/samples/Directory.Build.props
@@ -1,5 +1,10 @@
+
+
+ <_DefaultDotNetSampleTargetFrameworks>net6.0-android
+
+
SdkOnly
diff --git a/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj b/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj
index eecc15d8c..0dd993c1b 100644
--- a/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj
+++ b/samples/dotnet/BuildAllDotNet/BuildAllDotNet.csproj
@@ -1,7 +1,7 @@
- net6.0-android
+ $(_DefaultDotNetSampleTargetFrameworks)
29
diff --git a/samples/dotnet/BuildAllGpsDotNet/BuildAllGpsDotNet.csproj b/samples/dotnet/BuildAllGpsDotNet/BuildAllGpsDotNet.csproj
index 80c93d6d8..403c430ba 100644
--- a/samples/dotnet/BuildAllGpsDotNet/BuildAllGpsDotNet.csproj
+++ b/samples/dotnet/BuildAllGpsDotNet/BuildAllGpsDotNet.csproj
@@ -1,7 +1,7 @@
- net6.0-android
+ $(_DefaultDotNetSampleTargetFrameworks)
29
diff --git a/samples/dotnet/BuildAllMLKitDotNet/BuildAllMLKitDotNet.csproj b/samples/dotnet/BuildAllMLKitDotNet/BuildAllMLKitDotNet.csproj
index 8c47395a8..188de91c4 100644
--- a/samples/dotnet/BuildAllMLKitDotNet/BuildAllMLKitDotNet.csproj
+++ b/samples/dotnet/BuildAllMLKitDotNet/BuildAllMLKitDotNet.csproj
@@ -1,7 +1,7 @@
- net6.0-android
+ $(_DefaultDotNetSampleTargetFrameworks)
29
diff --git a/samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj b/samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj
index 4b76b8f34..07b7abbbd 100644
--- a/samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj
+++ b/samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj
@@ -1,7 +1,7 @@
- net6.0-android
+ $(_DefaultDotNetSampleTargetFrameworks)
Exe
BuildAllMauiApp
true
@@ -46,23 +46,23 @@
@@ -79,7 +79,7 @@
[./samples/dotnet/BuildAllMauiApp.sln]
-->
diff --git a/samples/dotnet/BuildAllXamarinForms/BuildAllXamarinForms.XamarinAndroid/BuildAllXamarinForms.XamarinAndroid.csproj b/samples/dotnet/BuildAllXamarinForms/BuildAllXamarinForms.XamarinAndroid/BuildAllXamarinForms.XamarinAndroid.csproj
index 88923b2a0..ca8719930 100644
--- a/samples/dotnet/BuildAllXamarinForms/BuildAllXamarinForms.XamarinAndroid/BuildAllXamarinForms.XamarinAndroid.csproj
+++ b/samples/dotnet/BuildAllXamarinForms/BuildAllXamarinForms.XamarinAndroid/BuildAllXamarinForms.XamarinAndroid.csproj
@@ -1,6 +1,6 @@
- net6.0-android31
+ $(_DefaultDotNetSampleTargetFrameworks)
Exe
diff --git a/samples/dotnet/Directory.Packages.GPS-FB-MLKit.props b/samples/dotnet/Directory.Packages.GPS-FB-MLKit.props
index 211aac838..672a125a3 100644
--- a/samples/dotnet/Directory.Packages.GPS-FB-MLKit.props
+++ b/samples/dotnet/Directory.Packages.GPS-FB-MLKit.props
@@ -1,22 +1,22 @@
\ No newline at end of file
diff --git a/source/GooglePlayServicesProject.cshtml b/source/GooglePlayServicesProject.cshtml
index 41635ef02..a6c574403 100644
--- a/source/GooglePlayServicesProject.cshtml
+++ b/source/GooglePlayServicesProject.cshtml
@@ -4,12 +4,11 @@
@{
var targetFrameworkMoniker = "MonoAndroid12.0";
- var dotnetFrameworkMoniker = "net6.0-android31.0";
}
- @(targetFrameworkMoniker);@(dotnetFrameworkMoniker)
+ $(_DefaultTargetFrameworks)
true
@if (!string.IsNullOrEmpty(Model.AssemblyName)) {
@(Model.AssemblyName)
@@ -167,19 +166,13 @@
-
-
-
-
+
@if (@Model.NuGetPackageId == "Xamarin.GooglePlayServices.Basement")
{
-
-
-
-
+
}
@@ -217,8 +210,7 @@
@foreach (var art in @Model.MavenArtifacts) {
if (1==2 && art.MavenArtifactPackaging == "aar") {
-
-
+
}
}
diff --git a/templates/annotations/Project.cshtml b/templates/annotations/Project.cshtml
index 8d4f68f27..4535ed996 100644
--- a/templates/annotations/Project.cshtml
+++ b/templates/annotations/Project.cshtml
@@ -1,6 +1,6 @@
- MonoAndroid12.0;net6.0-android31
+ $(_DefaultTargetFrameworks)
true