Skip to content

Commit fefc151

Browse files
authored
[One .NET] Target net6.0 instead of netcoreapp3.1 (#5891)
Projects which were multitargetd to support .NET 6 have been updated to target `net6.0` instead of `netcoreapp3.1`. CI has been updated to install .NET 6 preview 3 instead of .NET 5. * Bump to xamarin/xamarin-android-tools/main@683f375 Changes: dotnet/android-tools@c5732a0...683f375
1 parent 0e74266 commit fefc151

File tree

20 files changed

+35
-44
lines changed

20 files changed

+35
-44
lines changed

build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public sealed class CheckApiCompatibility : Task
3333

3434
static readonly string assemblyToValidate = "Mono.Android.dll";
3535

36-
static readonly string netCoreAppVersion = "netcoreapp3.1";
36+
static readonly string netCoreAppVersion = "net6.0";
3737
static string compatApiCommand = null;
3838

3939
// Path where Microsoft.DotNet.ApiCompat nuget package is located

build-tools/automation/azure-pipelines-nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ variables:
4040
InstallerArtifactName: installers-unsigned
4141
TestAssembliesArtifactName: test-assemblies
4242
DotNetCoreVersion: 3.1.405
43-
DotNet5Version: 5.0.201
43+
DotNet6Version: 6.0.100-preview.3.21202.5
4444
HostedMacImage: macOS-10.15
4545
GitHub.Token: $(github--pat--vs-mobiletools-engineering-service2)
4646
NUnit.NumberOfTestWorkers: 4

build-tools/automation/azure-pipelines-oss.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ variables:
2727
EXTRA_MSBUILD_ARGS: /p:AutoProvision=True /p:AutoProvisionUsesSudo=True /p:IgnoreMaxMonoVersion=False
2828
PREPARE_FLAGS: PREPARE_CI=1 PREPARE_CI_PR=1
2929
DotNetCoreVersion: 3.1.405
30-
DotNet5Version: 5.0.201
30+
DotNet6Version: 6.0.100-preview.3.21202.5
3131
GitHub.Token: $(github--pat--vs-mobiletools-engineering-service2)
3232

3333
stages:
@@ -54,7 +54,6 @@ stages:
5454

5555
- template: yaml-templates/use-dot-net.yaml
5656
parameters:
57-
version: $(DotNet5Version)
5857
remove_dotnet: true
5958

6059
- template: yaml-templates/use-dot-net.yaml
@@ -174,9 +173,6 @@ stages:
174173
submodules: recursive
175174

176175
- template: yaml-templates/use-dot-net.yaml
177-
parameters:
178-
version: $(DotNet5Version)
179-
remove_dotnet: true
180176

181177
- template: yaml-templates/use-dot-net.yaml
182178
parameters:

build-tools/automation/azure-pipelines.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ variables:
5454
TestAssembliesArtifactName: test-assemblies
5555
NUnitConsoleVersion: 3.11.1
5656
DotNetCoreVersion: 3.1.405
57-
DotNet5Version: 5.0.201
57+
DotNet6Version: 6.0.100-preview.3.21202.5
5858
HostedMacImage: macOS-10.15
5959
HostedWinVS2019: Hosted Windows 2019 with VS2019
6060
VSEngWinVS2019: Xamarin-Android-Win2019
@@ -193,8 +193,6 @@ stages:
193193
displayName: set JI_JAVA_HOME
194194
195195
- template: yaml-templates\use-dot-net.yaml
196-
parameters:
197-
version: $(DotNet5Version)
198196

199197
- template: yaml-templates\use-dot-net.yaml
200198
parameters:
@@ -317,8 +315,6 @@ stages:
317315
displayName: set JI_JAVA_HOME
318316
319317
- template: yaml-templates\use-dot-net.yaml
320-
parameters:
321-
version: $(DotNet5Version)
322318

323319
- template: yaml-templates\use-dot-net.yaml
324320
parameters:
@@ -445,8 +441,6 @@ stages:
445441
displayName: delete external xamarin-android submodule
446442

447443
- template: yaml-templates/use-dot-net.yaml
448-
parameters:
449-
version: $(DotNet5Version)
450444

451445
- template: yaml-templates/use-dot-net.yaml
452446
parameters:
@@ -1316,6 +1310,10 @@ stages:
13161310
- checkout: release_scripts
13171311
clean: true
13181312

1313+
- template: yaml-templates/use-dot-net.yaml
1314+
parameters:
1315+
remove_dotnet: true
1316+
13191317
- template: yaml-templates/use-dot-net.yaml
13201318
parameters:
13211319
version: $(DotNetCoreVersion)
@@ -1415,6 +1413,8 @@ stages:
14151413
- checkout: self
14161414
submodules: recursive
14171415

1416+
- template: yaml-templates/use-dot-net.yaml
1417+
14181418
- task: DownloadPipelineArtifact@2
14191419
inputs:
14201420
${{ if eq(variables['MicroBuildSignType'], 'Real') }}:

build-tools/automation/yaml-templates/commercial-build.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ steps:
88

99
- template: use-dot-net.yaml
1010
parameters:
11-
version: $(DotNet5Version)
1211
remove_dotnet: true
1312

1413
- template: use-dot-net.yaml

build-tools/automation/yaml-templates/setup-test-environment.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ steps:
2929
condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT'))
3030

3131
- template: use-dot-net.yaml
32-
parameters:
33-
version: $(DotNet5Version)
34-
remove_dotnet: true
35-
36-
- template: use-dot-net.yaml
37-
parameters:
38-
version: $(DotNetCoreVersion)
3932

4033
- task: MSBuild@1
4134
displayName: build xaprepare

build-tools/automation/yaml-templates/use-dot-net.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# We prefer this over the UseDotNet task so that we can always clean up old/unstable versions on disk.
33

44
parameters:
5-
version: $(DotNetCoreVersion)
5+
version: $(DotNet6Version)
66
remove_dotnet: false
77

88
steps:

build-tools/create-packs/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<UsingTask TaskName="GenerateBuildManifest" AssemblyFile="$(_MicrosoftDotNetBuildTasksFeedTaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll" />
1515

1616
<PropertyGroup>
17-
<_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\netcoreapp3.1\</_MonoAndroidNETOutputDir>
17+
<_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\net6.0\</_MonoAndroidNETOutputDir>
1818
<_WorkloadResolverFlagFile>$(DotNetPreviewPath)sdk\$(MicrosoftDotnetSdkInternalPackageVersion)\EnableWorkloadResolver.sentinel</_WorkloadResolverFlagFile>
1919
</PropertyGroup>
2020

build-tools/create-packs/Microsoft.Android.Sdk.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ core workload sdk packs imported by Microsoft.NET.Workload.Android.
2626
DependsOnTargets="ConstructInstallerItems;_GenerateBundledVersions;_GetLicense">
2727
<PropertyGroup>
2828
<ToolsSourceDir>$(XamarinAndroidSourcePath)bin\Build$(Configuration)\packs\tools\</ToolsSourceDir>
29-
<NetCoreAppToolsSourceDir>$(XamarinAndroidSourcePath)bin\$(Configuration)-netcoreapp3.1\</NetCoreAppToolsSourceDir>
29+
<NetCoreAppToolsSourceDir>$(XamarinAndroidSourcePath)bin\$(Configuration)-net6.0\</NetCoreAppToolsSourceDir>
3030
</PropertyGroup>
3131

3232
<ItemGroup>

build-tools/scripts/Configuration.Java.Interop.Override.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<CecilSourceDirectory>$(MSBuildThisFileDirectory)..\..\external\mono\external\cecil</CecilSourceDirectory>
55
<UtilityOutputFullPath>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\</UtilityOutputFullPath>
6-
<UtilityOutputFullPathCoreApps>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-netcoreapp3.1\</UtilityOutputFullPathCoreApps>
6+
<UtilityOutputFullPathCoreApps>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-net6.0\</UtilityOutputFullPathCoreApps>
77
<XamarinAndroidToolsDirectory>$(MSBuildThisFileDirectory)..\..\external\xamarin-android-tools</XamarinAndroidToolsDirectory>
88
</PropertyGroup>
99
</Project>

0 commit comments

Comments
 (0)