Skip to content

Commit 95a7343

Browse files
committed
Add --infer-runtime option
1 parent ba65b48 commit 95a7343

34 files changed

+165
-5
lines changed

src/Cli/dotnet/CommonOptions.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.IO;
33
using System.Linq;
4+
using System.Runtime.InteropServices;
45
using Microsoft.DotNet.Cli.CommandLine;
56
using Microsoft.DotNet.Tools.Common;
67
using Microsoft.DotNet.Tools;
@@ -49,6 +50,13 @@ public static Option RuntimeOption(string description, bool withShortOption = tr
4950
.With(name: CommonLocalizableStrings.RuntimeIdentifierArgumentName)
5051
.ForwardAsSingle(o => $"-property:RuntimeIdentifier={o.Arguments.Single()}"));
5152

53+
public static Option InferRuntimeOption(string description, bool withShortOption = true) =>
54+
Create.Option(
55+
"--infer-runtime",
56+
description,
57+
Accept.NoArguments()
58+
.ForwardAs($"-property:RuntimeIdentifier={RuntimeInformation.RuntimeIdentifier}"));
59+
5260
public static Option ConfigurationOption(string description) =>
5361
Create.Option(
5462
"-c|--configuration",

src/Cli/dotnet/commands/dotnet-restore/LocalizableStrings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@
141141
<data name="CmdRuntimeOptionDescription" xml:space="preserve">
142142
<value>The target runtime to restore packages for.</value>
143143
</data>
144+
<data name="CmdInferRuntimeOptionDescription" xml:space="preserve">
145+
<value>Use host runtime to build the target.</value>
146+
</data>
144147
<data name="CmdPackagesOption" xml:space="preserve">
145148
<value>PACKAGES_DIR</value>
146149
</data>

src/Cli/dotnet/commands/dotnet-restore/RestoreCommandParser.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Collections.Generic;
55
using System.Linq;
66
using System.Reflection.Metadata;
7+
using System.Runtime.InteropServices;
78
using Microsoft.DotNet.Cli.CommandLine;
89
using Microsoft.DotNet.Tools;
910
using LocalizableStrings = Microsoft.DotNet.Tools.Restore.LocalizableStrings;
@@ -83,6 +84,11 @@ private static Option[] ImplicitRestoreOptions(bool showHelp = false, bool useSh
8384
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
8485
.With(name: LocalizableStrings.CmdRuntimeOption)
8586
.ForwardAsSingle(o => $"-property:RuntimeIdentifiers={string.Join("%3B", o.Arguments)}")),
87+
Create.Option(
88+
"--infer-runtime",
89+
LocalizableStrings.CmdInferRuntimeOptionDescription,
90+
Accept.NoArguments()
91+
.ForwardAs($"-property:RuntimeIdentifier={RuntimeInformation.RuntimeIdentifier}")),
8692
Create.Option(
8793
"--packages",
8894
showHelp ? LocalizableStrings.CmdPackagesOptionDescription : string.Empty,

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.cs.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Volitelná cesta k souboru projektu nebo k argumentům MSBuildu</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.de.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Optionaler Pfad zu einer Projektdatei oder MSBuild-Argumente.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.es.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Ruta de acceso opcional a un archivo de proyecto o argumentos de MSBuild.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">ORIGEN</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.fr.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Chemin facultatif vers un fichier projet ou des arguments MSBuild.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.it.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Percorso facoltativo di un file di progetto o di argomenti di MSBuild.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">ORIGINE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ja.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">プロジェクト ファイルまたは MSBuild 引数へのオプションのパス。</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ko.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">프로젝트 파일의 선택적 경로 또는 MSBuild 인수입니다.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pl.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Opcjonalna ścieżka do pliku projektu lub argumentów programu MSBuild.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">ŹRÓDŁO</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.pt-BR.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Caminho opcional para um arquivo de projeto ou argumentos do MSBuild.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">ORIGEM</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.ru.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Дополнительный путь к файлу проекта или аргументам MSBuild.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.tr.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">Proje dosyasının veya MSBuild bağımsız değişkenlerinin isteğe bağlı yolu.</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hans.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">项目文件或 MSBuild 参数的可选路径。</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-restore/xlf/LocalizableStrings.zh-Hant.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<target state="translated">專案檔或 MSBuild 引數的選擇性路徑。</target>
2323
<note />
2424
</trans-unit>
25+
<trans-unit id="CmdInferRuntimeOptionDescription">
26+
<source>Use host runtime to build the target.</source>
27+
<target state="new">Use host runtime to build the target.</target>
28+
<note />
29+
</trans-unit>
2530
<trans-unit id="CmdSourceOption">
2631
<source>SOURCE</source>
2732
<target state="translated">SOURCE</target>

src/Cli/dotnet/commands/dotnet-store/LocalizableStrings.resx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,7 @@
162162
<data name="RuntimeOptionDescription" xml:space="preserve">
163163
<value>The target runtime to store packages for.</value>
164164
</data>
165-
</root>
165+
<data name="InferRuntimeOptionDescription" xml:space="preserve">
166+
<value>Use host runtime to build the target.</value>
167+
</data>
168+
</root>

src/Cli/dotnet/commands/dotnet-store/StoreCommandParser.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public static Command Store() =>
5050
.With(name: LocalizableStrings.FrameworkVersionOption)
5151
.ForwardAsSingle(o => $"-property:RuntimeFrameworkVersion={o.Arguments.Single()}")),
5252
CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription),
53+
CommonOptions.InferRuntimeOption(LocalizableStrings.InferRuntimeOptionDescription),
5354
Create.Option(
5455
"-o|--output",
5556
LocalizableStrings.OutputOptionDescription,

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.cs.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Uloží určená sestavení pro platformu .NET. Standardně se optimalizují pro cílový modul runtime a architekturu.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.de.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Speichert die angegebenen Assemblys für die .NET-Plattform. Standardmäßig werden diese für die Zielruntime und das Framework optimiert.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.es.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Almacena los ensamblados especificados para la plataforma .NET. De forma predeterminada, estos se optimizarán para el tiempo de ejecución y la plataforma de destino.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">DIRECTORIO_DE_SALIDA</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.fr.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Stocke les assemblys spécifiés pour la plateforme .NET. Par défaut, ceux-ci sont optimisés pour le runtime et le framework cible.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.it.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Consente di archiviare gli assembly specificati per la piattaforma .NET. Per impostazione predefinita, gli assembly verranno ottimizzati per il framework e il runtime di destinazione.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">DIR_OUTPUT</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.ja.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">.NET Platform の指定されたアセンブリを格納します。既定では、これらはターゲットのランタイムとフレームワーク用に最適化されます。</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.ko.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">.NET 플랫폼에 대해 지정된 어셈블리를 저장합니다. 기본적으로 대상 런타임 및 프레임워크에 대해 최적화됩니다.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.pl.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Przechowuje określone zestawy platformy .NET. Domyślnie są one optymalizowane pod kątem docelowego środowiska uruchomieniowego i platformy docelowej.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">KATALOG_WYJŚCIOWY</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.pt-BR.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Armazena os assemblies especificados para a Plataforma .NET. Por padrão, serão otimizados para o runtime e a estrutura de destino.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.ru.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">Хранит указанные сборки для платформы .NET. По умолчанию они оптимизируются для целевой среды выполнения и платформы.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.tr.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">.NET Platformu için belirtilen bütünleştirilmiş kodları depolar. Varsayılan olarak, bunlar hedef çalışma zamanı ve çerçeve için iyileştirilir.</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">ÇIKIŞ_DİZİNİ</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.zh-Hans.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">存储为 .NET 平台指定的程序集。默认情况下,这些程序集将针对目标运行时和框架进行优化。</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Cli/dotnet/commands/dotnet-store/xlf/LocalizableStrings.zh-Hant.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<target state="translated">儲存為 .NET 平台所指定的組件。根據預設,會為目標執行階段與架構,最佳化這些組件。</target>
88
<note />
99
</trans-unit>
10+
<trans-unit id="InferRuntimeOptionDescription">
11+
<source>Use host runtime to build the target.</source>
12+
<target state="new">Use host runtime to build the target.</target>
13+
<note />
14+
</trans-unit>
1015
<trans-unit id="OutputOption">
1116
<source>OUTPUT_DIR</source>
1217
<target state="translated">OUTPUT_DIR</target>

src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetBuildInvocation.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class GivenDotnetBuildInvocation : IClassFixture<NullCurrentSessionIdFixt
2525
[InlineData(new string[] { "--no-incremental" }, "-target:Rebuild")]
2626
[InlineData(new string[] { "-r", "rid" }, "-property:RuntimeIdentifier=rid")]
2727
[InlineData(new string[] { "--runtime", "rid" }, "-property:RuntimeIdentifier=rid")]
28+
[InlineData(new string[] { "--infer-runtime" }, "-property:RuntimeIdentifier=<self-rid>")]
2829
[InlineData(new string[] { "-c", "config" }, "-property:Configuration=config")]
2930
[InlineData(new string[] { "--configuration", "config" }, "-property:Configuration=config")]
3031
[InlineData(new string[] { "--version-suffix", "mysuffix" }, "-property:VersionSuffix=mysuffix")]
@@ -40,7 +41,8 @@ public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalA
4041
{
4142
expectedAdditionalArgs =
4243
(string.IsNullOrEmpty(expectedAdditionalArgs) ? "" : $" {expectedAdditionalArgs}")
43-
.Replace("<cwd>", WorkingDirectory);
44+
.Replace("<cwd>", WorkingDirectory)
45+
.Replace("<self-rid>", RuntimeInformation.RuntimeIdentifier);
4446

4547
var msbuildPath = "<msbuildpath>";
4648
var command = BuildCommand.FromArgs(args, msbuildPath);

0 commit comments

Comments
 (0)