diff --git a/Configuration.props b/Configuration.props index 9a0a0edb3d1..3c15d7e702a 100644 --- a/Configuration.props +++ b/Configuration.props @@ -48,7 +48,7 @@ True latest 33.0.1 - 32.0.476 + 32.0.485 Windows diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs index d22ce8a4c94..68cb7728107 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs @@ -947,7 +947,7 @@ public void XamarinLegacySdk ([Values ("net6.0-android32.0", "net7.0-android33.0 } } }; - proj.AddNuGetSourcesForOlderTargetFrameworks (); + proj.AddNuGetSourcesForOlderTargetFrameworks (dotnetTargetFramework); using var b = new Builder (); var legacyTargetFrameworkVersion = "13.0"; diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetStandard.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetStandard.cs index 2a061d81bc3..190b4119c95 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetStandard.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetStandard.cs @@ -38,14 +38,15 @@ public string TargetFramework { /// /// Projects targeting net6.0/net7.0 require ref/runtime packs on NuGet.org or dotnet6/dotnet7 /// - public void AddNuGetSourcesForOlderTargetFrameworks () + public void AddNuGetSourcesForOlderTargetFrameworks (string targetFramework = null) { - if (TargetFramework.IndexOf ("net6.0", StringComparison.OrdinalIgnoreCase) != -1) { + targetFramework ??= TargetFramework; + if (targetFramework.IndexOf ("net6.0", StringComparison.OrdinalIgnoreCase) != -1) { ExtraNuGetConfigSources = new List { "https://api.nuget.org/v3/index.json", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json", }; - } else if (TargetFramework.IndexOf ("net7.0", StringComparison.OrdinalIgnoreCase) != -1) { + } else if (targetFramework.IndexOf ("net7.0", StringComparison.OrdinalIgnoreCase) != -1) { ExtraNuGetConfigSources = new List { "https://api.nuget.org/v3/index.json", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json",