From e1bca05fe32f3023d645af702993321372bc88a0 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 18:26:40 +0000
Subject: [PATCH 1/3] Initial plan
From 1801e3b85d83ed34f1d415f1e02b6e809ae53981 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 18:33:01 +0000
Subject: [PATCH 2/3] Add fix to remove satellite assemblies from publish
folder and create test
Co-authored-by: dsplaisted <145043+dsplaisted@users.noreply.github.com>
---
.../Microsoft.NETCore.Native.Publish.targets | 1 +
.../SmokeTests/SatelliteAssemblies/Program.cs | 66 +++++++++++++++++++
.../SatelliteAssemblies.csproj | 13 ++++
.../SatelliteAssemblies/Strings.Designer.cs | 28 ++++++++
.../SatelliteAssemblies/Strings.es.resx | 64 ++++++++++++++++++
.../SatelliteAssemblies/Strings.resx | 64 ++++++++++++++++++
6 files changed, 236 insertions(+)
create mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs
create mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj
create mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs
create mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx
create mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
index 1ba44cff534e5a..32623bd2b1a4ee 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
@@ -30,6 +30,7 @@
+
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs
new file mode 100644
index 00000000000000..1bbeeb4c14b8f4
--- /dev/null
+++ b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Globalization;
+using System.IO;
+using System.Reflection;
+using System.Resources;
+
+class Program
+{
+ static int Main(string[] args)
+ {
+ // Test that we can access resources
+ ResourceManager rm = new ResourceManager("SatelliteAssemblies.Strings", Assembly.GetExecutingAssembly());
+
+ // Test English (default)
+ string englishGreeting = rm.GetString("Greeting", CultureInfo.InvariantCulture);
+ Console.WriteLine($"English: {englishGreeting}");
+ if (englishGreeting != "Hello, World!")
+ {
+ Console.WriteLine("ERROR: Expected 'Hello, World!' for English");
+ return 1;
+ }
+
+ // Test Spanish
+ string spanishGreeting = rm.GetString("Greeting", new CultureInfo("es"));
+ Console.WriteLine($"Spanish: {spanishGreeting}");
+ if (spanishGreeting != "¡Hola, Mundo!")
+ {
+ Console.WriteLine("ERROR: Expected '¡Hola, Mundo!' for Spanish");
+ return 1;
+ }
+
+ // Verify that satellite assemblies are NOT in the publish directory
+ // when this is published with PublishAot
+ string exePath = Environment.ProcessPath ?? Assembly.GetExecutingAssembly().Location;
+ string publishDir = Path.GetDirectoryName(exePath);
+
+ if (string.IsNullOrEmpty(publishDir))
+ {
+ Console.WriteLine("ERROR: Could not determine publish directory");
+ return 1;
+ }
+
+ // Check that the 'es' subdirectory does not exist in publish output
+ string esDir = Path.Combine(publishDir, "es");
+ if (Directory.Exists(esDir))
+ {
+ Console.WriteLine($"ERROR: Satellite assembly directory exists: {esDir}");
+ Console.WriteLine("Satellite assemblies should be embedded in the native binary, not copied to publish folder");
+
+ // List what's in there for diagnostic purposes
+ var files = Directory.GetFiles(esDir);
+ foreach (var file in files)
+ {
+ Console.WriteLine($" Found: {Path.GetFileName(file)}");
+ }
+
+ return 1;
+ }
+
+ Console.WriteLine("SUCCESS: Resources are accessible and no satellite assembly folders in publish directory");
+ return 100;
+ }
+}
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj
new file mode 100644
index 00000000000000..1e9813c67ba782
--- /dev/null
+++ b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj
@@ -0,0 +1,13 @@
+
+
+ Exe
+ 0
+
+
+
+
+
+
+
+
+
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs
new file mode 100644
index 00000000000000..1e9f93828191af
--- /dev/null
+++ b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs
@@ -0,0 +1,28 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace SatelliteAssemblies
+{
+ using System;
+ using System.Reflection;
+ using System.Resources;
+
+ internal class Strings
+ {
+ private static ResourceManager s_resourceManager;
+
+ internal static ResourceManager ResourceManager
+ {
+ get
+ {
+ if (s_resourceManager is null)
+ {
+ s_resourceManager = new ResourceManager("SatelliteAssemblies.Strings", typeof(Strings).Assembly);
+ }
+ return s_resourceManager;
+ }
+ }
+
+ internal static string Greeting => ResourceManager.GetString("Greeting");
+ }
+}
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx
new file mode 100644
index 00000000000000..ceaf58876f46d0
--- /dev/null
+++ b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ¡Hola, Mundo!
+
+
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx
new file mode 100644
index 00000000000000..1fc5175d35b2a4
--- /dev/null
+++ b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Hello, World!
+
+
From 3feb4a7602cac662431d9c01e6db319d272d4382 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 10 Feb 2026 04:00:46 +0000
Subject: [PATCH 3/3] Remove test from runtime repo per review feedback
Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
---
.../SmokeTests/SatelliteAssemblies/Program.cs | 66 -------------------
.../SatelliteAssemblies.csproj | 13 ----
.../SatelliteAssemblies/Strings.Designer.cs | 28 --------
.../SatelliteAssemblies/Strings.es.resx | 64 ------------------
.../SatelliteAssemblies/Strings.resx | 64 ------------------
5 files changed, 235 deletions(-)
delete mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs
delete mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj
delete mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs
delete mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx
delete mode 100644 src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs
deleted file mode 100644
index 1bbeeb4c14b8f4..00000000000000
--- a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Program.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Globalization;
-using System.IO;
-using System.Reflection;
-using System.Resources;
-
-class Program
-{
- static int Main(string[] args)
- {
- // Test that we can access resources
- ResourceManager rm = new ResourceManager("SatelliteAssemblies.Strings", Assembly.GetExecutingAssembly());
-
- // Test English (default)
- string englishGreeting = rm.GetString("Greeting", CultureInfo.InvariantCulture);
- Console.WriteLine($"English: {englishGreeting}");
- if (englishGreeting != "Hello, World!")
- {
- Console.WriteLine("ERROR: Expected 'Hello, World!' for English");
- return 1;
- }
-
- // Test Spanish
- string spanishGreeting = rm.GetString("Greeting", new CultureInfo("es"));
- Console.WriteLine($"Spanish: {spanishGreeting}");
- if (spanishGreeting != "¡Hola, Mundo!")
- {
- Console.WriteLine("ERROR: Expected '¡Hola, Mundo!' for Spanish");
- return 1;
- }
-
- // Verify that satellite assemblies are NOT in the publish directory
- // when this is published with PublishAot
- string exePath = Environment.ProcessPath ?? Assembly.GetExecutingAssembly().Location;
- string publishDir = Path.GetDirectoryName(exePath);
-
- if (string.IsNullOrEmpty(publishDir))
- {
- Console.WriteLine("ERROR: Could not determine publish directory");
- return 1;
- }
-
- // Check that the 'es' subdirectory does not exist in publish output
- string esDir = Path.Combine(publishDir, "es");
- if (Directory.Exists(esDir))
- {
- Console.WriteLine($"ERROR: Satellite assembly directory exists: {esDir}");
- Console.WriteLine("Satellite assemblies should be embedded in the native binary, not copied to publish folder");
-
- // List what's in there for diagnostic purposes
- var files = Directory.GetFiles(esDir);
- foreach (var file in files)
- {
- Console.WriteLine($" Found: {Path.GetFileName(file)}");
- }
-
- return 1;
- }
-
- Console.WriteLine("SUCCESS: Resources are accessible and no satellite assembly folders in publish directory");
- return 100;
- }
-}
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj
deleted file mode 100644
index 1e9813c67ba782..00000000000000
--- a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/SatelliteAssemblies.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- Exe
- 0
-
-
-
-
-
-
-
-
-
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs
deleted file mode 100644
index 1e9f93828191af..00000000000000
--- a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.Designer.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace SatelliteAssemblies
-{
- using System;
- using System.Reflection;
- using System.Resources;
-
- internal class Strings
- {
- private static ResourceManager s_resourceManager;
-
- internal static ResourceManager ResourceManager
- {
- get
- {
- if (s_resourceManager is null)
- {
- s_resourceManager = new ResourceManager("SatelliteAssemblies.Strings", typeof(Strings).Assembly);
- }
- return s_resourceManager;
- }
- }
-
- internal static string Greeting => ResourceManager.GetString("Greeting");
- }
-}
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx
deleted file mode 100644
index ceaf58876f46d0..00000000000000
--- a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.es.resx
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- ¡Hola, Mundo!
-
-
diff --git a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx b/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx
deleted file mode 100644
index 1fc5175d35b2a4..00000000000000
--- a/src/tests/nativeaot/SmokeTests/SatelliteAssemblies/Strings.resx
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Hello, World!
-
-