diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 61858933249..0c41e8535eb 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -106,6 +106,10 @@ Use these attributes to specify platform availability:
It's typically `make run-tests` in the directory with the test project.
+### Adding Test Cases
+
+When adding new test cases that require a runtime identifier, prefer `-arm64` over `-x64` unless there's a specific reason to use `-x64`.
+
## Apple Platform Integration
### Xcode Requirements
diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets
index 4c11d8f1ee0..466ba4ff848 100644
--- a/dotnet/targets/Xamarin.Shared.Sdk.targets
+++ b/dotnet/targets/Xamarin.Shared.Sdk.targets
@@ -2701,6 +2701,12 @@
+
+
+
+
diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs
index b09d8faf604..e060f42dce7 100644
--- a/tests/dotnet/UnitTests/ProjectTest.cs
+++ b/tests/dotnet/UnitTests/ProjectTest.cs
@@ -452,6 +452,26 @@ public void BuildFatMonoTouchTest (ApplePlatform platform, string runtimeIdentif
Assert.That (infoPlist.GetString ("CFBundleDisplayName").Value, Is.EqualTo ("MonoTouchTest"), "CFBundleDisplayName");
}
+ [Test]
+ [TestCase (ApplePlatform.iOS, "iossimulator-arm64")]
+ [TestCase (ApplePlatform.TVOS, "tvossimulator-arm64")]
+ [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64")]
+ [TestCase (ApplePlatform.MacOSX, "osx-arm64")]
+ public void PublishSingleFile_IsNotSupported (ApplePlatform platform, string runtimeIdentifiers)
+ {
+ var project = "MySimpleApp";
+ Configuration.IgnoreIfIgnoredPlatform (platform);
+
+ var project_path = GetProjectPath (project, platform: platform);
+ Clean (project_path);
+ var properties = GetDefaultProperties (runtimeIdentifiers);
+ properties ["PublishSingleFile"] = "true";
+ var rv = DotNet.AssertBuildFailure (project_path, properties);
+ var errors = BinLog.GetBuildLogErrors (rv.BinLogPath).ToArray ();
+ Assert.That (errors.Length, Is.GreaterThanOrEqualTo (1), "Error count");
+ Assert.That (errors.Select (e => e.Message), Has.Some.Contains ("does not support publishing to a single file"), "Error message");
+ }
+
[Test]
[TestCase (ApplePlatform.iOS, "ios-arm64;iossimulator-x64")]
[TestCase (ApplePlatform.iOS, "ios-arm64;iossimulator-arm64")]