Skip to content

Commit 55faee0

Browse files
[One .NET] update user-facing messages from .NET 5 to .NET 6 (#5300)
Since 6f761ea gets us on a build of .NET 6, we can update all user- facing messaging to say .NET 6 instead of .NET 5. * Documentation around building `xamarin-android` * Error/warning messages I also updated a few things other things that should say .NET 6: * `NuGet.config` sources in MSBuild tests * `@(FrameworkListRootAttributes)` for our .NET 6 packages I did not update various code comments, as most of them say .NET 5+ and are not user-facing. Other changes in `OneDotNet.md`: * Started a new `Runtime behavior` section with a link to `string.IndexOf()` behavior. * Link to `net6-samples` as the source for .NET 6 example projects and installation instructions.
1 parent 731b965 commit 55faee0

File tree

25 files changed

+148
-172
lines changed

25 files changed

+148
-172
lines changed

Documentation/building/unix/instructions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ installer.
7979

8080
# Creating a local .NET 6 Workload
8181

82-
`make prepare` provisions a specific build of .NET 5/6 to
82+
`make prepare` provisions a specific build of .NET 6 to
8383
`~/android-toolchain/dotnet`.
8484

8585
Once `make all` or `make jenkins` have completed, you can build the .NET 6
@@ -100,7 +100,6 @@ To use the Android workload, you will need a `NuGet.config`:
100100
<configuration>
101101
<packageSources>
102102
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
103-
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
104103
<add key="local-xa" value="/full/path/to/bin/BuildDebug/nupkgs" />
105104
</packageSources>
106105
</configuration>

Documentation/building/windows/instructions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ So for example:
9090
# Creating a local .NET 6 Workload
9191

9292
`msbuild Xamarin.Android.sln /t:Prepare` provisions a specific build
93-
of .NET 5/6 to `%USERPROFILE%\android-toolchain\dotnet`.
93+
of .NET 6 to `%USERPROFILE%\android-toolchain\dotnet`.
9494

9595
Once `msbuild Xamarin.Android.sln /t:Build` is complete, you can build
9696
the .NET 6 packages with:
@@ -110,7 +110,6 @@ To use the Android workload, you will need a `NuGet.config`:
110110
<configuration>
111111
<packageSources>
112112
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
113-
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
114113
<add key="local-xa" value="C:\full\path\to\bin\BuildDebug\nupkgs" />
115114
</packageSources>
116115
</configuration>

Documentation/guides/OneDotNet.md

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ all default item inclusion behavior can be disabled by setting `$(EnableDefaultI
140140

141141
[autoimport]: https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/accepted/2020/workloads/workload-resolvers.md#workload-props-files
142142

143+
## Runtime behavior
144+
145+
There is some behavioral changes to the `String.IndexOf()` method in
146+
.NET 5 and higher on different platforms, see details [here][indexof].
147+
148+
[indexof]: https://docs.microsoft.com/dotnet/standard/globalization-localization/globalization-icu
149+
143150
## Linker (ILLink)
144151

145152
.NET 5 and higher has new [settings for the linker][linker]:
@@ -220,39 +227,10 @@ device or emulator via the `--project` switch:
220227

221228
### Preview testing
222229

223-
The following instructions can be used for early preview testing.
224-
225-
1) Install the [latest .NET 5 preview][0]. Preview 4 or later is required.
226-
227-
2) Create a `nuget.config` file that has a package source pointing to
228-
local packages or `xamarin-impl` feed, as well as the .NET 5 feed:
229-
230-
```xml
231-
<configuration>
232-
<packageSources>
233-
<add key="xamarin-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json" />
234-
<add key="dotnet5" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet5/nuget/v3/index.json" />
235-
</packageSources>
236-
</configuration>
237-
```
238-
239-
3) Open an existing Android project (ideally something minimal) and
240-
tweak it as shown below. The version should match the version of the
241-
packages you want to use:
242-
243-
```xml
244-
<Project Sdk="Microsoft.Android.Sdk/10.0.100">
245-
<PropertyGroup>
246-
<TargetFramework>net6.0-android</TargetFramework>
247-
<RuntimeIdentifier>android.21-arm64</RuntimeIdentifier>
248-
<OutputType>Exe</OutputType>
249-
</PropertyGroup>
250-
</Project>
251-
```
252-
253-
4) Build (and optionally run) the project:
230+
For the latest instructions on preview testing and sample projects,
231+
see the [net6-samples][net6-samples] repo.
254232

255-
dotnet build *.csproj -t:Run
233+
[net6-samples]: https://github.com/xamarin/net6-samples
256234

257235
## Package Versioning Scheme
258236

Documentation/guides/messages/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ms.date: 01/24/2020
4747
+ [XA0033](xa0033.md): Failed to get the Java SDK version because the returned value does not appear to contain a valid version number.
4848
+ [XA0034](xa0034.md): Failed to get the Java SDK version.
4949
+ [XA0035](xa0035.md): Failed to determine the Android ABI for the project.
50-
+ [XA0036](xa0036.md): $(AndroidSupportedAbis) is not supported in .NET 5 and higher.
50+
+ [XA0036](xa0036.md): $(AndroidSupportedAbis) is not supported in .NET 6 and higher.
5151
+ XA0100: EmbeddedNativeLibrary is invalid in Android Application projects. Please use AndroidNativeLibrary instead.
5252
+ [XA0101](xa0101.md): warning XA0101: @(Content) build action is not supported.
5353
+ [XA0102](xa0102.md): Generic `lint` Warning.
@@ -105,13 +105,13 @@ Please disable fast deployment in the Visual Studio project property pages or ed
105105
+ XA1021: Specified source Java library not found: {file}
106106
+ XA1022: Specified reference Java library not found: {file}
107107
+ [XA1023](xa1023.md): Using the DX DEX Compiler is deprecated.
108-
+ [XA1024](xa1024.md): Ignoring configuration file 'Foo.dll.config'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 5 or higher.
108+
+ [XA1024](xa1024.md): Ignoring configuration file 'Foo.dll.config'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.
109109
+ [XA1027](xa1027.md): The 'EnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'.
110110
+ [XA1028](xa1028.md): The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'.
111111

112112
## XA2xxx: Linker
113113

114-
+ [XA2000](xa2000.md): Use of AppDomain.CreateDomain() detected in assembly: {assembly}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.
114+
+ [XA2000](xa2000.md): Use of AppDomain.CreateDomain() detected in assembly: {assembly}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.
115115
+ [XA2001](xa2001.md): Source file '{filename}' could not be found.
116116
+ [XA2002](xa2002.md): Can not resolve reference: \`{missing}\`, referenced by {assembly}. Perhaps it doesn't exist in the Mono for Android profile?
117117
+ XA2006: Could not resolve reference to '{member}' (defined in assembly '{assembly}') with scope '{scope}'. When the scope is different from the defining assembly, it usually means that the type is forwarded.

Documentation/guides/messages/xa0036.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.date: 06/17/2020
88
## Issue
99

1010
The `$(AndroidSupportedAbis)` MSBuild property is no longer supported
11-
in .NET 5 and higher.
11+
in .NET 6 and higher.
1212

1313
## Solution
1414

Documentation/guides/messages/xa1023.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ warning XA1023: Using the DX DEX Compiler is deprecated. Please set the DEX comp
1212
```
1313

1414
```
15-
error XA1023: Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 5 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.
15+
error XA1023: Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 6 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.
1616
```
1717

1818
## Issue
@@ -21,7 +21,7 @@ Google has deprecated the DX DEX Compiler in favor of the [D8 DEX
2121
Compiler][d8]. On [February 1, 2021][dx], DX will no longer be a part
2222
of Android SDK or Android Studio.
2323

24-
The DX DEX Compiler will not supported in .NET 5 or higher.
24+
The DX DEX Compiler will not supported in .NET 6 or higher.
2525

2626
[d8]: https://developer.android.com/studio/command-line/d8
2727
[dx]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html

Documentation/guides/messages/xa1024.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ ms.date: 07/08/2020
88
## Example messages
99

1010
```
11-
warning XA1024: Ignoring configuration file 'Foo.dll.config'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 5 or higher.
11+
warning XA1024: Ignoring configuration file 'Foo.dll.config'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.
1212
```
1313

1414
## Issue
1515

1616
No support for [configuration files][config] such as `Foo.dll.config`
1717
or `Foo.exe.config` is available in Xamarin.Android projects targeting
18-
.NET 5 or higher. [`<dllmap>`][dllmap] configuration elements are not
19-
supported in .NET 5 at all, and other element types for compatibility
18+
.NET 6 or higher. [`<dllmap>`][dllmap] configuration elements are not
19+
supported in .NET 6 at all, and other element types for compatibility
2020
packages like [System.Configuration.ConfigurationManager][nuget] have
2121
never been supported in Xamarin.Android projects.
2222

Documentation/guides/messages/xa1026.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ warning XA1026: Using AAPT is deprecated in favor of AAPT2. Please enable 'Use i
1212
```
1313

1414
```
15-
error XA1026: Using AAPT is not supported in Xamarin.Android projects that target .NET 5 or higher. Please enable 'Use incremental Android packaging system (aapt2)' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidUseAapt2' MSBuild property to 'true'.
15+
error XA1026: Using AAPT is not supported in Xamarin.Android projects that target .NET 6 or higher. Please enable 'Use incremental Android packaging system (aapt2)' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidUseAapt2' MSBuild property to 'true'.
1616
```
1717

1818
## Issue

Documentation/guides/messages/xa2000.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.date: 1/13/2019
88
## Example messages
99

1010
```
11-
Use of AppDomain.CreateDomain() detected in assembly: {assembly}. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.
11+
Use of AppDomain.CreateDomain() detected in assembly: {assembly}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.
1212
```
1313

1414
## Solution

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
<Target Name="_GenerateFrameworkListFile" >
3838
<!-- Hardcode framework attributes -->
3939
<ItemGroup>
40-
<FrameworkListRootAttributes Include="Name" Value=".NET 5.0 - Android" />
40+
<FrameworkListRootAttributes Include="Name" Value=".NET 6.0 - Android" />
4141
<FrameworkListRootAttributes Include="TargetFrameworkIdentifier" Value=".NETCoreApp" />
42-
<FrameworkListRootAttributes Include="TargetFrameworkVersion" Value="5.0" />
42+
<FrameworkListRootAttributes Include="TargetFrameworkVersion" Value="6.0" />
4343
<FrameworkListRootAttributes Include="FrameworkName" Value="Microsoft.Android" />
4444
</ItemGroup>
4545

0 commit comments

Comments
 (0)