From acbc0d3b638467d5bd9c08591de1df80b9fec3e6 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 10 Jul 2025 17:28:29 +0000
Subject: [PATCH 1/3] Initial plan
From 5e22d7259fd95ee3d63bb078ca78050769cdcb60 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 10 Jul 2025 17:45:26 +0000
Subject: [PATCH 2/3] Add warning for apphost collision with culture
directories
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
---
src/Tasks/Common/Resources/Strings.resx | 4 +++
src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 ++++
.../Common/Resources/xlf/Strings.pt-BR.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 ++++
src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 ++++
.../Common/Resources/xlf/Strings.zh-Hans.xlf | 5 ++++
.../Common/Resources/xlf/Strings.zh-Hant.xlf | 5 ++++
.../targets/Microsoft.NET.Sdk.targets | 28 +++++++++++++++++++
15 files changed, 97 insertions(+)
diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx
index 46d7589727a5..22b02f973eaa 100644
--- a/src/Tasks/Common/Resources/Strings.resx
+++ b/src/Tasks/Common/Resources/Strings.resx
@@ -995,4 +995,8 @@ You may need to build the project on another operating system or architecture, o
NETSDK1228: This project depends on the Aspire Workload which has been deprecated. Aspire now ships via NuGet packages and no longer requires a workload. Please visit {0} for upgrade guidance.{StrBegins="NETSDK1228: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+
diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
index e5db44587134..8c12b36533ec 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
@@ -62,6 +62,11 @@
NETSDK1177: Nepovedlo se podepsat hostitele aplikace s kódem chyby {1}: {0}.{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: Vlastnosti ArtifactsPath a UseArtifactsOutput nelze nastavit v souboru projektu z důvodu omezení řazení nástroje MSBuild. Musí být nastaveny v souboru Directory.Build.props nebo z příkazového řádku. Další informace najdete v https://aka.ms/netsdk1199.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
index c246782b9f1c..bc58aeb6baf1 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
@@ -62,6 +62,11 @@
NETSDK1177: Fehler beim Signieren von apphost mit Fehlercode {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: Die ArtifactsPath- und UseArtifactsOutput-Eigenschaften können aufgrund von MSBuild-Sortiereinschränkungen nicht in einer Projektdatei festgelegt werden. Sie müssen in einer Directory.Build.props-Datei oder über die Befehlszeile festgelegt werden. Weitere Informationen finden Sie unter https://aka.ms/netsdk1199.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
index 0bf7f4613d62..5cd7f427b9f0 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
@@ -62,6 +62,11 @@
NETSDK1177: No se pudo firmar apphost con el código de error {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: Las propiedades ArtifactsPath y UseArtifactsOutput no se pueden establecer en un archivo de proyecto debido a restricciones de ordenación de MSBuild. Deben establecerse en un archivo Directory.Build.props o desde la línea de comandos. Consulte https://aka.ms/netsdk1199 para obtener más información.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
index d3f640ff0d76..cc37bceb7afd 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
@@ -62,6 +62,11 @@
NETSDK1177: échec de la signature de apphost avec le code d’erreur {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: les propriétés ArtifactsPath et UseArtifactsOutput ne peuvent pas être définies dans un fichier projet, en raison des contraintes d'ordre MSBuild. Ils doivent être définis dans un fichier Directory.Build.props ou à partir de la ligne de commande. Voir https://aka.ms/netsdk1199 pour plus d'informations.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
index 6ac472c5fc66..ad1d3ee3b805 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
@@ -62,6 +62,11 @@
NETSDK1177: impossibile firmare apphost con codice di errore {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: non è possibile impostare le proprietà ArtifactsPath e UseArtifactsOutput in un file di progetto a causa di vincoli di ordinamento di MSBuild. Devono essere impostati in un file Directory.Build.props o dalla riga di comando. Per altre informazioni, vedere https://aka.ms/netsdk1199.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
index bb47aae43458..4d435737f8f9 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
@@ -62,6 +62,11 @@
NETSDK1177: エラー コード {1} が発生して AppHost に署名できませんでした: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: MSBuild の順序付けの制約により、プロジェクト ファイル内で ArtifactsPath プロパティと UseArtifactsOutput プロパティを設定できません。Directory.Build.props ファイル内で設定するか、コマンド ラインから設定する必要があります。詳細については、https://aka.ms/netsdk1199 を参照してください。
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
index b73e728c7177..771cca8d1bdd 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
@@ -62,6 +62,11 @@
NETSDK1177: apphost에 서명하지 못했습니다(오류 코드 {1}: {0}){StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: MSBuild 순서 제약 조건으로 인해 ArtifactsPath 및 UseArtifactsOutput 속성을 프로젝트 파일에 설정할 수 없습니다. Directory.Build.props 파일 또는 명령줄에서 설정해야 합니다. 자세한 내용은 https://aka.ms/netsdk1199를 참조하세요.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
index 2ab598421867..aa4b31dc8aa1 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
@@ -62,6 +62,11 @@
NETSDK1177: Nie można podpisać hosta aplikacji z kodem błędu {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: Nie można ustawić właściwości ArtifactsPath i UseArtifactsOutput w pliku projektu z powodu ograniczeń porządkowania programu MSBuild. Należy je ustawić w pliku Directory.Build.props lub w wierszu polecenia. Aby uzyskać więcej informacji, zobacz https://aka.ms/netsdk1199.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
index 1932439c9340..5198ed2cc034 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
@@ -62,6 +62,11 @@
NETSDK1177: falha ao assinar appHost com o código de erro {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: As propriedades ArtifactsPath e UseArtifactsOutput não podem ser definidas em um arquivo de projeto devido às restrições de ordenação do MSBuild. Eles devem ser configurados em um arquivo Directory.Build.props ou na linha de comandos. Veja https://aka.ms/netsdk1199 para obter mais informações.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
index f8a1ae31c21f..60b8654ccd3a 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
@@ -62,6 +62,11 @@
NETSDK1177: не удалось подписать APPHOST с кодом ошибки {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: свойства ArtifactsPath и UseArtifactsOutput не могут быть настроены в файле проекта из-за ограничений порядка MSBuild. Они должны быть настроены в файле Directory.Build.props или из командной строки. Дополнительные сведения см. на странице https://aka.ms/netsdk1199.
diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
index 9e0915877476..bacd0235f1e0 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
@@ -62,6 +62,11 @@
NETSDK1177: apphost şu hata koduyla imzalanamadı: {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: ArtifactsPath ve UseArtifactsOutput özellikleri, MSBuild sıralama kısıtlamaları nedeniyle bir proje dosyasında ayarlanamaz. Bir Directory.Build.props dosyasında veya komut satırından ayarlanmalıdır. Daha fazla için bkz. https://aka.ms/netsdk1199
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
index 1b093b67114d..f10447bdec32 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
@@ -62,6 +62,11 @@
NETSDK1177: 无法对 Apphost 进行签名,错误代码为 {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: 由于 MSBuild 排序约束,无法在项目文件中设置 ArtifactsPath 和 UseArtifactsOutput 属性。必须在 Directory.Build.props 文件中或通过命令行设置它们。有关详细信息,请参阅 https://aka.ms/netsdk1199。
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
index a22286f247f4..e2059b6e7da4 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
@@ -62,6 +62,11 @@
NETSDK1177: 無法簽署 AppHost,錯誤碼 {1}: {0}{StrBegins="NETSDK1177: "}
+
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ NETSDK1229: The executable file name '{0}' may conflict with resource directories for culture '{1}'. Consider renaming the application or restricting the SatelliteResourceLanguages property to avoid this conflict.
+ {StrBegins="NETSDK1229: "}
+ NETSDK1199: The ArtifactsPath and UseArtifactsOutput properties cannot be set in a project file, due to MSBuild ordering constraints. They must be set in a Directory.Build.props file or from the command line. See https://aka.ms/netsdk1199 for more information.NETSDK1199: 由於 MSBuild 順序條件約束,無法在專案檔案中設定 ArtifactsPath 和 UseArtifactsOutput 屬性。它們必須在 Directory.Build.props 檔案中或從命令列設定。如需詳細資訊,請參閱 https://aka.ms/netsdk1199。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
index 1718ac334d84..8fd701d960f0 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
@@ -1056,6 +1056,34 @@ Copyright (c) .NET Foundation. All rights reserved.
+
+
+
+
+ <_ApphostFileName>$(AssemblyName)$(_NativeExecutableExtension)
+
+
+
+
+ <_CollidingCultures Include="@(ResourceCopyLocalItems->Metadata('Culture')->Distinct())"
+ Condition="'%(Identity)' == '$(_ApphostFileName)'" />
+
+
+
+
+
+
+
+
<_CollidingCultures Include="@(ResourceCopyLocalItems->Metadata('Culture')->Distinct())"
Condition="'%(Identity)' == '$(_ApphostFileName)'" />
diff --git a/test/Microsoft.NET.Build.Tests/AppHostTests.cs b/test/Microsoft.NET.Build.Tests/AppHostTests.cs
index 86b8425d15e9..7c968e67eec1 100644
--- a/test/Microsoft.NET.Build.Tests/AppHostTests.cs
+++ b/test/Microsoft.NET.Build.Tests/AppHostTests.cs
@@ -544,5 +544,42 @@ void ReadUInts(Stream stream, Span buffer, out uint val1, out uint val2)
}
}
+ [RequiresMSBuildVersionFact("17.1.0.60101")]
+ public void It_warns_when_apphost_name_collides_with_culture_directory()
+ {
+ var testAsset = _testAssetsManager
+ .CopyTestAsset("HelloWorld")
+ .WithSource()
+ .WithTargetFramework(ToolsetInfo.CurrentTargetFramework)
+ .WithProjectChanges((path, project) =>
+ {
+ var ns = project.Root.Name.Namespace;
+
+ // Set assembly name to "cs" to trigger collision
+ project.Root.Add(
+ new XElement(ns + "PropertyGroup",
+ new XElement(ns + "AssemblyName", "cs"),
+ new XElement(ns + "UseAppHost", "true")));
+
+ // Add a target that injects ResourceCopyLocalItems with matching culture
+ project.Root.Add(
+ new XElement(ns + "Target",
+ new XAttribute("Name", "InjectResourceCopyLocalItems"),
+ new XAttribute("BeforeTargets", "_WarnForApphostCultureCollision"),
+ new XElement(ns + "ItemGroup",
+ new XElement(ns + "ResourceCopyLocalItems",
+ new XAttribute("Include", "cs\\test.resources.dll"),
+ new XElement(ns + "Culture", "cs")))));
+ });
+
+ var buildCommand = new BuildCommand(testAsset);
+ buildCommand
+ .Execute()
+ .Should()
+ .Pass()
+ .And
+ .HaveStdOutContaining("NETSDK1229");
+ }
+
}
}