Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 4f7c76b

Browse files
author
Peter Huene
committed
Make --no-build imply --no-restore for run command.
This commit makes the `--no-build` option for the run command automatically imply `--no-restore`. Fixes issue #7472.
1 parent ea85555 commit 4f7c76b

16 files changed

+47
-96
lines changed

src/dotnet/commands/dotnet-run/LocalizableStrings.resx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,11 @@
124124
<value>Command used to run .NET apps</value>
125125
</data>
126126
<data name="CommandOptionNoBuildDescription" xml:space="preserve">
127-
<value>Skip building the project prior to running. By default, the project will be built.</value>
127+
<value>Do not build project before running. Implies --no-restore.</value>
128128
</data>
129129
<data name="CommandOptionFrameworkDescription" xml:space="preserve">
130130
<value>Build and run the app using the specified framework. The framework has to be specified in the project file. </value>
131131
</data>
132-
<data name="CommandOptionNoBuild" xml:space="preserve">
133-
<value>Do not build the project before running.</value>
134-
</data>
135132
<data name="CommandOptionProjectDescription" xml:space="preserve">
136133
<value>The path to the project file to run (defaults to the current directory if there is only one project).</value>
137134
</data>

src/dotnet/commands/dotnet-run/RunCommandParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static Command Run() =>
2626
project: o.SingleArgumentOrDefault("--project"),
2727
launchProfile: o.SingleArgumentOrDefault("--launch-profile"),
2828
noLaunchProfile: o.HasOption("--no-launch-profile"),
29-
noRestore: o.HasOption("--no-restore"),
29+
noRestore: o.HasOption("--no-restore") || o.HasOption("--no-build"),
3030
restoreArgs: o.OptionValuesToBeForwarded(),
3131
args: o.Arguments
3232
)),

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">Před spuštěním vynechá sestavení projektu. Standardně se projekt sestaví.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">Před spuštěním nesestavovat projekt</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">Před spuštěním vynechá sestavení projektu. Standardně se projekt sestaví.</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">Überspringen Sie die Erstellung des Projekts vor dem Ausführen. Das Projekt wird standardmäßig erstellt.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">Erstellen Sie das Projekt nicht vor dem Ausführen.</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">Überspringen Sie die Erstellung des Projekts vor dem Ausführen. Das Projekt wird standardmäßig erstellt.</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">Omite la compilación del proyecto antes de ejecutarlo. El proyecto se compilará de manera predeterminada.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">No se compila el proyecto antes de ejecutarlo.</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">Omite la compilación del proyecto antes de ejecutarlo. El proyecto se compilará de manera predeterminada.</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">Ignorez la génération du projet avant l'exécution. Par défaut, le projet est généré.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">Ne générez pas le projet avant l'exécution.</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">Ignorez la génération du projet avant l'exécution. Par défaut, le projet est généré.</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">Consente di ignorare la compilazione del progetto prima dell'esecuzione. Per impostazione predefinita, il progetto verrà compilato.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">Non compilare il progetto prima dell'esecuzione.</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">Consente di ignorare la compilazione del progetto prima dell'esecuzione. Per impostazione predefinita, il progetto verrà compilato.</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">実行の前に、プロジェクトのビルドをスキップします。既定では、プロジェクトはビルドされます。</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">実行する前にプロジェクトをビルドしません。</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">実行の前に、プロジェクトのビルドをスキップします。既定では、プロジェクトはビルドされます。</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">실행하기 전에 프로젝트를 빌드하지 않습니다. 기본적으로 프로젝트가 빌드됩니다.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">실행하기 전에 프로젝트를 빌드하지 않습니다.</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">실행하기 전에 프로젝트를 빌드하지 않습니다. 기본적으로 프로젝트가 빌드됩니다.</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@
3333
<note />
3434
</trans-unit>
3535
<trans-unit id="CommandOptionNoBuildDescription">
36-
<source>Skip building the project prior to running. By default, the project will be built.</source>
37-
<target state="translated">Pomiń kompilację projektu przed uruchomieniem. Domyślnie projekt zostanie skompilowany.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandOptionNoBuild">
41-
<source>Do not build the project before running.</source>
42-
<target state="translated">Nie kompiluj projektu przed uruchomieniem.</target>
36+
<source>Do not build project before running. Implies --no-restore.</source>
37+
<target state="needs-review-translation">Pomiń kompilację projektu przed uruchomieniem. Domyślnie projekt zostanie skompilowany.</target>
4338
<note />
4439
</trans-unit>
4540
<trans-unit id="RunCommandExceptionUnableToRunSpecifyFramework">

0 commit comments

Comments
 (0)