You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Xamarin.Android.Build.Tasks] Remove support for mkbundle (#7772)
Fixes: #7764
Context: d236af5
Context: dotnet/android-libraries#64 (comment)
.NET Android dropped support for `$(BundleAssemblies)`=True; see also
commit d236af5 and [a comment on dotnet/android-libraries#64][0]:
> After internal discussion, we are strongly considering removing
> support for `$(BundleAssemblies)` in .NET 5, as it increases
> on-device memory use and slows down app startup times.
However, this "dropping of support" was incomplete; setting it would
result in broken apps!
% dotnet new android -n android-ba
% cd android-ba
% dotnet build -p:BundleAssemblies=true
# run the app, or just look at the .apk contents
% unzip -l bin/Debug/net7.0-android/*-Signed.apk | grep assem
660 02-03-2023 14:13 assemblies/rc.bin
# Note: `assemblies/assemblies.blob` is not present, but is required!
Fix this by *removing* most usage of the `$(BundleAssemblies)` MSBuild
property as well as all the code affected by it.
- Stop running bundle test apps on CI
- Remove bundle unit tests
- Remove the `CodeGen-MkBundle` project from the tests solution
- Remove the `Xamarin.Android.MakeBundle-Tests` from the tests
solution
- Remove all native code (and configuration) related to mkbundle
- Warn about `$(BundleAssemblies)` usage in .NET projects.
A XA1035 warning will be emitted when `$(BundleAssemblies)`=True
in .NET Android apps.
Preserve a couple of related properties in the `<BuildApk/>` and
`<GeneratePackageManagerJava/>` tasks, because they are still
used by the debugger targets from `xamarin/monodroid`.
[0]: dotnet/android-libraries#64 (comment)
Copy file name to clipboardExpand all lines: Documentation/guides/messages/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,7 @@ or 'Help->Report a Problem' in Visual Studio for Mac.
134
134
+[XA1031](xa1031.md): The 'AndroidHttpClientHandlerType' has an invalid value.
135
135
+[XA1032](xa1032.md):Failed to resolve '{0}' from '{1}'. Please check your `AndroidHttpClientHandlerType` setting.
136
136
+[XA1033](xa1033.md): Could not resolve '{0}'. Please check your `AndroidHttpClientHandlerType` setting.
137
+
+[XA1035](xa1035.md): The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties.
The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties.
12
+
```
13
+
14
+
## Solution
15
+
16
+
Edit your csproj directly and remove the 'BundleAssemblies' property.
17
+
`AndroidUseAssemblyStore` and `AndroidEnableAssemblyCompression` are
18
+
both enabled by default and, together, they implement behavior
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -493,6 +493,10 @@ Please change the value to an assembly-qualifed type name which inherits from '{
493
493
<comment>The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true'
494
494
{0} - The name of the assembly</comment>
495
495
</data>
496
+
<dataname="XA1035"xml:space="preserve">
497
+
<value>The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties.</value>
498
+
<comment>The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression'</comment>
499
+
</data>
496
500
<dataname="XA2000"xml:space="preserve">
497
501
<value>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 and higher will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</value>
498
502
<comment>The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain
0 commit comments