Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void BasicApplicationRepetitiveBuild ([Values] AndroidRuntime runtime)
Assert.IsTrue (
b.Output.IsTargetSkipped ("_Sign"),
"the _Sign target should not run");
b.Output.AssertTargetIsSkipped ("_GenerateCompressedAssembliesNativeSourceFiles");
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssertTargetIsSkipped ("_GenerateCompressedAssembliesNativeSourceFiles") is unconditional, but _GenerateCompressedAssembliesNativeSourceFiles is conditioned out when runtime == AndroidRuntime.NativeAOT. If the NativeAOT build path doesn’t invoke the target (and therefore doesn’t emit a “skipped” message), this assertion will fail. Consider guarding the assertion to non-NativeAOT runtimes, or pass defaultIfNotUsed: true for the NativeAOT case.

Suggested change
b.Output.AssertTargetIsSkipped ("_GenerateCompressedAssembliesNativeSourceFiles");
if (runtime != AndroidRuntime.NativeAOT) {
b.Output.AssertTargetIsSkipped ("_GenerateCompressedAssembliesNativeSourceFiles");
}

Copilot uses AI. Check for mistakes.
var item = proj.AndroidResources.First (x => x.Include () == "Resources\\values\\Strings.xml");
item.TextContent = () => proj.StringsXml.Replace ("${PROJECT_NAME}", "Foo");
item.Timestamp = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,9 @@ because xbuild doesn't support framework reference assemblies.
</Target>

<Target Name="_GenerateCompressedAssembliesNativeSourceFiles"
Condition=" '$(_AndroidRuntime)' != 'NativeAOT' ">
Condition=" '$(_AndroidRuntime)' != 'NativeAOT' "
Inputs="@(_ResolvedUserAssemblies);@(_ResolvedFrameworkAssemblies);$(_AndroidBuildPropertiesCache)"
Outputs="@(_CompressedAssembliesAssemblySource)">
Comment thread
jonathanpeppers marked this conversation as resolved.
Comment thread
jonathanpeppers marked this conversation as resolved.
<GenerateCompressedAssembliesNativeSourceFiles
ResolvedAssemblies="@(_ResolvedUserAssemblies);@(_ResolvedFrameworkAssemblies)"
EnvironmentOutputDirectory="$(IntermediateOutputPath)android"
Expand All @@ -2006,6 +2008,7 @@ because xbuild doesn't support framework reference assemblies.
EnableCompression="$(AndroidEnableAssemblyCompression)"
ProjectFullPath="$(MSBuildProjectFullPath)"
/>
<Touch Files="@(_CompressedAssembliesAssemblySource)" />
<ItemGroup>
<FileWrites Include="@(_CompressedAssembliesAssemblySource)" />
</ItemGroup>
Expand Down