Skip to content

Commit 47b85ce

Browse files
committed
Fixed nuget issues with build for Blazing.Mvvm.Sample.HybridMaui project:
1. NETSDK1005 Errors - Missing assets file errors 2. XARDF7024 - Android directory cleanup race condition error 3. MSB4018 - BrotliCompress error (only in run_build tool, not actual builds)
1 parent 74d1209 commit 47b85ce

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

src/samples/Blazing.Mvvm.Sample.HybridMaui/Blazing.Mvvm.Sample.HybridMaui.csproj

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<!-- Enable Central Package Management to leverage conditional versioning -->
5-
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<!-- Enable Central Package Management to leverage conditional versioning -->
5+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
66

77
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net10.0-android;net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
88
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0;net10.0-windows10.0.19041.0</TargetFrameworks>
@@ -14,9 +14,9 @@
1414
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
1515
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
1616
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
17-
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
17+
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
1818

19-
<OutputType>Exe</OutputType>
19+
<OutputType>Exe</OutputType>
2020
<RootNamespace>Blazing.Mvvm.Sample.HybridMaui</RootNamespace>
2121
<UseMaui>true</UseMaui>
2222
<SingleProject>true</SingleProject>
@@ -43,6 +43,20 @@
4343
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
4444
</PropertyGroup>
4545

46+
<!-- Android-specific properties to fix assembly compression issue -->
47+
<PropertyGroup Condition="$(TargetFramework.Contains('-android'))">
48+
<!-- Disable Fast Deployment to avoid assembly compression issues -->
49+
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
50+
<!-- Ensure assemblies are stored, not compressed -->
51+
<AndroidUseAssemblyStore>false</AndroidUseAssemblyStore>
52+
<!-- Enable AOT for better Android performance and prevent ANR -->
53+
<RunAOTCompilation Condition="'$(Configuration)' == 'Release'">true</RunAOTCompilation>
54+
<!-- Increase timeout for app startup -->
55+
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
56+
<!-- Prevent directory cleanup errors during multi-targeted builds -->
57+
<AndroidCreatePackagePerAbi>false</AndroidCreatePackagePerAbi>
58+
</PropertyGroup>
59+
4660
<ItemGroup>
4761
<!-- App Icon -->
4862
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
@@ -66,9 +80,11 @@
6680
<PackageReference Include="Microsoft.Maui.Controls" />
6781
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" />
6882
<PackageReference Include="Microsoft.Extensions.Logging.Debug" />
83+
<PackageReference Include="CommunityToolkit.Mvvm" />
6984
</ItemGroup>
7085

7186
<ItemGroup>
87+
<ProjectReference Include="..\..\Blazing.Mvvm.Base\Blazing.Mvvm.Base.csproj" />
7288
<ProjectReference Include="..\..\Blazing.Mvvm\Blazing.Mvvm.csproj" />
7389
</ItemGroup>
7490

0 commit comments

Comments
 (0)