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

钢 屈 371 Reputation points
2021-09-02T14:35:26.91+00:00

I use vs2022 chinese version to develop xamarin.forms program.
I package my program according to the method of this post.
https://learn.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>

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
0 comments No comments
{count} votes

Accepted answer
  1. JarvanZhang 23,951 Reputation points
    2021-09-03T06:58:56.117+00:00

    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 Learn

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful