question

80240195 avatar image
0 Votes"
80240195 asked JarvanZhang-MSFT edited

How do I package the Xamarin. Forms application to .aab file?

I use vs2022 chinese version to develop xamarin.forms program.
I package my program according to the method of this post.
https://docs.microsoft.com/en-us/answers/questions/478155/how-do-i-package-the-xamarin-forms-application-for.html
I have add <AndroidPackageFormat>aab</AndroidPackageFormat> to my project file.
I build my project, and click "打包" menu item to package my project.
But I don't find any .aab file.
How should I do?

My project file below:
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<AndroidPackageFormat>aab</AndroidPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FontAwesome5" Version="2.1.2" />
<PackageReference Include="LibVLCSharp" Version="3.6.0" />
<PackageReference Include="LibVLCSharp.Forms" Version="3.5.1" />
<PackageReference Include="MarcTron.Admob" Version="1.6.4" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="LiveStreamPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="MasterDetailPage1.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="MasterDetailPage1Detail.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="MasterDetailPage1Master.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JarvanZhang-MSFT avatar image
0 Votes"
JarvanZhang-MSFT answered JarvanZhang-MSFT edited

Hello,​

Welcome to our Microsoft Q&A platform!

I created a basic demo and release the project using VisualStudio Version 16.11.2, the project is generated as aab format correctly. The problem should be caused by the VS. VisualStudio 2022 is now only the preview version and it is under test. It's not suggested to use the preview version which may have potential issue to develop an application. Please use the stable version instead.

129023-image.png

You could report the issue to the VS product team via Visual Studio's "Report a Problem" menu and then follow them on the developer community site. Please see How to report a problem with Visual Studio - Visual Studio | Microsoft Docs

Best Regards,

Jarvan Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (12.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.