diff --git a/TestAssets/TestProjects/AllResourcesInSatellite/AllResourcesInSatellite.csproj b/TestAssets/TestProjects/AllResourcesInSatellite/AllResourcesInSatellite.csproj
index d29532b7a447..6901a3d54a61 100644
--- a/TestAssets/TestProjects/AllResourcesInSatellite/AllResourcesInSatellite.csproj
+++ b/TestAssets/TestProjects/AllResourcesInSatellite/AllResourcesInSatellite.csproj
@@ -2,7 +2,6 @@
netcoreapp1.0
- win7-x86Exetest.snktrue
@@ -19,7 +18,6 @@
- win7-x86false
diff --git a/TestAssets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj b/TestAssets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj
index 71ab904634c8..01c7c68441d7 100644
--- a/TestAssets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj
+++ b/TestAssets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj
@@ -3,4 +3,10 @@
Exenet46
+
+ $(DefineConstants);USE_NATIVE_CODE
+
+
+
+
\ No newline at end of file
diff --git a/TestAssets/TestProjects/DesktopMinusRid/Program.cs b/TestAssets/TestProjects/DesktopMinusRid/Program.cs
index fee6a5079e49..427a395373ed 100644
--- a/TestAssets/TestProjects/DesktopMinusRid/Program.cs
+++ b/TestAssets/TestProjects/DesktopMinusRid/Program.cs
@@ -2,14 +2,45 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Diagnostics;
+using System.Reflection;
+using System.Runtime.InteropServices;
namespace TestApp
{
- public class Program
+ class Program
{
- public static void Main(string[] args)
+ static void Main()
{
+ // Prevent libuv on path from interfering with test
+ Environment.SetEnvironmentVariable("PATH", "");
+
+#if USE_NATIVE_CODE
+ try
+ {
+ uv_loop_size();
+ Console.WriteLine($"Native code was used ({GetCurrentAssemblyProcessorArchitecture()})");
+ }
+ catch (DllNotFoundException)
+ {
+ Console.WriteLine($"Native code failed ({GetCurrentAssemblyProcessorArchitecture()})");
+ }
+#else
+ Console.WriteLine($"Native code was not used ({GetCurrentAssemblyProcessorArchitecture()})");
+#endif
+ }
+
+#if USE_NATIVE_CODE
+ [DllImport("libuv", CallingConvention = CallingConvention.Cdecl)]
+ static extern int uv_loop_size();
+#endif
+
+ static ProcessorArchitecture GetCurrentAssemblyProcessorArchitecture()
+ {
+#if NET46
+ return AssemblyName.GetAssemblyName(typeof(Program).Assembly.Location).ProcessorArchitecture;
+#else
+ throw new PlatformNotSupportedException();
+#endif
}
}
}
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.cs.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.cs.resx
index fc53bfe7b518..1316ae57495e 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.cs.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.cs.resx
@@ -174,9 +174,6 @@
Nečekaná závislost {0} bez čísla verze.
-
- Hodnota RuntimeIdentifier musí být nastavena pro spustitelné soubory .NET Frameworku. Můžete použít hodnotu RuntimeIdentifier=win7-x86 nebo RuntimeIdentifier=win7-x64.
-
Před zpracováním prostředků je potřeba nakonfigurovat preprocesor prostředků.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.de.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.de.resx
index 1808741fa151..5d7170bd534b 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.de.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.de.resx
@@ -174,9 +174,6 @@
Unerwartete Abhängigkeit "{0}" ohne Versionsnummer.
-
- "RuntimeIdentifier" muss für ausführbare .NETFramework-Dateien festgelegt werden. Verwenden Sie ggf. "RuntimeIdentifier=win7-x86" oder "RuntimeIdentifier=win7-x64".
-
Der Ressourcenpräprozessor muss konfiguriert werden, bevor Ressourcen verarbeitet werden.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.es.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.es.resx
index 229237b447c3..6c71b6a22eec 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.es.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.es.resx
@@ -174,9 +174,6 @@
Dependencia '{0}' sin número de versión no esperada.
-
- RuntimeIdentifier debe establecerse para archivos ejecutables de .NET Framework. Considere usar RuntimeIdentifier=win7-x86 o RuntimeIdentifier=win7-x64.
-
Debe configurarse el preprocesador de recursos antes de que se procesen los recursos.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.fr.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.fr.resx
index f66fe9555370..bf680c2fdda9 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.fr.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.fr.resx
@@ -174,9 +174,6 @@
Dépendance '{0}' sans numéro de version inattendue.
-
- RuntimeIdentifier doit être défini pour les exécutables .NET Framework. Considérez RuntimeIdentifier=win7-x86 ou RuntimeIdentifier=win7-x64.
-
Le préprocesseur de composants doit être configuré avant que les composants ne soient traités.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.it.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.it.resx
index 2338c9fb177e..58c45420b6b4 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.it.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.it.resx
@@ -174,9 +174,6 @@
La dipendenza '{0}' è imprevista e non ha numero di versione.
-
- Per gli eseguibili di .NET Framework è necessario impostare RuntimeIdentifier. Provare a specificare RuntimeIdentifier=win7-x86 o RuntimeIdentifier=win7-x64.
-
Prima di elaborare le risorse, è necessario configurare il preprocessore di risorse.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ja.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ja.resx
index 4843866dbb9b..b59e27c70675 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ja.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ja.resx
@@ -174,9 +174,6 @@
バージョン番号のない予期しない依存関係 '{0}' です。
-
- .NETFramework 実行可能ファイルの RuntimeIdentifier を設定する必要があります。RuntimeIdentifier=win7-x86 または RuntimeIdentifier=win7-x64 を検討してください。
-
資産を処理する前に、資産プリプロセッサを構成する必要があります。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ko.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ko.resx
index 0c35c0509adb..72a3f2a71d42 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ko.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ko.resx
@@ -174,9 +174,6 @@
버전 번호가 없는 예기치 않은 종속성 '{0}'입니다.
-
- .NET Framework 실행 파일에는 RuntimeIdentifier를 설정해야 합니다. RuntimeIdentifier=win7-x86 또는 RuntimeIdentifier=win7-x64를 사용해 보세요.
-
자산을 처리하려면 먼저 자산 전처리기를 구성해야 합니다.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pl.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pl.resx
index 9709e0c61c31..4d3d60ab9594 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pl.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pl.resx
@@ -174,9 +174,6 @@
Nieoczekiwana zależność „{0}” bez numeru wersji.
-
- Element RuntimeIdentifier musi być ustawiony dla plików wykonywalnych programu .NETFramework. Rozważ element RuntimeIdentifier=win7-x86 lub RuntimeIdentifier=win7-x64.
-
Preprocesor zasobów musi być skonfigurowany przed przetworzeniem zasobów.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pt-BR.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pt-BR.resx
index 57785047a7b8..62d0c42a0e74 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pt-BR.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.pt-BR.resx
@@ -174,9 +174,6 @@
Dependência inesperada '{0}' sem número de versão.
-
- O RuntimeIdentifier deve ser definido para executáveis .NETFramework. Considere o RuntimeIdentifier=win7-x86 ou RuntimeIdentifier=win7-x64.
-
O pré-processador de ativos deve ser configurado antes de os ativos serem processados.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.resx
index 8df2ff157d5b..b25b3c7d5f60 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.resx
@@ -174,9 +174,6 @@
Unexpected dependency '{0}' with no version number.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
-
Asset preprocessor must be configured before assets are processed.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ru.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ru.resx
index 265e55f91f80..e255bc1a5ef0 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ru.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.ru.resx
@@ -174,9 +174,6 @@
Непредвиденная зависимость "{0}" без номера версии.
-
- RuntimeIdentifier необходимо задать для исполняемых файлов .NETFramework. Рекомендуется RuntimeIdentifier=win7-x86 или RuntimeIdentifier=win7-x64.
-
Препроцессор ресурсов необходимо настроить перед обработкой ресурсов.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.tr.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.tr.resx
index 6a9edcc40104..d21c981d6648 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.tr.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.tr.resx
@@ -174,9 +174,6 @@
Sürüm numarası olmayan, beklenmeyen bağımlılık: '{0}'.
-
- .NETFramework yürütülebilir dosyaları için RuntimeIdentifier ayarlanmalıdır. RuntimeIdentifier=win7-x86 veya RuntimeIdentifier=win7-x64 ayarlanabilir.
-
Varlıkların işlenebilmesi için varlık ön işlemcisi yapılandırılmalıdır.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hans.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hans.resx
index ca0bd4e5261d..7598fc5a6b31 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hans.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hans.resx
@@ -174,9 +174,6 @@
不具有版本号的意外依赖项“{0}”。
-
- 必须为 .NETFramework 可执行文件设置 RuntimeIdentifier。请考虑 RuntimeIdentifier=win7-x86 或 RuntimeIdentifier=win7-x64。
-
必须在处理资产之前配置资产预处理器。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hant.resx b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hant.resx
index fe53bf2cef00..078571fb36f6 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hant.resx
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/Strings.zh-Hant.resx
@@ -174,9 +174,6 @@
未預期的相依性 '{0}',沒有版本號碼。
-
- 必須為 .NETFramework 可執行檔設定 RuntimeIdentifier。請考慮使用 RuntimeIdentifier=win7-x86 或 RuntimeIdentifier=win7-x64。
-
必須設定資產前置處理器,才能處理資產。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.cs.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.cs.xlf
index 2680373a8f8f..18ae4a6b6089 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.cs.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.cs.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- Cílová platforma projektu {0} není kompatibilní s {1}.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ Cílová platforma projektu {0} není kompatibilní s {1}.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Nečekaná závislost {0} bez čísla verze.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- Hodnota RuntimeIdentifier musí být nastavena pro spustitelné soubory .NET Frameworku. Můžete použít hodnotu RuntimeIdentifier=win7-x86 nebo RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.Před zpracováním prostředků je potřeba nakonfigurovat preprocesor prostředků.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.de.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.de.xlf
index 3848815c9127..d70e09bf8630 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.de.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.de.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- Für das Projekt "{0}" ist kein mit "{1}" kompatibles Framework vorhanden.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ Für das Projekt "{0}" ist kein mit "{1}" kompatibles Framework vorhanden.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Unerwartete Abhängigkeit "{0}" ohne Versionsnummer.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- "RuntimeIdentifier" muss für ausführbare .NETFramework-Dateien festgelegt werden. Verwenden Sie ggf. "RuntimeIdentifier=win7-x86" oder "RuntimeIdentifier=win7-x64".
-
- Asset preprocessor must be configured before assets are processed.Der Ressourcenpräprozessor muss konfiguriert werden, bevor Ressourcen verarbeitet werden.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.es.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.es.xlf
index 98a5c642dd7c..29bc68d9b403 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.es.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.es.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- El proyecto '{0}' no tiene una plataforma de destino compatible con '{1}'.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ El proyecto '{0}' no tiene una plataforma de destino compatible con '{1}'.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Dependencia '{0}' sin número de versión no esperada.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- RuntimeIdentifier debe establecerse para archivos ejecutables de .NET Framework. Considere usar RuntimeIdentifier=win7-x86 o RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.Debe configurarse el preprocesador de recursos antes de que se procesen los recursos.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.fr.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.fr.xlf
index 38bfad59be73..4fd7bc3798d9 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.fr.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.fr.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- Le projet '{0}' n'a aucun framework cible compatible avec '{1}'.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ Le projet '{0}' n'a aucun framework cible compatible avec '{1}'.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Dépendance '{0}' sans numéro de version inattendue.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- RuntimeIdentifier doit être défini pour les exécutables .NET Framework. Considérez RuntimeIdentifier=win7-x86 ou RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.Le préprocesseur de composants doit être configuré avant que les composants ne soient traités.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.it.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.it.xlf
index 361fc285b098..5e908da920ed 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.it.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.it.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- Per il progetto '{0}' non esiste alcun framework di destinazione compatibile con '{1}'.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ Per il progetto '{0}' non esiste alcun framework di destinazione compatibile con '{1}'.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
La dipendenza '{0}' è imprevista e non ha numero di versione.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- Per gli eseguibili di .NET Framework è necessario impostare RuntimeIdentifier. Provare a specificare RuntimeIdentifier=win7-x86 o RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.Prima di elaborare le risorse, è necessario configurare il preprocessore di risorse.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ja.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ja.xlf
index 3cf9c43039cd..939a3cb6bce3 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ja.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ja.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- プロジェクト '{0}' には、'{1}' と互換性のあるターゲット フレームワークがありません。
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ プロジェクト '{0}' には、'{1}' と互換性のあるターゲット フレームワークがありません。
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
バージョン番号のない予期しない依存関係 '{0}' です。
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- .NETFramework 実行可能ファイルの RuntimeIdentifier を設定する必要があります。RuntimeIdentifier=win7-x86 または RuntimeIdentifier=win7-x64 を検討してください。
-
- Asset preprocessor must be configured before assets are processed.資産を処理する前に、資産プリプロセッサを構成する必要があります。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ko.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ko.xlf
index 9e23f304fea1..acfffab2ad2f 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ko.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ko.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- '{0}' 프로젝트에 '{1}'과(와) 호환되는 대상 프레임워크가 없습니다.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ '{0}' 프로젝트에 '{1}'과(와) 호환되는 대상 프레임워크가 없습니다.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
버전 번호가 없는 예기치 않은 종속성 '{0}'입니다.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- .NET Framework 실행 파일에는 RuntimeIdentifier를 설정해야 합니다. RuntimeIdentifier=win7-x86 또는 RuntimeIdentifier=win7-x64를 사용해 보세요.
-
- Asset preprocessor must be configured before assets are processed.자산을 처리하려면 먼저 자산 전처리기를 구성해야 합니다.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pl.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pl.xlf
index 36706e21a9c6..60d75ac6e16d 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pl.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pl.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- Projekt „{0}” nie ma platformy docelowej kompatybilnej z „{1}”.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ Projekt „{0}” nie ma platformy docelowej kompatybilnej z „{1}”.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Nieoczekiwana zależność „{0}” bez numeru wersji.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- Element RuntimeIdentifier musi być ustawiony dla plików wykonywalnych programu .NETFramework. Rozważ element RuntimeIdentifier=win7-x86 lub RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.Preprocesor zasobów musi być skonfigurowany przed przetworzeniem zasobów.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pt-BR.xlf
index fe8edad4c2e5..92f5d23b901e 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pt-BR.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.pt-BR.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- O projeto '{0}' não tem nenhuma estrutura de destino compatível com '{1}'.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ O projeto '{0}' não tem nenhuma estrutura de destino compatível com '{1}'.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Dependência inesperada '{0}' sem número de versão.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- O RuntimeIdentifier deve ser definido para executáveis .NETFramework. Considere o RuntimeIdentifier=win7-x86 ou RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.O pré-processador de ativos deve ser configurado antes de os ativos serem processados.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ru.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ru.xlf
index 32cabba5832b..5e679072d788 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ru.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.ru.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- Проект "{0}" не содержит целевую платформу, совместимую с "{1}".
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ Проект "{0}" не содержит целевую платформу, совместимую с "{1}".
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Непредвиденная зависимость "{0}" без номера версии.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- RuntimeIdentifier необходимо задать для исполняемых файлов .NETFramework. Рекомендуется RuntimeIdentifier=win7-x86 или RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.Препроцессор ресурсов необходимо настроить перед обработкой ресурсов.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.tr.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.tr.xlf
index c74184354176..935900fbaa4e 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.tr.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.tr.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- '{0}' projesinde '{1}' ile uyumlu bir hedef çerçeve yok.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ '{0}' projesinde '{1}' ile uyumlu bir hedef çerçeve yok.
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
Sürüm numarası olmayan, beklenmeyen bağımlılık: '{0}'.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- .NETFramework yürütülebilir dosyaları için RuntimeIdentifier ayarlanmalıdır. RuntimeIdentifier=win7-x86 veya RuntimeIdentifier=win7-x64 ayarlanabilir.
-
- Asset preprocessor must be configured before assets are processed.Varlıkların işlenebilmesi için varlık ön işlemcisi yapılandırılmalıdır.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.xlf
index 90cb7c611b1b..3e36fa9ec33d 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.xlf
@@ -8,8 +8,8 @@
- Project '{0}' has no target framework compatible with '{1}'.
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ Invalid framework name: '{0}'.
@@ -79,10 +79,6 @@
Unexpected dependency '{0}' with no version number.
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
-
- Asset preprocessor must be configured before assets are processed.
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hans.xlf
index 1a07c05bc946..cd421ff890d8 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hans.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hans.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- 项目“{0}”没有与“{1}”兼容的目标框架。
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ 项目“{0}”没有与“{1}”兼容的目标框架。
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
不具有版本号的意外依赖项“{0}”。
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- 必须为 .NETFramework 可执行文件设置 RuntimeIdentifier。请考虑 RuntimeIdentifier=win7-x86 或 RuntimeIdentifier=win7-x64。
-
- Asset preprocessor must be configured before assets are processed.必须在处理资产之前配置资产预处理器。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hant.xlf
index a23076ba92b1..25ac98bc4d00 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hant.xlf
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Resources/xlf/Strings.zh-Hant.xlf
@@ -9,9 +9,9 @@
- Project '{0}' has no target framework compatible with '{1}'.
- 專案 '{0}' 沒有與 '{1}' 相容的目標 Framework。
-
+ Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'.
+ 專案 '{0}' 沒有與 '{1}' 相容的目標 Framework。
+ Invalid framework name: '{0}'.
@@ -98,11 +98,6 @@
未預期的相依性 '{0}',沒有版本號碼。
-
- RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.
- 必須為 .NETFramework 可執行檔設定 RuntimeIdentifier。請考慮使用 RuntimeIdentifier=win7-x86 或 RuntimeIdentifier=win7-x64。
-
- Asset preprocessor must be configured before assets are processed.必須設定資產前置處理器,才能處理資產。
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.RuntimeIdentifierInference.targets
index 5b0d73a756d9..63b58b7e01df 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.RuntimeIdentifierInference.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.RuntimeIdentifierInference.targets
@@ -14,7 +14,61 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
-
+
+
+
+ <_UsingDefaultRuntimeIdentifier>true
+ win7-x64
+ win7-x86
+
+
+
+ <_UsingDefaultPlatformTarget>true
+
+
@@ -53,16 +107,29 @@ Copyright (c) .NET Foundation. All rights reserved.
-
+ $(IntermediateOutputPath)$(RuntimeIdentifier)\$(OutputPath)$(RuntimeIdentifier)\
-
-
+
+
+
+ AnyCPU
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.BeforeCommon.targets b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.BeforeCommon.targets
index 25bf6caf3843..a670e00b9c09 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.BeforeCommon.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.BeforeCommon.targets
@@ -69,7 +69,8 @@ Copyright (c) .NET Foundation. All rights reserved.
$(OutputPath)$(RuntimeIdentifier)\$(PublishDirName)\
+ '$(RuntimeIdentifier)' != '' and
+ '$(_UsingDefaultRuntimeIdentifier)' != 'true'">$(OutputPath)$(RuntimeIdentifier)\$(PublishDirName)\
$(OutputPath)$(PublishDirName)\
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.targets
index be6aa51ae427..e0a7b6055a0c 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.targets
@@ -352,6 +352,14 @@ Copyright (c) .NET Foundation. All rights reserved.
+
+
+
+
+
+
+ <_GetAllRuntimeIdentifiersTargetFrameworks Include="$(TargetFrameworks)" />
+ <_AllRuntimeIdentifiers Include="$(RuntimeIdentifiers);$(RuntimeIdentifier)" />
+
+
+
+
+
+
+
+ @(_AllRuntimeIdentifiers->Distinct())
+
+
+
diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs
index 191f743eb497..c98a03e724b8 100644
--- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs
@@ -8,6 +8,9 @@
using Microsoft.NET.TestFramework.Commands;
using Xunit;
using static Microsoft.NET.TestFramework.Commands.MSBuildTest;
+using System.Xml.Linq;
+using System.Linq;
+using FluentAssertions;
namespace Microsoft.NET.Build.Tests
{
@@ -79,5 +82,47 @@ public void It_builds_desktop_library_successfully_on_windows()
"netstandard1.5/DesktopAndNetStandard.deps.json"
});
}
+
+ [Theory]
+ [InlineData("1", "win7-x86", "win7-x86;win7-x64", "win10-arm", "win7-x86;linux;WIN7-X86;unix", "osx-10.12", "win8-arm;win8-arm-aot",
+ "win7-x86;win7-x64;win10-arm;linux;unix;osx-10.12;win8-arm;win8-arm-aot")]
+ public void It_combines_inner_rids_for_restore(
+ string identifier,
+ string outerRid,
+ string outerRids,
+ string firstFrameworkRid,
+ string firstFrameworkRids,
+ string secondFrameworkRid,
+ string secondFrameworkRids,
+ string expectedCombination)
+ {
+ var testAsset = _testAssetsManager
+ .CopyTestAsset(Path.Combine("CrossTargeting", "NetStandardAndNetCoreApp"), identifier: identifier)
+ .WithSource()
+ .WithProjectChanges(project =>
+ {
+ var ns = project.Root.Name.Namespace;
+ var propertyGroup = project.Root.Elements(ns + "PropertyGroup").First();
+
+ propertyGroup.Add(
+ new XElement(ns + "RuntimeIdentifier", outerRid),
+ new XElement(ns + "RuntimeIdentifiers", outerRids));
+
+ propertyGroup.AddAfterSelf(
+ new XElement(ns + "PropertyGroup",
+ new XAttribute(ns + "Condition", "'$(TargetFramework)' == 'netstandard1.5'"),
+ new XElement(ns + "RuntimeIdentifier", firstFrameworkRid),
+ new XElement(ns + "RuntimeIdentifiers", firstFrameworkRids)),
+ new XElement(ns + "PropertyGroup",
+ new XAttribute(ns + "Condition", "'$(TargetFramework)' == 'netcoreapp1.0'"),
+ new XElement(ns + "RuntimeIdentifier", secondFrameworkRid),
+ new XElement(ns + "RuntimeIdentifiers", secondFrameworkRids)));
+ });
+
+ var command = new GetValuesCommand(Stage0MSBuild, testAsset.TestRoot, "", valueName: "RuntimeIdentifiers");
+ command.DependsOnTargets = "GetAllRuntimeIdentifiers";
+ command.Execute().Should().Pass();
+ command.GetValues().Should().BeEquivalentTo(expectedCombination.Split(';'));
+ }
}
}
diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
index d3620560888c..77daf71f7b8d 100644
--- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
@@ -1,45 +1,198 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+using System;
using System.IO;
+using System.Linq;
using System.Runtime.InteropServices;
+using System.Xml.Linq;
+
+using Microsoft.DotNet.Cli.Utils;
using Microsoft.NET.TestFramework;
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Commands;
-using Xunit;
+using Microsoft.NET.TestFramework.ProjectConstruction;
+
using FluentAssertions;
+using Xunit;
+
using static Microsoft.NET.TestFramework.Commands.MSBuildTest;
-using Microsoft.NET.TestFramework.ProjectConstruction;
namespace Microsoft.NET.Build.Tests
{
public class GivenThatWeWantToBuildADesktopExe : SdkTest
{
- [Fact]
- public void It_fails_to_build_if_no_rid_is_set()
+ [Theory]
+
+ // If we don't set platformTarget and don't use native dependency, we get working AnyCPU app.
+ [InlineData("defaults", null, false, "Native code was not used (MSIL)")]
+
+ // If we don't set platformTarget and do use native dependency, we get working x86 app.
+ [InlineData("defaultsNative", null, true, "Native code was used (X86)")]
+
+ // If we set x86 and don't use native dependency, we get working x86 app.
+ [InlineData("x86", "x86", false, "Native code was not used (X86)")]
+
+ // If we set x86 and do use native dependency, we get working x86 app.
+ [InlineData("x86Native", "x86", true, "Native code was used (X86)")]
+
+ // If we set x64 and don't use native dependency, we get working x64 app.
+ [InlineData("x64", "x64", false, "Native code was not used (Amd64)")]
+
+ // If we set x64 and do use native dependency, we get working x64 app.
+ [InlineData("x64Native", "x64", true, "Native code was used (Amd64)")]
+
+ // If we set AnyCPU and don't use native dependency, we get working AnyCPU app.
+ [InlineData("AnyCPU", "AnyCPU", false, "Native code was not used (MSIL)")]
+
+ // If we set AnyCPU and do use native dependency, we get any CPU app that can't find its native dependency.
+ // Tests current behavior, but ideally we'd also raise a build diagnostic in this case: https://github.com/dotnet/sdk/issues/843
+ [InlineData("AnyCPUNative", "AnyCPU", true, "Native code failed (MSIL)")]
+ public void It_handles_native_depdencies_and_platform_target(
+ string identifier,
+ string platformTarget,
+ bool useNativeCode,
+ string expectedProgramOutput)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return;
}
- var testAsset = _testAssetsManager
- .CopyTestAsset("DesktopMinusRid")
- .WithSource()
- .Restore();
+ foreach (bool multiTarget in new[] { false, true })
+ {
+ var testAsset = _testAssetsManager
+ .CopyTestAsset("DesktopMinusRid", identifier: Path.DirectorySeparatorChar + identifier + (multiTarget ? "Multi" : ""))
+ .WithSource()
+ .WithProjectChanges(project =>
+ {
+ var ns = project.Root.Name.Namespace;
+ var propertyGroup = project.Root.Elements(ns + "PropertyGroup").First();
+ propertyGroup.Add(new XElement(ns + "UseNativeCode", useNativeCode));
- var buildCommand = new BuildCommand(Stage0MSBuild, testAsset.TestRoot);
- buildCommand
- .MSBuild
- .CreateCommandForTarget("build", buildCommand.FullPathProjectFile)
- .CaptureStdOut()
- .Execute()
- .Should()
- .Fail()
- .And
- .HaveStdOutContaining("RuntimeIdentifier must be set");
+ if (platformTarget != null)
+ {
+ propertyGroup.Add(new XElement(ns + "PlatformTarget", platformTarget));
+ }
+
+ if (multiTarget)
+ {
+ propertyGroup.Element(ns + "TargetFramework").Remove();
+ propertyGroup.Add(new XElement(ns + "TargetFrameworks", "net46;netcoreapp1.1"));
+ }
+ })
+ .Restore();
+
+ var buildCommand = new BuildCommand(Stage0MSBuild, testAsset.TestRoot);
+ buildCommand
+ .Execute()
+ .Should()
+ .Pass();
+
+ var exe = Path.Combine(buildCommand.GetOutputDirectory("net46").FullName, "DesktopMinusRid.exe");
+ var runCommand = Command.Create(exe, Array.Empty());
+ runCommand
+ .CaptureStdOut()
+ .Execute()
+ .Should()
+ .Pass()
+ .And
+ .HaveStdOutContaining(expectedProgramOutput);
+ }
+ }
+
+ [Theory]
+
+ // implict rid with option to append rid to output path off -> do not append
+ [InlineData("implicitOff", "", false, false)]
+
+ // implicit rid with option to append rid to output path on -> do not append (never append implicit rid irrespective of option)
+ [InlineData("implicitOn", "", true, false)]
+
+ // explicit rid with option to append rid to output path off -> do not append
+ [InlineData("explicitOff", "win7-x86", false, false)]
+
+ // explicit rid with option to append rid to output path on -> append
+ [InlineData("explicitOn", "win7-x64", true, true)]
+ public void It_appends_rid_to_outdir_correctly(string identifier, string rid, bool useAppendOption, bool shouldAppend)
+ {
+ if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ return;
+ }
+
+ foreach (bool multiTarget in new[] { false, true })
+ {
+ var testAsset = _testAssetsManager
+ .CopyTestAsset("DesktopMinusRid", identifier: Path.DirectorySeparatorChar + identifier + (multiTarget ? "Multi" : ""))
+ .WithSource()
+ .WithProjectChanges(project =>
+ {
+ var ns = project.Root.Name.Namespace;
+ var propertyGroup = project.Root.Elements(ns + "PropertyGroup").First();
+ propertyGroup.Add(new XElement(ns + "RuntimeIdentifier", rid));
+ propertyGroup.Add(new XElement(ns + "AppendRuntimeIdentifierToOutputPath", useAppendOption.ToString()));
+
+ if (multiTarget)
+ {
+ propertyGroup.Element(ns + "RuntimeIdentifier").Add(new XAttribute("Condition", "'$(TargetFramework)' == 'net46'"));
+ propertyGroup.Element(ns + "TargetFramework").Remove();
+ propertyGroup.Add(new XElement(ns + "TargetFrameworks", "net46;netcoreapp1.1"));
+ }
+ })
+ .Restore();
+
+ var buildCommand = new BuildCommand(Stage0MSBuild, testAsset.TestRoot);
+ buildCommand
+ .Execute()
+ .Should()
+ .Pass();
+
+ var publishCommand = new PublishCommand(Stage0MSBuild, testAsset.TestRoot);
+ publishCommand
+ .Execute(multiTarget ? new[] { "/p:TargetFramework=net46" } : Array.Empty())
+ .Should()
+ .Pass();
+
+ string expectedOutput;
+ switch (rid)
+ {
+ case "":
+ expectedOutput = "Native code was not used (MSIL)";
+ break;
+
+ case "win7-x86":
+ expectedOutput = "Native code was not used (X86)";
+ break;
+
+ case "win7-x64":
+ expectedOutput = "Native code was not used (Amd64)";
+ break;
+
+ default:
+ throw new ArgumentOutOfRangeException(nameof(rid));
+ }
+
+ var outputDirectory = buildCommand.GetOutputDirectory("net46", runtimeIdentifier: shouldAppend ? rid : "");
+ var publishDirectory = publishCommand.GetOutputDirectory("net46", runtimeIdentifier: rid);
+
+ foreach (var directory in new[] { outputDirectory, publishDirectory })
+ {
+ var exe = Path.Combine(directory.FullName, "DesktopMinusRid.exe");
+
+ var runCommand = Command.Create(exe, Array.Empty());
+ runCommand
+ .CaptureStdOut()
+ .Execute()
+ .Should()
+ .Pass()
+ .And
+ .HaveStdOutContaining(expectedOutput);
+ }
+ }
}
+
[Theory]
[InlineData("win7-x86", "x86")]
[InlineData("win8-x86-aot", "x86")]
diff --git a/test/Microsoft.NET.TestFramework/Commands/GetValuesCommand.cs b/test/Microsoft.NET.TestFramework/Commands/GetValuesCommand.cs
index 6101e596478a..8706f996fa6f 100644
--- a/test/Microsoft.NET.TestFramework/Commands/GetValuesCommand.cs
+++ b/test/Microsoft.NET.TestFramework/Commands/GetValuesCommand.cs
@@ -24,6 +24,8 @@ public enum ValueType
public bool ShouldCompile { get; set; } = true;
+ public string DependsOnTargets { get; set; } = "Compile";
+
public string Configuration { get; set; }
public GetValuesCommand(MSBuildTest msbuild, string projectPath, string targetFramework,
@@ -58,7 +60,7 @@ public override CommandResult Execute(params string[] args)
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
-
+