From 14c1b06149cc0f30829448b1bf3918d2692cec9a Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 9 Jul 2021 11:15:19 -0700 Subject: [PATCH 1/8] Add build self contained options --- src/Cli/dotnet/CommonLocalizableStrings.resx | 9 ++++++++- src/Cli/dotnet/CommonOptions.cs | 12 ++++++++++++ src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs | 7 ++++++- .../commands/dotnet-build/BuildCommandParser.cs | 6 ++++++ .../commands/dotnet-publish/LocalizableStrings.resx | 7 ------- .../commands/dotnet-publish/PublishCommandParser.cs | 10 ++++------ .../dotnet-publish/xlf/LocalizableStrings.cs.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.de.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.es.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.fr.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.it.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.ja.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.ko.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.pl.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.ru.xlf | 12 ------------ .../dotnet-publish/xlf/LocalizableStrings.tr.xlf | 12 ------------ .../xlf/LocalizableStrings.zh-Hans.xlf | 12 ------------ .../xlf/LocalizableStrings.zh-Hant.xlf | 12 ------------ src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf | 12 ++++++++++++ .../dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf | 12 ++++++++++++ src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf | 12 ++++++++++++ .../dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf | 12 ++++++++++++ .../dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf | 12 ++++++++++++ 32 files changed, 192 insertions(+), 171 deletions(-) diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx index 4b87b84ac643..73037a3e847c 100644 --- a/src/Cli/dotnet/CommonLocalizableStrings.resx +++ b/src/Cli/dotnet/CommonLocalizableStrings.resx @@ -674,4 +674,11 @@ setx PATH "%PATH%;{0}" Allows prerelease packages to be installed. - \ No newline at end of file + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs index d3ec86e24bf6..968642ef6228 100644 --- a/src/Cli/dotnet/CommonOptions.cs +++ b/src/Cli/dotnet/CommonOptions.cs @@ -93,6 +93,18 @@ public static Option InteractiveOption() => public static Option DebugOption() => new Option("--debug"); + public static Option SelfContainedOption() => + new ForwardedOption( + "--self-contained", + CommonLocalizableStrings.SelfContainedOptionDescription) + .ForwardAsSingle(o => $"-property:SelfContained={o}"); + + public static Option NoSelfContainedOption() => + new ForwardedOption( + "--no-self-contained", + CommonLocalizableStrings.NoSelfContainedOptionDescription) + .ForwardAs("-property:SelfContained=false"); + public static bool VerbosityIsDetailedOrDiagnostic(this VerbosityOptions verbosity) { return verbosity.Equals(VerbosityOptions.diag) || diff --git a/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs b/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs index 224e380cf45e..bbfd00dc5e05 100644 --- a/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs @@ -7,7 +7,6 @@ using Parser = Microsoft.DotNet.Cli.Parser; using System.CommandLine.Parsing; using System; -using System.Linq; namespace Microsoft.DotNet.Tools.Build { @@ -33,6 +32,12 @@ public static BuildCommand FromArgs(string[] args, string msbuildPath = null) parseResult.ShowHelpOrErrorIfAppropriate(); + if (parseResult.HasOption(BuildCommandParser.SelfContainedOption) && + parseResult.HasOption(BuildCommandParser.NoSelfContainedOption)) + { + throw new GracefulException(Publish.LocalizableStrings.SelfContainAndNoSelfContainedConflict); + } + msbuildArgs.Add($"-consoleloggerparameters:Summary"); if (parseResult.HasOption(BuildCommandParser.NoIncrementalOption)) diff --git a/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs b/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs index 668c03a99d6f..e4c77b166afc 100644 --- a/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs @@ -31,6 +31,10 @@ internal static class BuildCommandParser public static readonly Option NoRestoreOption = CommonOptions.NoRestoreOption(); + public static readonly Option SelfContainedOption = CommonOptions.SelfContainedOption(); + + public static readonly Option NoSelfContainedOption = CommonOptions.NoSelfContainedOption(); + public static Command GetCommand() { var command = new Command("build", LocalizableStrings.AppFullName); @@ -49,6 +53,8 @@ public static Command GetCommand() command.AddOption(NoIncrementalOption); command.AddOption(NoDependenciesOption); command.AddOption(NoLogoOption); + command.AddOption(SelfContainedOption); + command.AddOption(NoSelfContainedOption); return command; } diff --git a/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx index afe5d1ae9bd4..0f122144787a 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx @@ -135,10 +135,6 @@ The path to a target manifest file that contains the list of packages to be excluded from the publish step. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Do not build the project before publishing. Implies --no-restore. @@ -155,9 +151,6 @@ The default is to publish a framework-dependent application. Do not display the startup banner or the copyright message. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. diff --git a/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs b/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs index 6fb7479b5b87..5e7f0da4bace 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs @@ -31,17 +31,15 @@ internal static class PublishCommandParser public static readonly Option NoBuildOption = new ForwardedOption("--no-build", LocalizableStrings.NoBuildOptionDescription) .ForwardAs("-property:NoBuild=true"); - public static readonly Option SelfContainedOption = new ForwardedOption("--self-contained", LocalizableStrings.SelfContainedOptionDescription) - .ForwardAsSingle(o => $"-property:SelfContained={o}"); - - public static readonly Option NoSelfContainedOption = new ForwardedOption("--no-self-contained", LocalizableStrings.NoSelfContainedOptionDescription) - .ForwardAs("-property:SelfContained=false"); - public static readonly Option NoLogoOption = new ForwardedOption("--nologo", LocalizableStrings.CmdNoLogo) .ForwardAs("-nologo"); public static readonly Option NoRestoreOption = CommonOptions.NoRestoreOption(); + public static readonly Option SelfContainedOption = CommonOptions.SelfContainedOption(); + + public static readonly Option NoSelfContainedOption = CommonOptions.NoSelfContainedOption(); + public static Command GetCommand() { var command = new Command("publish", LocalizableStrings.AppDescription); diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf index 9cd8a9022177..83769c9d6a3e 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf @@ -22,11 +22,6 @@ Cílová architektura pro publikování. Cílová architektura musí být zadaná v souboru projektu. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publikujte svoji aplikaci jako aplikaci závislou na architektuře bez modulu runtime .NET. Aby bylo možné vaši aplikaci spustit, musí být nainstalovaný podporovaný modul runtime .NET. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ Ve výchozím nastavení je publikována aplikace závislá na architektuře.Možnosti --self-contained a --no-self-contained jsou vzájemně konfliktní. Zadejte pouze jednu z nich. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Publikujte se svou aplikací modul runtime pro .NET, aby ho nebylo nutné instalovat na cílovém počítači. -Pokud se zadá identifikátor modulu runtime, výchozí hodnota je true. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf index a5241fc3de6f..eb06ad2ce574 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf @@ -22,11 +22,6 @@ Das Zielframework für die Veröffentlichung. Das Zielframework muss in der Projektdatei angegeben werden. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Hiermit wird Ihre Anwendung als Framework-abhängige Anwendung ohne .NET-Runtime veröffentlicht. Es muss eine unterstützte .NET-Runtime installiert sein, um Ihre Anwendung auszuführen. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ Standardmäßig wird eine Framework-abhängige Anwendung veröffentlicht.Die Optionen "--self-contained" und "--no-self-contained" stehen in Konflikt zueinander. Geben Sie nur eine der Optionen an. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Hiermit wird die .NET-Runtime mit Ihrer Anwendung veröffentlicht, sodass die Runtime nicht auf dem Zielcomputer installiert werden muss. -Der Standardwert lautet TRUE, wenn eine Runtime-ID angegeben wird. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf index 89173542d05e..188463e3e824 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf @@ -22,11 +22,6 @@ La plataforma de destino para la que se publica. La plataforma de destino se debe especificar en el archivo de proyecto. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publique la aplicación como dependiente del marco de trabajo sin el entorno de ejecución .NET. Para ejecutar la aplicación, debe instalarse un entorno de ejecución .NET admitido. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ El valor predeterminado es publicar una aplicación dependiente del marco.Las opciones "--self-contained" y "--no-self-contained" están en conflicto entre sí. Especifique solo una de ellas. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Publique el entorno de ejecución .NET con la aplicación para que no sea necesario instalar dicho entorno en la máquina de destino. -El valor predeterminado es "true" si se especifica un identificador de entorno de ejecución. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf index a6821df5a406..c0cb8b579279 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf @@ -22,11 +22,6 @@ Framework cible pour lequel la publication est effectuée. Le framework cible doit être spécifié dans le fichier projet. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publiez votre application en tant qu'application dépendante du framework sans le runtime .NET. Vous devez installer un runtime .NET pris en charge pour permettre l'exécution de votre application. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ La valeur par défaut est de publier une application dépendante du framework.Les options '--self-contained' et '--no-self-contained' sont en conflit. Spécifiez uniquement l'une de ces options. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Publiez le runtime .NET avec votre application pour éviter à l'utilisateur de l'installer sur la machine cible. -La valeur par défaut est 'true' si un identificateur de runtime est spécifié. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf index 7b987500a79b..93a17da55431 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf @@ -22,11 +22,6 @@ Framework di destinazione per cui eseguire la pubblicazione. Il framework di destinazione deve essere specificato nel file di progetto. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Pubblica l'applicazione come applicazione dipendente dal framework senza il runtime .NET. Per eseguire l'applicazione, è necessario installare un runtime .NET supportato. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ Per impostazione predefinita, viene generato un pacchetto dipendente dal framewo Le opzioni '--self-contained' e '--no-self-contained' sono in conflitto tra loro. Specificare una sola delle opzioni. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Pubblica il runtime .NET con l'applicazione in modo che non sia necessario installarlo nel computer di destinazione. -L'impostazione predefinita è 'true' se si specifica un identificatore di runtime. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf index c6a55337eadc..bda2252f75f0 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf @@ -22,11 +22,6 @@ 公開する対象のターゲット フレームワーク。ターゲット フレームワークはプロジェクト ファイルで指定する必要があります。 - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - .NET ランタイムを使用せずに、アプリケーションをフレームワーク依存アプリケーションとして公開します。アプリケーションを実行するには、サポートされている .NET ランタイムをインストールする必要があります。 - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ The default is to publish a framework-dependent application. '--self-contained' と '--no-self-contained' オプションは競合しています。いずれかのオプションのみを指定してください。 - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - ランタイムをターゲット マシンにインストールする必要がないように、アプリケーションと一緒に .NET ランタイムを発行します。 -ランタイム識別子が指定されている場合、既定値は 'true' です。 - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf index ea7c3ff3dd84..25442a3a6f32 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf @@ -22,11 +22,6 @@ 게시할 대상 프레임워크입니다. 대상 프레임워크는 프로젝트 파일에서 지정해야 합니다. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - .NET 런타임 없이 애플리케이션을 프레임워크 종속 애플리케이션으로 게시합니다. 애플리케이션을 실행하려면 지원되는 .NET 런타임을 설치해야 합니다. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ The default is to publish a framework-dependent application. '--self-contained' 옵션과 '--no-self-contained' 옵션이 서로 충돌합니다. 해당 옵션 중 하나만 지정하세요. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - 대상 머신에 런타임을 설치할 필요가 없도록 애플리케이션과 함께 .NET 런타임을 게시합니다. -런타임 식별자를 지정한 경우 기본값은 'true'입니다. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf index 988bda212118..56a7983bcca9 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf @@ -22,11 +22,6 @@ Platforma docelowa publikacji. Platforma docelowa musi być określona w pliku projektu. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Opublikuj aplikację jako aplikację zależną od struktury bez środowiska uruchomieniowego .NET. Aby uruchomić aplikację, należy zainstalować obsługiwane środowisko uruchomieniowe .NET. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ Domyślnie publikowana jest aplikacja zależna od struktury. Występuje konflikt między opcjami „--self-contained” i „--no-self-contained”. Określ tylko jedną z tych opcji. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Opublikuj środowisko uruchomieniowe platformy .NET ze swoją aplikacją, aby nie trzeba było go instalować na maszynie docelowej. -Jeśli określony jest identyfikator środowiska uruchomieniowego, wartość domyślna to „true”. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf index 9e4ac47431e3..18e0fce6ff0a 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf @@ -22,11 +22,6 @@ A estrutura de destino da publicação. A estrutura de destino precisa ser especificada no arquivo de projeto. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publique o seu aplicativo como um aplicativo dependente de estrutura sem o runtime do .NET. Um runtime do .NET com suporte precisa ser instalado para executar o aplicativo. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ O padrão é publicar uma aplicação dependente de framework. As opções '--self-contained' e '--no-self-contained' são conflitantes entre si. Especifique apenas uma das opções. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Publique o runtime do .NET com seu aplicativo para que ele não precise estar instalado no computador de destino. -O padrão é 'true' se um identificador de runtime for especificado. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf index b0552dd80e04..d407a293ad09 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf @@ -22,11 +22,6 @@ Целевая платформа публикации. Целевая платформа должна быть указана в файле проекта. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Публикация приложения как зависимого от платформы без среды выполнения .NET. Для запуска приложения необходимо установить поддерживаемую среду выполнения .NET. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ The default is to publish a framework-dependent application. Параметры "--self-contained" и "--no-self-contained" конфликтуют друг с другом. Укажите только один из параметров. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Публикация среды выполнения .NET вместе с вашим приложением, чтобы ее не пришлось устанавливать на целевом компьютере. -Значение по умолчанию — "true", если указан идентификатор среды выполнения. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf index 7fa807b6e6da..67da518d0ad5 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf @@ -22,11 +22,6 @@ Yayımlamanın yapılacağı hedef çerçeve. Hedef çerçevenin proje dosyasında belirtilmesi gerekir. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Uygulamanızı .NET çalışma zamanı olmadan çerçeveye bağımlı bir uygulama olarak yayımlayın. Uygulamanızı çalıştırmak için desteklenen bir .NET çalışma zamanı yüklenmelidir. - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ Varsayılan durum, çerçeveye bağımlı bir uygulama yayımlamaktır. '--self-contained' ve '--no-self-contained' seçenekleri birbiriyle çakışır. Seçeneklerden yalnızca birini belirtin. - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - Uygulamanızla birlikte .NET çalışma zamanını yayımladığınızda hedef makinede çalışma zamanının yüklü olması gerekmez. -Çalışma zamanı tanımlayıcısı belirtildiyse varsayılan değer 'true' olur. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf index 4b6151cc8e1e..6ab00c404abb 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf @@ -22,11 +22,6 @@ 要发布的目标框架。必须在项目文件中指定目标框架。 - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - 在没有 .NET 运行时的情况下将应用程序发布为依赖框架的应用程序。必须安装受支持的 .NET 运行时才能运行该应用程序。 - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ The default is to publish a framework-dependent application. "--self-contained" 和 "--no-self-contained" 选项彼此冲突。请仅指定其中一个选项。 - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - 随应用程序一起发布 .NET 运行时,这样就不需要在目标计算机上安装运行时。 -如果指定了运行时标识符,则默认值为 "true"。 - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf index 950577e9c0c2..f39f7ee157d2 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf @@ -22,11 +22,6 @@ 要為其進行發佈的目標架構。該架構必須在專案檔中指定。 - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - 將您的應用程式發佈為不含 .NET 執行階段的架構相依應用程式。必須安裝支援的 .NET 執行階段才能執行您的應用程式。 - - OUTPUT_DIR OUTPUT_DIR @@ -69,13 +64,6 @@ The default is to publish a framework-dependent application. '--self-contained' 與 '--no-self-contained' 選項互相衝突。請僅指定其中一個選項。 - - Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. -The default is 'true' if a runtime identifier is specified. - 將 .NET 執行階段發佈於您的應用程式中,以便目標電腦不必安裝執行階段。 -如有指定執行階段識別碼,則預設為 'true'。 - - \ No newline at end of file diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index 951a67947d6f..d7573418e45f 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" V {0} se našlo několik projektů. Vyberte, který z nich chcete použít. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. Projekt už obsahuje odkaz na {0}. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Balíček + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Řešení diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index 493080b0b040..e38a919c18b5 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" In "{0}" wurden mehrere Projekte gefunden. Geben Sie an, welches davon verwendet werden soll. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. Für das Projekt ist bereits ein Verweis auf "{0}" vorhanden. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Paket + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Projektmappe diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index 9d607944e847..9dc7469dcabe 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" Se han encontrado varios proyectos en "{0}". Especifique el que debe usarse. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. El proyecto ya tiene una referencia a "{0}". @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Paquete + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Solución diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index f24316d351b9..c17a206be250 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" Plusieurs projets dans '{0}'. Spécifiez celui à utiliser. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. Le projet a déjà une référence à '{0}'. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Package + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Solution diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index b4a39729943b..684d3213f900 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" Sono stati trovati più progetti in `{0}`. Specificare quello da usare. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. Per il progetto esiste già un riferimento a `{0}`. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Pacchetto + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Soluzione diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index ec5a1ebdbab9..3102d3be80d2 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" `{0}` に複数のプロジェクトが見つかりました。使用するプロジェクトを指定してください。 + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. プロジェクトには既に `{0}` への参照が指定されています。 @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" パッケージ + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution ソリューション diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index 029d37bc5cc9..19bb25222245 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" '{0}'에서 프로젝트를 두 개 이상 찾았습니다. 사용할 프로젝트를 지정하세요. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. 프로젝트에 이미 '{0}'에 대한 참조가 있습니다. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" 패키지 + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution 솔루션 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index 30a537f25947..a3fc3bed516e 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" Znaleziono więcej niż jeden projekt w lokalizacji „{0}”. Określ, który ma zostać użyty. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. Projekt zawiera już odwołanie do elementu „{0}”. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Pakiet + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Rozwiązanie diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 5e5320217a24..5471e7a0f995 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" Foi encontrado mais de um projeto em ‘{0}’. Especifique qual deve ser usado. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. O projeto já tem uma referência a ‘{0}’. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Pacote + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Solução diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index 2e4407d8192e..38e1974fc910 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" Найдено несколько проектов в "{0}". Выберите один. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. Проект уже содержит ссылку на "{0}". @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Пакет + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Решение diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 4e24e55d8e79..e2ca5ecf4c8b 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" `{0}` içinde birden fazla proje bulundu. Hangisinin kullanılacağını belirtin. + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. Projede `{0}` başvurusu zaten var. @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" Paket + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution Çözüm diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 752b5f3af75b..3ded0fd8990a 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -80,6 +80,11 @@ EOF 在“{0}”中找到多个项目。请指定使用哪一个。 + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. 项目已经具有对“{0}”的引用。 @@ -135,6 +140,13 @@ EOF 打包 + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution 解决方案 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index f103b9bbdf13..fd790fbe9fa0 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -80,6 +80,11 @@ export PATH="$PATH:{0}" 在 `{0}` 中找到多個專案。請指定要使用的專案。 + + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Project already has a reference to `{0}`. 專案已經有 `{0}` 的參考。 @@ -135,6 +140,13 @@ export PATH="$PATH:{0}" 套件 + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. +The default is 'true' if a runtime identifier is specified. + + Solution 解決方案 From 6e5d565d298f01d0e660a66a3633dcd7f2c1a2a3 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 9 Jul 2021 15:05:18 -0700 Subject: [PATCH 2/8] Warn in using -r without self contained for net 6+ --- src/Cli/dotnet/CommonLocalizableStrings.resx | 6 +++ src/Cli/dotnet/CommonOptions.cs | 33 ++++++++++++ src/Cli/dotnet/MsbuildProject.cs | 13 +++++ .../commands/dotnet-build/BuildCommand.cs | 9 ++-- .../dotnet-build/BuildCommandParser.cs | 4 +- .../dotnet-publish/LocalizableStrings.resx | 3 -- .../dotnet/commands/dotnet-publish/Program.cs | 9 ++-- .../dotnet-publish/PublishCommandParser.cs | 4 +- .../xlf/LocalizableStrings.cs.xlf | 5 -- .../xlf/LocalizableStrings.de.xlf | 5 -- .../xlf/LocalizableStrings.es.xlf | 5 -- .../xlf/LocalizableStrings.fr.xlf | 5 -- .../xlf/LocalizableStrings.it.xlf | 5 -- .../xlf/LocalizableStrings.ja.xlf | 5 -- .../xlf/LocalizableStrings.ko.xlf | 5 -- .../xlf/LocalizableStrings.pl.xlf | 5 -- .../xlf/LocalizableStrings.pt-BR.xlf | 5 -- .../xlf/LocalizableStrings.ru.xlf | 5 -- .../xlf/LocalizableStrings.tr.xlf | 5 -- .../xlf/LocalizableStrings.zh-Hans.xlf | 5 -- .../xlf/LocalizableStrings.zh-Hant.xlf | 5 -- .../xlf/CommonLocalizableStrings.cs.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.de.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.es.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.fr.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.it.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.ja.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.ko.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.pl.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.pt-BR.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.ru.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.tr.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.zh-Hans.xlf | 10 ++++ .../xlf/CommonLocalizableStrings.zh-Hant.xlf | 10 ++++ .../GivenDotnetBuildBuildsCsproj.cs | 50 +++++++++++++++++++ .../GivenDotnetPublishPublishesProjects.cs | 3 +- 36 files changed, 248 insertions(+), 81 deletions(-) diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx index 73037a3e847c..3c32f4d2b207 100644 --- a/src/Cli/dotnet/CommonLocalizableStrings.resx +++ b/src/Cli/dotnet/CommonLocalizableStrings.resx @@ -681,4 +681,10 @@ The default is 'true' if a runtime identifier is specified. Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs index 968642ef6228..3e83c75f7348 100644 --- a/src/Cli/dotnet/CommonOptions.cs +++ b/src/Cli/dotnet/CommonOptions.cs @@ -6,6 +6,11 @@ using System.CommandLine; using System.IO; using Microsoft.DotNet.Tools.Common; +using System.Collections.Generic; +using Microsoft.DotNet.Cli.Utils; +using System.Linq; +using Microsoft.Build.Evaluation; +using NuGet.Frameworks; namespace Microsoft.DotNet.Cli { @@ -112,6 +117,34 @@ public static bool VerbosityIsDetailedOrDiagnostic(this VerbosityOptions verbosi verbosity.Equals(VerbosityOptions.d) || verbosity.Equals(VerbosityOptions.detailed); } + + public static void ValidateSelfContainedOptions(bool hasSelfContainedOption, bool hasNoSelfContainedOption, bool hasRuntimeOption, IEnumerable projectArgs) + { + if (hasSelfContainedOption && hasNoSelfContainedOption) + { + throw new GracefulException(CommonLocalizableStrings.SelfContainAndNoSelfContainedConflict); + } + + if (!(hasSelfContainedOption || hasNoSelfContainedOption) && hasRuntimeOption) + { + projectArgs = projectArgs.Any() ? projectArgs : new string[] { Directory.GetCurrentDirectory() }; + foreach (var project in projectArgs) + { + try + { + var msbuildProj = MsbuildProject.FromFileOrDirectory(new ProjectCollection(), project, false); + if (msbuildProj.IsTargetingNetCoreVersionOrAbove(NuGetFramework.Parse("net6.0"))) + { + Reporter.Output.WriteLine(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained.Yellow()); + } + } + catch + { + // Project file is not valid, continue and msbuild will error + } + } + } + } } public enum VerbosityOptions diff --git a/src/Cli/dotnet/MsbuildProject.cs b/src/Cli/dotnet/MsbuildProject.cs index 105fe608cc46..4270dbe65f07 100644 --- a/src/Cli/dotnet/MsbuildProject.cs +++ b/src/Cli/dotnet/MsbuildProject.cs @@ -205,6 +205,19 @@ public bool IsTargetingFramework(NuGetFramework framework) return false; } + public bool IsTargetingNetCoreVersionOrAbove(NuGetFramework framework) + { + foreach (var tfm in GetTargetFrameworks()) + { + if (tfm.Framework.Equals(".NETCoreApp") && tfm.Version >= framework.Version) + { + return true; + } + } + + return false; + } + private Project GetEvaluatedProject() { try diff --git a/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs b/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs index bbfd00dc5e05..87f2f8955053 100644 --- a/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs @@ -32,11 +32,10 @@ public static BuildCommand FromArgs(string[] args, string msbuildPath = null) parseResult.ShowHelpOrErrorIfAppropriate(); - if (parseResult.HasOption(BuildCommandParser.SelfContainedOption) && - parseResult.HasOption(BuildCommandParser.NoSelfContainedOption)) - { - throw new GracefulException(Publish.LocalizableStrings.SelfContainAndNoSelfContainedConflict); - } + CommonOptions.ValidateSelfContainedOptions(parseResult.HasOption(BuildCommandParser.SelfContainedOption), + parseResult.HasOption(BuildCommandParser.NoSelfContainedOption), + parseResult.HasOption(BuildCommandParser.RuntimeOption), + parseResult.ValueForArgument>(BuildCommandParser.SlnOrProjectArgument) ?? Array.Empty()); msbuildArgs.Add($"-consoleloggerparameters:Summary"); diff --git a/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs b/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs index e4c77b166afc..2ddc0bb9c3b1 100644 --- a/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs @@ -35,6 +35,8 @@ internal static class BuildCommandParser public static readonly Option NoSelfContainedOption = CommonOptions.NoSelfContainedOption(); + public static readonly Option RuntimeOption = CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription); + public static Command GetCommand() { var command = new Command("build", LocalizableStrings.AppFullName); @@ -43,7 +45,7 @@ public static Command GetCommand() RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: false, includeNoDependenciesOption: false); command.AddOption(CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription)); command.AddOption(CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription)); - command.AddOption(CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription)); + command.AddOption(RuntimeOption); command.AddOption(CommonOptions.VersionSuffixOption()); command.AddOption(NoRestoreOption); command.AddOption(CommonOptions.InteractiveMsBuildForwardOption()); diff --git a/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx index 0f122144787a..4cf239b7dde9 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-publish/LocalizableStrings.resx @@ -151,7 +151,4 @@ The default is to publish a framework-dependent application. Do not display the startup banner or the copyright message. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - diff --git a/src/Cli/dotnet/commands/dotnet-publish/Program.cs b/src/Cli/dotnet/commands/dotnet-publish/Program.cs index 1ba71ef0a2c9..457ced01161f 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-publish/Program.cs @@ -35,11 +35,10 @@ public static PublishCommand FromArgs(string[] args, string msbuildPath = null) msbuildArgs.Add("-target:Publish"); - if (parseResult.HasOption(PublishCommandParser.SelfContainedOption) && - parseResult.HasOption(PublishCommandParser.NoSelfContainedOption)) - { - throw new GracefulException(LocalizableStrings.SelfContainAndNoSelfContainedConflict); - } + CommonOptions.ValidateSelfContainedOptions(parseResult.HasOption(PublishCommandParser.SelfContainedOption), + parseResult.HasOption(PublishCommandParser.NoSelfContainedOption), + parseResult.HasOption(PublishCommandParser.RuntimeOption), + parseResult.ValueForArgument>(PublishCommandParser.SlnOrProjectArgument) ?? Array.Empty()); msbuildArgs.AddRange(parseResult.OptionValuesToBeForwarded(PublishCommandParser.GetCommand())); diff --git a/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs b/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs index 5e7f0da4bace..4d4f32085f7e 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-publish/PublishCommandParser.cs @@ -40,6 +40,8 @@ internal static class PublishCommandParser public static readonly Option NoSelfContainedOption = CommonOptions.NoSelfContainedOption(); + public static readonly Option RuntimeOption = CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription); + public static Command GetCommand() { var command = new Command("publish", LocalizableStrings.AppDescription); @@ -53,7 +55,7 @@ public static Command GetCommand() command.AddOption(NoSelfContainedOption); command.AddOption(NoLogoOption); command.AddOption(CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription)); - command.AddOption(CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription)); + command.AddOption(RuntimeOption); command.AddOption(CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription)); command.AddOption(CommonOptions.VersionSuffixOption()); command.AddOption(CommonOptions.InteractiveMsBuildForwardOption()); diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf index 83769c9d6a3e..2f8acca4af7f 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf @@ -59,11 +59,6 @@ Ve výchozím nastavení je publikována aplikace závislá na architektuře.Konfigurace pro publikování. Výchozí možností pro většinu projektů je Debug. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - Možnosti --self-contained a --no-self-contained jsou vzájemně konfliktní. Zadejte pouze jednu z nich. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf index eb06ad2ce574..3decb88fb67e 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf @@ -59,11 +59,6 @@ Standardmäßig wird eine Framework-abhängige Anwendung veröffentlicht.Die Konfiguration für die Veröffentlichung. Der Standardwert für die meisten Projekte ist "Debug". - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - Die Optionen "--self-contained" und "--no-self-contained" stehen in Konflikt zueinander. Geben Sie nur eine der Optionen an. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf index 188463e3e824..1477c2b4d617 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf @@ -59,11 +59,6 @@ El valor predeterminado es publicar una aplicación dependiente del marco.La configuración para la que se publica. El valor predeterminado para la mayoría de los proyectos es "Debug". - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - Las opciones "--self-contained" y "--no-self-contained" están en conflicto entre sí. Especifique solo una de ellas. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf index c0cb8b579279..2d4bcda7a532 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf @@ -59,11 +59,6 @@ La valeur par défaut est de publier une application dépendante du framework.Configuration pour laquelle la publication est effectuée. La valeur par défaut pour la plupart des projets est 'Debug'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - Les options '--self-contained' et '--no-self-contained' sont en conflit. Spécifiez uniquement l'une de ces options. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf index 93a17da55431..92a894296033 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf @@ -59,11 +59,6 @@ Per impostazione predefinita, viene generato un pacchetto dipendente dal framewo Configurazione per cui eseguire la pubblicazione. L'impostazione predefinita per la maggior parte dei progetti è 'Debug'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - Le opzioni '--self-contained' e '--no-self-contained' sono in conflitto tra loro. Specificare una sola delle opzioni. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf index bda2252f75f0..c652700f20fe 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf @@ -59,11 +59,6 @@ The default is to publish a framework-dependent application. 公開する対象の構成。大部分のプロジェクトで、既定値は 'Debug' です。 - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - '--self-contained' と '--no-self-contained' オプションは競合しています。いずれかのオプションのみを指定してください。 - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf index 25442a3a6f32..f55e0bf59313 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf @@ -59,11 +59,6 @@ The default is to publish a framework-dependent application. 게시할 구성입니다. 대부분의 프로젝트에서 기본값은 'Debug'입니다. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - '--self-contained' 옵션과 '--no-self-contained' 옵션이 서로 충돌합니다. 해당 옵션 중 하나만 지정하세요. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf index 56a7983bcca9..7a139a9f64e0 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf @@ -59,11 +59,6 @@ Domyślnie publikowana jest aplikacja zależna od struktury. Konfiguracja, dla której ma być wykonane publikowanie. W przypadku większości projektów ustawienie domyślne to „Debugowanie”. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - Występuje konflikt między opcjami „--self-contained” i „--no-self-contained”. Określ tylko jedną z tych opcji. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf index 18e0fce6ff0a..12a432daaf7b 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf @@ -59,11 +59,6 @@ O padrão é publicar uma aplicação dependente de framework. A configuração para a qual a publicação ocorrerá. O padrão para a maioria dos projetos é 'Debug'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - As opções '--self-contained' e '--no-self-contained' são conflitantes entre si. Especifique apenas uma das opções. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf index d407a293ad09..ed1a697e75c5 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf @@ -59,11 +59,6 @@ The default is to publish a framework-dependent application. Конфигурация для публикации. По умолчанию для большинства проектов используется "Debug". - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - Параметры "--self-contained" и "--no-self-contained" конфликтуют друг с другом. Укажите только один из параметров. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf index 67da518d0ad5..6f7f23cf8209 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf @@ -59,11 +59,6 @@ Varsayılan durum, çerçeveye bağımlı bir uygulama yayımlamaktır. Yayımlanacak yapılandırma. Çoğu proje için varsayılan, ‘Hata Ayıklama’ seçeneğidir. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - '--self-contained' ve '--no-self-contained' seçenekleri birbiriyle çakışır. Seçeneklerden yalnızca birini belirtin. - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf index 6ab00c404abb..87d6b7d341b4 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf @@ -59,11 +59,6 @@ The default is to publish a framework-dependent application. 要发布的配置。大多数项目的默认值是 "Debug"。 - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - "--self-contained" 和 "--no-self-contained" 选项彼此冲突。请仅指定其中一个选项。 - - \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf index f39f7ee157d2..0174c85c9804 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf @@ -59,11 +59,6 @@ The default is to publish a framework-dependent application. 要為其進行發佈的組態。大部分的專案預設為「偵錯」。 - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - '--self-contained' 與 '--no-self-contained' 選項互相衝突。請僅指定其中一個選項。 - - \ No newline at end of file diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index d7573418e45f..102d7ab7c74f 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Balíček + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index e38a919c18b5..136561b88012 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Paket + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index 9dc7469dcabe..7c14c0eaf468 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Paquete + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index c17a206be250..ed83b5ddda90 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Package + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index 684d3213f900..1bc4544ccdae 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Pacchetto + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index 3102d3be80d2..bbe7fa1f34b3 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" パッケージ + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index 19bb25222245..5133f822c208 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" 패키지 + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index a3fc3bed516e..99ee4e501697 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Pakiet + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 5471e7a0f995..929c294f093e 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Pacote + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index 38e1974fc910..9fb1fee127be 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Пакет + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index e2ca5ecf4c8b..91078443f230 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" Paket + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 3ded0fd8990a..717c06a50529 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -140,6 +140,16 @@ EOF 打包 + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index fd790fbe9fa0..7c7ed47042f8 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -140,6 +140,16 @@ export PATH="$PATH:{0}" 套件 + + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + + + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. diff --git a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index 0ae3ec963e18..75fb70813c93 100644 --- a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -11,6 +11,7 @@ using Microsoft.NET.TestFramework.Assertions; using Microsoft.NET.TestFramework.Commands; using Xunit.Abstractions; +using Microsoft.DotNet.Tools; namespace Microsoft.DotNet.Cli.Build.Tests { @@ -172,5 +173,54 @@ public void DotnetBuildDoesNotPrintCopyrightInfo() cmd.Should().NotHaveStdOutContaining("Copyright (C) Microsoft Corporation. All rights reserved."); } } + + [Fact] + public void It_warns_on_rid_without_self_contained_options() + { + var testInstance = _testAssetsManager.CopyTestAsset("HelloWorld") + .WithSource() + .WithTargetFrameworkOrFrameworks("net6.0", false) + .Restore(Log); + + new DotnetBuildCommand(Log) + .WithWorkingDirectory(testInstance.Path) + .Execute("-r", "win-x64") + .Should() + .Pass() + .And + .HaveStdOutContaining(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained); + } + + [Fact] + public void It_does_not_warn_on_rid_with_self_contained_options() + { + var testInstance = _testAssetsManager.CopyTestAsset("HelloWorld") + .WithSource() + .Restore(Log); + + new DotnetBuildCommand(Log) + .WithWorkingDirectory(testInstance.Path) + .Execute("-r", "win-x64", "--self-contained") + .Should() + .Pass() + .And + .NotHaveStdOutContaining(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained); + } + + [Fact] + public void It_does_not_warn_on_rid_with_self_contained_options_prior_to_net6() + { + var testInstance = _testAssetsManager.CopyTestAsset("HelloWorld") + .WithSource() + .Restore(Log); + + new DotnetBuildCommand(Log) + .WithWorkingDirectory(testInstance.Path) + .Execute("-r", "win-x64") + .Should() + .Pass() + .And + .NotHaveStdOutContaining(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained); + } } } diff --git a/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index d116ed7445f7..579d1604b860 100644 --- a/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -6,6 +6,7 @@ using System.Runtime.CompilerServices; using FluentAssertions; using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Tools; using Microsoft.NET.TestFramework; using Microsoft.NET.TestFramework.Assertions; using Microsoft.NET.TestFramework.Commands; @@ -181,7 +182,7 @@ public void ItFailsToPublishWithConflictingArgument(string args) .WithWorkingDirectory(testProjectDirectory) .Execute(args.Split()) .Should().Fail() - .And.HaveStdErrContaining(LocalizableStrings.SelfContainAndNoSelfContainedConflict); + .And.HaveStdErrContaining(CommonLocalizableStrings.SelfContainAndNoSelfContainedConflict); } private DirectoryInfo PublishApp(string testAppName, string rid, string args = null, [CallerMemberName] string callingMethod = "") From 69d3e6c515ae3143a8b08604277eff73ebbf18ff Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Mon, 12 Jul 2021 10:18:26 -0700 Subject: [PATCH 3/8] PR feedback --- src/Cli/dotnet/CommonLocalizableStrings.resx | 8 ++++---- src/Cli/dotnet/CommonOptions.cs | 4 ++-- .../xlf/CommonLocalizableStrings.cs.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.de.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.es.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.fr.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.it.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.ja.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.ko.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.pl.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.pt-BR.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.ru.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.tr.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.zh-Hans.xlf | 20 +++++++++---------- .../xlf/CommonLocalizableStrings.zh-Hant.xlf | 20 +++++++++---------- .../GivenDotnetBuildBuildsCsproj.cs | 6 +++--- 16 files changed, 139 insertions(+), 139 deletions(-) diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx index 3c32f4d2b207..2b030d30c942 100644 --- a/src/Cli/dotnet/CommonLocalizableStrings.resx +++ b/src/Cli/dotnet/CommonLocalizableStrings.resx @@ -678,13 +678,13 @@ setx PATH "%PATH%;{0}" Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'true' if a runtime identifier is specified. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs index 3e83c75f7348..df341c4dee52 100644 --- a/src/Cli/dotnet/CommonOptions.cs +++ b/src/Cli/dotnet/CommonOptions.cs @@ -107,7 +107,7 @@ public static Option SelfContainedOption() => public static Option NoSelfContainedOption() => new ForwardedOption( "--no-self-contained", - CommonLocalizableStrings.NoSelfContainedOptionDescription) + CommonLocalizableStrings.FrameworkDependentOptionDescription) .ForwardAs("-property:SelfContained=false"); public static bool VerbosityIsDetailedOrDiagnostic(this VerbosityOptions verbosity) @@ -135,7 +135,7 @@ public static void ValidateSelfContainedOptions(bool hasSelfContainedOption, boo var msbuildProj = MsbuildProject.FromFileOrDirectory(new ProjectCollection(), project, false); if (msbuildProj.IsTargetingNetCoreVersionOrAbove(NuGetFramework.Parse("net6.0"))) { - Reporter.Output.WriteLine(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained.Yellow()); + Reporter.Output.WriteLine(CommonLocalizableStrings.SelfContainedOptionShouldBeUsedWithRuntime.Yellow()); } } catch diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index 102d7ab7c74f..afd5fe7cefdb 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. V {0} se našlo několik projektů. Vyberte, který z nich chcete použít. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. Projekt už obsahuje odkaz na {0}. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Balíček - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Řešení diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index 136561b88012..1bfc71a7ff40 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. In "{0}" wurden mehrere Projekte gefunden. Geben Sie an, welches davon verwendet werden soll. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. Für das Projekt ist bereits ein Verweis auf "{0}" vorhanden. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Paket - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Projektmappe diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index 7c14c0eaf468..e13ebc44e4d1 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. Se han encontrado varios proyectos en "{0}". Especifique el que debe usarse. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. El proyecto ya tiene una referencia a "{0}". @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Paquete - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Solución diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index ed83b5ddda90..9c1a46fc6625 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. Plusieurs projets dans '{0}'. Spécifiez celui à utiliser. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. Le projet a déjà une référence à '{0}'. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Package - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Solution diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index 1bc4544ccdae..4d65625ee3a3 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. Sono stati trovati più progetti in `{0}`. Specificare quello da usare. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. Per il progetto esiste già un riferimento a `{0}`. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Pacchetto - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Soluzione diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index bbe7fa1f34b3..27c6409ea1dc 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. `{0}` に複数のプロジェクトが見つかりました。使用するプロジェクトを指定してください。 - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. プロジェクトには既に `{0}` への参照が指定されています。 @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" パッケージ - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution ソリューション diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index 5133f822c208..a90ace3b0ffd 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. '{0}'에서 프로젝트를 두 개 이상 찾았습니다. 사용할 프로젝트를 지정하세요. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. 프로젝트에 이미 '{0}'에 대한 참조가 있습니다. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" 패키지 - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution 솔루션 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index 99ee4e501697..c7a5f3694bec 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. Znaleziono więcej niż jeden projekt w lokalizacji „{0}”. Określ, który ma zostać użyty. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. Projekt zawiera już odwołanie do elementu „{0}”. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Pakiet - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Rozwiązanie diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 929c294f093e..7faa03605b1e 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. Foi encontrado mais de um projeto em ‘{0}’. Especifique qual deve ser usado. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. O projeto já tem uma referência a ‘{0}’. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Pacote - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Solução diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index 9fb1fee127be..e8171ad87d23 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. Найдено несколько проектов в "{0}". Выберите один. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. Проект уже содержит ссылку на "{0}". @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Пакет - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Решение diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 91078443f230..f8f6e7fe950b 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. `{0}` içinde birden fazla proje bulundu. Hangisinin kullanılacağını belirtin. - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. Projede `{0}` başvurusu zaten var. @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" Paket - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution Çözüm diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 717c06a50529..d5bba617fd95 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -75,16 +75,16 @@ EOF + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. 在“{0}”中找到多个项目。请指定使用哪一个。 - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. 项目已经具有对“{0}”的引用。 @@ -140,11 +140,6 @@ EOF 打包 - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution 解决方案 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index 7c7ed47042f8..bdbb58bd4621 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -75,16 +75,16 @@ export PATH="$PATH:{0}" + + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. + + Found more than one project in `{0}`. Specify which one to use. 在 `{0}` 中找到多個專案。請指定要使用的專案。 - - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - Publish your application as a framework dependent application without the .NET runtime. A supported .NET runtime must be installed to run your application. - - Project already has a reference to `{0}`. 專案已經有 `{0}` 的參考。 @@ -140,11 +140,6 @@ export PATH="$PATH:{0}" 套件 - - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - Warning: The '-r|--runtime' option should be used with '--self-contained' or '--no-self-contained'. - - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. @@ -157,6 +152,11 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. + + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + + Solution 解決方案 diff --git a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index 75fb70813c93..f61eb2864a55 100644 --- a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -188,7 +188,7 @@ public void It_warns_on_rid_without_self_contained_options() .Should() .Pass() .And - .HaveStdOutContaining(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained); + .HaveStdOutContaining(CommonLocalizableStrings.SelfContainedOptionShouldBeUsedWithRuntime); } [Fact] @@ -204,7 +204,7 @@ public void It_does_not_warn_on_rid_with_self_contained_options() .Should() .Pass() .And - .NotHaveStdOutContaining(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained); + .NotHaveStdOutContaining(CommonLocalizableStrings.SelfContainedOptionShouldBeUsedWithRuntime); } [Fact] @@ -220,7 +220,7 @@ public void It_does_not_warn_on_rid_with_self_contained_options_prior_to_net6() .Should() .Pass() .And - .NotHaveStdOutContaining(CommonLocalizableStrings.RuntimeOptionShouldBeUsedWithSelfContained); + .NotHaveStdOutContaining(CommonLocalizableStrings.SelfContainedOptionShouldBeUsedWithRuntime); } } } From 6634faeded2fcbb66b2b280c85b82a126c48a0f3 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 16 Jul 2021 14:37:28 -0700 Subject: [PATCH 4/8] Move runtime cli option error to targets --- src/Cli/dotnet/CommonLocalizableStrings.resx | 3 -- src/Cli/dotnet/CommonOptions.cs | 29 ++----------------- src/Cli/dotnet/MsbuildProject.cs | 13 --------- .../xlf/CommonLocalizableStrings.cs.xlf | 5 ---- .../xlf/CommonLocalizableStrings.de.xlf | 5 ---- .../xlf/CommonLocalizableStrings.es.xlf | 5 ---- .../xlf/CommonLocalizableStrings.fr.xlf | 5 ---- .../xlf/CommonLocalizableStrings.it.xlf | 5 ---- .../xlf/CommonLocalizableStrings.ja.xlf | 5 ---- .../xlf/CommonLocalizableStrings.ko.xlf | 5 ---- .../xlf/CommonLocalizableStrings.pl.xlf | 5 ---- .../xlf/CommonLocalizableStrings.pt-BR.xlf | 5 ---- .../xlf/CommonLocalizableStrings.ru.xlf | 5 ---- .../xlf/CommonLocalizableStrings.tr.xlf | 5 ---- .../xlf/CommonLocalizableStrings.zh-Hans.xlf | 5 ---- .../xlf/CommonLocalizableStrings.zh-Hant.xlf | 5 ---- src/Tasks/Common/Resources/Strings.resx | 6 +++- 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 | 17 +++++++++++ .../GivenDotnetBuildBuildsCsproj.cs | 7 ++--- 32 files changed, 93 insertions(+), 112 deletions(-) diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx index 2b030d30c942..75189fd21aa5 100644 --- a/src/Cli/dotnet/CommonLocalizableStrings.resx +++ b/src/Cli/dotnet/CommonLocalizableStrings.resx @@ -684,7 +684,4 @@ The default is 'true' if a runtime identifier is specified. The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs index df341c4dee52..6a55a4fce87b 100644 --- a/src/Cli/dotnet/CommonOptions.cs +++ b/src/Cli/dotnet/CommonOptions.cs @@ -8,9 +8,6 @@ using Microsoft.DotNet.Tools.Common; using System.Collections.Generic; using Microsoft.DotNet.Cli.Utils; -using System.Linq; -using Microsoft.Build.Evaluation; -using NuGet.Frameworks; namespace Microsoft.DotNet.Cli { @@ -50,7 +47,7 @@ public static Option RuntimeOption(string description, bool withShortOption = tr description) { ArgumentHelpName = CommonLocalizableStrings.RuntimeIdentifierArgumentName - }.ForwardAsSingle(o => $"-property:RuntimeIdentifier={o}") + }.ForwardAsMany(o => new string[] { $"-property:RuntimeIdentifier={o}", "-property:_CommandLineDefinedRuntimeIdentifier=true" }) .AddSuggestions(Suggest.RunTimesFromProjectFile()); public static Option CurrentRuntimeOption(string description) => @@ -102,13 +99,13 @@ public static Option SelfContainedOption() => new ForwardedOption( "--self-contained", CommonLocalizableStrings.SelfContainedOptionDescription) - .ForwardAsSingle(o => $"-property:SelfContained={o}"); + .ForwardAsMany(o => new string[] { $"-property:SelfContained={o}", "-property:_CommandLineDefinedSelfContained=true" }); public static Option NoSelfContainedOption() => new ForwardedOption( "--no-self-contained", CommonLocalizableStrings.FrameworkDependentOptionDescription) - .ForwardAs("-property:SelfContained=false"); + .ForwardAsMany(o => new string[] { "-property:SelfContained=false", "-property:_CommandLineDefinedSelfContained=true" }); public static bool VerbosityIsDetailedOrDiagnostic(this VerbosityOptions verbosity) { @@ -124,26 +121,6 @@ public static void ValidateSelfContainedOptions(bool hasSelfContainedOption, boo { throw new GracefulException(CommonLocalizableStrings.SelfContainAndNoSelfContainedConflict); } - - if (!(hasSelfContainedOption || hasNoSelfContainedOption) && hasRuntimeOption) - { - projectArgs = projectArgs.Any() ? projectArgs : new string[] { Directory.GetCurrentDirectory() }; - foreach (var project in projectArgs) - { - try - { - var msbuildProj = MsbuildProject.FromFileOrDirectory(new ProjectCollection(), project, false); - if (msbuildProj.IsTargetingNetCoreVersionOrAbove(NuGetFramework.Parse("net6.0"))) - { - Reporter.Output.WriteLine(CommonLocalizableStrings.SelfContainedOptionShouldBeUsedWithRuntime.Yellow()); - } - } - catch - { - // Project file is not valid, continue and msbuild will error - } - } - } } } diff --git a/src/Cli/dotnet/MsbuildProject.cs b/src/Cli/dotnet/MsbuildProject.cs index 4270dbe65f07..105fe608cc46 100644 --- a/src/Cli/dotnet/MsbuildProject.cs +++ b/src/Cli/dotnet/MsbuildProject.cs @@ -205,19 +205,6 @@ public bool IsTargetingFramework(NuGetFramework framework) return false; } - public bool IsTargetingNetCoreVersionOrAbove(NuGetFramework framework) - { - foreach (var tfm in GetTargetFrameworks()) - { - if (tfm.Framework.Equals(".NETCoreApp") && tfm.Version >= framework.Version) - { - return true; - } - } - - return false; - } - private Project GetEvaluatedProject() { try diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index afd5fe7cefdb..fa4c51ac6dc9 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Řešení diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index 1bfc71a7ff40..0a16a2efe770 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Projektmappe diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index e13ebc44e4d1..b674ebde56c6 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Solución diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index 9c1a46fc6625..79c577affac0 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Solution diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index 4d65625ee3a3..f1bd09940a10 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Soluzione diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index 27c6409ea1dc..3a18d7ac0810 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution ソリューション diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index a90ace3b0ffd..056cda2c96a6 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution 솔루션 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index c7a5f3694bec..9af17fbcaab5 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Rozwiązanie diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 7faa03605b1e..0994b50c69d4 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Solução diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index e8171ad87d23..f5c0a32cc7fa 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Решение diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index f8f6e7fe950b..0355ff956d09 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution Çözüm diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index d5bba617fd95..0f9d54fb7190 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution 解决方案 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index bdbb58bd4621..32d86be88585 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -152,11 +152,6 @@ The default is 'true' if a runtime identifier is specified. The default is 'true' if a runtime identifier is specified. - - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - Warning: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - - Solution 解決方案 diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 08673edb1db0..62305edf8b60 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -811,7 +811,11 @@ To install these workloads, run the following command: {1} NETSDK1176: Placeholder {StrBegin="NETSDK1176: "} - This string is not used here, but is a placeholder for the error code, which is used by the "dotnet run" command. - + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + + NETSDK1177: Failed to sign apphost with error code {1}: {0} {StrBegin="NETSDK1177: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index c11134bceda8..f834ce89319c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: odkazovaný projekt „{0}“ je spustitelný soubor, který není samostatně obsažený. Na spustitelný soubor, který není samostatně obsažený, nelze odkazovat pomocí samostatně obsaženého spustitelného souboru. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: Cesty AdditionalProbingPaths byly zadány pro GenerateRuntimeConfigurationFiles, ale vynechávají se, protože RuntimeConfigDevPath je prázdné. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 6865fa914d19..0e3016fab9c1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: Das referenzierte Projekt "{0}" ist keine eigenständige ausführbare Datei. Der Verweis auf eine nicht eigenständige ausführbare Datei von einer eigenständigen ausführbaren Datei ist nicht möglich. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: Für GenerateRuntimeConfigurationFiles wurden "AdditionalProbingPaths" angegeben, sie werden jedoch übersprungen, weil "RuntimeConfigDevPath" leer ist. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 5ed642ba3109..336e1ac0c0d0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: el proyecto "{0}" al que se hace referencia es un ejecutable independiente. Un ejecutable independiente no puede hacer referencia a un archivo que no es independiente. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 7a67edfaebeb..ee1e2d9cf9d6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: le projet référencé « {0} » est un exécutable qui n’est pas autonome. Un exécutable non autonome ne peut pas être référencé par un exécutable autonome. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: Des 'AdditionalProbingPaths' ont été spécifiés pour GenerateRuntimeConfigurationFiles, mais ils sont ignorés, car 'RuntimeConfigDevPath' est vide. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 814351eb43a9..bf62b7002e8e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: il progetto '{0}' a cui viene fatto riferimento è un eseguibile non autonomo. Non è possibile fare riferimento a un eseguibile non autonomo da un eseguibile autonomo. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: per GenerateRuntimeConfigurationFiles è stato specificato 'AdditionalProbingPaths', ma questo valore verrà ignorato perché 'RuntimeConfigDevPath' è vuoto. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index d80316eb8562..6d30126fbf43 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: 参照先プロジェクト'{0}'は、自己完結型以外の実行可能ファイルです。は、自己完結型以外の実行可能ファイルは自己完結型の実行可能ファイルでは参照できません。 {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: 'AdditionalProbingPaths' が GenerateRuntimeConfigurationFiles に指定されましたが、'RuntimeConfigDevPath' が空であるためスキップされます。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 314eca754bf8..2732df853142 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: 참조된 프로젝트 '{0}'은(는) self-contained가 아닌 실행 파일입니다. self-contained가 아닌 실행 파일은 self-contained 실행 파일에서 참조할 수 없습니다. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: GenerateRuntimeConfigurationFiles에 대해 'AdditionalProbingPaths'가 지정되었지만 'RuntimeConfigDevPath'가 비어 있어서 건너뜁니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 8763c28b1cc5..0875afd93e20 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: projekt „{0}”, do którego istnieje odwołanie, nie jest samodzielnym plikiem wykonywalnym. Niesamodzielny plik wykonywalny nie może odwoływać się do samodzielnego pliku wykonywalnego. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: Dla elementu GenerateRuntimeConfigurationFiles określono ścieżki AdditionalProbingPaths, ale są one pomijane, ponieważ element „RuntimeConfigDevPath” jest pusty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 6d0c8608daaf..a133bd737a22 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: O projeto referenciado '{0}' é um executável não autossuficiente. Um executável não autossuficiente não pode ser referenciado por um executável autossuficiente. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: Os 'AdditionalProbingPaths' foram especificados para os GenerateRuntimeConfigurationFiles, mas estão sendo ignorados porque 'RuntimeConfigDevPath' está vazio. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 60da28514bb9..5fac3c034a42 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: проект "{0}", на который указывает ссылка, является неавтономным исполняемым файлом. Автономный исполняемый файл не может ссылаться на неавтономный исполняемый файл. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: для GenerateRuntimeConfigurationFiles были указаны пути "AdditionalProbingPaths", но они будут пропущены, так как "RuntimeConfigDevPath" пуст. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 3a53553d7b1f..a4a626e6356e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: Başvurulan '{0}' projesi kendi içinde çalıştırılabilir değil. Kendi içinde çalıştırılabilir olmayan, kendi içinde çalıştırılabilir olana başvuramaz. {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: GenerateRuntimeConfigurationFiles için 'AdditionalProbingPaths' belirtildi ancak 'RuntimeConfigDevPath' boş olduğundan atlanıyor. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 0a979192f4e9..cf41d80c28b2 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: 引用的项目“{0}”是非自包含可执行文件。自包含的可执行文件不能引用非自包含的可执行文件。 {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: "AdditionalProbingPaths" 被指定给 GenerateRuntimeConfigurationFiles,但被跳过,因为 "RuntimeConfigDevPath" 为空。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index f199482d1b24..d4b1d3ee6b27 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -735,6 +735,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1150: 參照的專案 '{0}' 是非獨立的可執行檔。獨立可執行檔無法參照非獨立的可執行檔。 {StrBegin="NETSDK1150: "} + + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. + {StrBegin="NETSDK1176: "} + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. NETSDK1048: 已為 GenerateRuntimeConfigurationFiles 指定了 'AdditionalProbingPaths',但因為 'RuntimeConfigDevPath' 是空的,所以已跳過它。 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 f4080f304418..d082f254ec2d 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 @@ -1073,6 +1073,23 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + + + + + + AfterTargets="_CheckForInvalidConfigurationAndPlatform" > Date: Tue, 20 Jul 2021 15:52:44 -0700 Subject: [PATCH 6/8] Update error message --- src/Cli/dotnet/CommonLocalizableStrings.resx | 2 +- src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf | 4 ++-- src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf | 4 ++-- .../dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf | 4 ++-- .../dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf | 4 ++-- src/Tasks/Common/Resources/Strings.resx | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 6 +++--- .../dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs | 6 +++--- 29 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx index 75189fd21aa5..1f287f09222f 100644 --- a/src/Cli/dotnet/CommonLocalizableStrings.resx +++ b/src/Cli/dotnet/CommonLocalizableStrings.resx @@ -682,6 +682,6 @@ The default is 'true' if a runtime identifier is specified. Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index fa4c51ac6dc9..de646affd25e 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index 0a16a2efe770..187e13e43001 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index b674ebde56c6..15982c755969 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index 79c577affac0..239e562b0134 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index f1bd09940a10..0415d37625cf 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index 3a18d7ac0810..5bca4fc81cc4 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index 056cda2c96a6..679bb2c09c9f 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index 9af17fbcaab5..87e6ad92ee69 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 0994b50c69d4..a9693dbaee34 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index f5c0a32cc7fa..85b8890d838d 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 0355ff956d09..321bf6a88ad6 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 0f9d54fb7190..43f0eedf09e3 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -141,8 +141,8 @@ EOF - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index 32d86be88585..fbfdc38886f7 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -141,8 +141,8 @@ export PATH="$PATH:{0}" - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. - The '--self-contained' and '--no-self-contained' options conflict with each other. Specify only one of the options. + The '--self-contained' and '--no-self-contained' options cannot be used together. + The '--self-contained' and '--no-self-contained' options cannot be used together. diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 62305edf8b60..123096535c20 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -810,10 +810,6 @@ To install these workloads, run the following command: {1} NETSDK1176: Placeholder {StrBegin="NETSDK1176: "} - This string is not used here, but is a placeholder for the error code, which is used by the "dotnet run" command. - - - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} NETSDK1177: Failed to sign apphost with error code {1}: {0} @@ -824,4 +820,8 @@ To install these workloads, run the following command: {1} You may need to build the project on another operating system or architecture, or update the .NET SDK. {StrBegin="NETSDK1178: "} - \ No newline at end of file + + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} + + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index f834ce89319c..3beb6e977965 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 0e3016fab9c1..277fde690941 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 336e1ac0c0d0..f4ad83241aa9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index ee1e2d9cf9d6..2545099987a1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index bf62b7002e8e..7aa4a20463f9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 6d30126fbf43..d9b4c670a10b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 2732df853142..7f05ccd91d0b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 0875afd93e20..dd3651adf571 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index a133bd737a22..89107b8fedb6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 5fac3c034a42..9298f192fd45 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index a4a626e6356e..07904136ed36 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index cf41d80c28b2..f0467af79e6c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index d4b1d3ee6b27..81ec932fc7d3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -736,9 +736,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1150: "} - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - NETSDK1177: The '--self-contained' or '--no-self-contained' option should be used with '-r|--runtime'. - {StrBegin="NETSDK1176: "} + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. + {StrBegin="NETSDK1179: "} NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. diff --git a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index a05e45fe6a60..de5047ea9d29 100644 --- a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -187,7 +187,7 @@ public void It_warns_on_rid_without_self_contained_options() .Should() .Pass() .And - .HaveStdOutContaining("NETSDK1177"); + .HaveStdOutContaining("NETSDK1179"); } [Fact] @@ -204,7 +204,7 @@ public void It_does_not_warn_on_rid_with_self_contained_options() .Should() .Pass() .And - .NotHaveStdOutContaining("NETSDK1177"); + .NotHaveStdOutContaining("NETSDK1179"); } [Fact] @@ -220,7 +220,7 @@ public void It_does_not_warn_on_rid_with_self_contained_options_prior_to_net6() .Should() .Pass() .And - .NotHaveStdOutContaining("NETSDK1177"); + .NotHaveStdOutContaining("NETSDK1179"); } } } From e7e2cf6377c95b51db101ac33c41ec7a4ad20e83 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Wed, 21 Jul 2021 09:10:27 -0700 Subject: [PATCH 7/8] Updating tests for command line rid property --- .../dotnet-msbuild/GivenDotnetBuildInvocation.cs | 6 +++--- .../dotnet-msbuild/GivenDotnetPublishInvocation.cs | 4 ++-- .../dotnet-msbuild/GivenDotnetStoreInvocation.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetBuildInvocation.cs b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetBuildInvocation.cs index 0aa34445315a..95509b205cf7 100644 --- a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetBuildInvocation.cs +++ b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetBuildInvocation.cs @@ -21,8 +21,8 @@ public class GivenDotnetBuildInvocation : IClassFixturefoo")] [InlineData(new string[] { "-o", "foo1 foo2" }, "\"-property:OutputPath=foo1 foo2\"")] [InlineData(new string[] { "--no-incremental" }, "-target:Rebuild")] - [InlineData(new string[] { "-r", "rid" }, "-property:RuntimeIdentifier=rid")] - [InlineData(new string[] { "--runtime", "rid" }, "-property:RuntimeIdentifier=rid")] + [InlineData(new string[] { "-r", "rid" }, "-property:RuntimeIdentifier=rid -property:_CommandLineDefinedRuntimeIdentifier=true")] + [InlineData(new string[] { "--runtime", "rid" }, "-property:RuntimeIdentifier=rid -property:_CommandLineDefinedRuntimeIdentifier=true")] [InlineData(new string[] { "--use-current-runtime" }, "-property:UseCurrentRuntimeIdentifier=True")] [InlineData(new string[] { "-c", "config" }, "-property:Configuration=config")] [InlineData(new string[] { "--configuration", "config" }, "-property:Configuration=config")] @@ -31,7 +31,7 @@ public class GivenDotnetBuildInvocation : IClassFixturemyoutput /ArbitrarySwitchForMSBuild")] + "-target:Rebuild -property:RuntimeIdentifier=myruntime -property:_CommandLineDefinedRuntimeIdentifier=true -verbosity:diag -property:OutputPath=myoutput /ArbitrarySwitchForMSBuild")] [InlineData(new string[] { "/t:CustomTarget" }, "/t:CustomTarget")] public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalArgs) { diff --git a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs index 5e53b797b6d5..6c1c55e564b9 100644 --- a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs +++ b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs @@ -24,8 +24,8 @@ public GivenDotnetPublishInvocation(ITestOutputHelper output) [Theory] [InlineData(new string[] { }, "")] - [InlineData(new string[] { "-r", "" }, "-property:RuntimeIdentifier=")] - [InlineData(new string[] { "--runtime", "" }, "-property:RuntimeIdentifier=")] + [InlineData(new string[] { "-r", "" }, "-property:RuntimeIdentifier= -property:_CommandLineDefinedRuntimeIdentifier=true")] + [InlineData(new string[] { "--runtime", "" }, "-property:RuntimeIdentifier= -property:_CommandLineDefinedRuntimeIdentifier=true")] [InlineData(new string[] { "--use-current-runtime" }, "-property:UseCurrentRuntimeIdentifier=True")] [InlineData(new string[] { "-o", "" }, "-property:PublishDir=")] [InlineData(new string[] { "--output", "" }, "-property:PublishDir=")] diff --git a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetStoreInvocation.cs b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetStoreInvocation.cs index 480e97afbb1b..005a1e349a10 100644 --- a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetStoreInvocation.cs +++ b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetStoreInvocation.cs @@ -31,8 +31,8 @@ public void ItAddsProjectToMsbuildInvocation(string optionName) [Theory] [InlineData(new string[] { "-f", "" }, @"-property:TargetFramework=")] [InlineData(new string[] { "--framework", "" }, @"-property:TargetFramework=")] - [InlineData(new string[] { "-r", "" }, @"-property:RuntimeIdentifier=")] - [InlineData(new string[] { "--runtime", "" }, @"-property:RuntimeIdentifier=")] + [InlineData(new string[] { "-r", "" }, @"-property:RuntimeIdentifier= -property:_CommandLineDefinedRuntimeIdentifier=true")] + [InlineData(new string[] { "--runtime", "" }, @"-property:RuntimeIdentifier= -property:_CommandLineDefinedRuntimeIdentifier=true")] [InlineData(new string[] { "--use-current-runtime" }, "-property:UseCurrentRuntimeIdentifier=True")] [InlineData(new string[] { "--manifest", "one.xml", "--manifest", "two.xml", "--manifest", "three.xml" }, @"-property:AdditionalProjects=one.xml%3Btwo.xml%3Bthree.xml")] public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalArgs) From d3ca2c47a7b0b4bf72b556e85dcc087d0ef1760e Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Thu, 22 Jul 2021 13:34:38 -0700 Subject: [PATCH 8/8] PR feedback --- src/Cli/dotnet/CommonOptions.cs | 2 +- src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs | 4 +--- src/Cli/dotnet/commands/dotnet-publish/Program.cs | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs index 6a55a4fce87b..ab3ceaf5febb 100644 --- a/src/Cli/dotnet/CommonOptions.cs +++ b/src/Cli/dotnet/CommonOptions.cs @@ -115,7 +115,7 @@ public static bool VerbosityIsDetailedOrDiagnostic(this VerbosityOptions verbosi verbosity.Equals(VerbosityOptions.detailed); } - public static void ValidateSelfContainedOptions(bool hasSelfContainedOption, bool hasNoSelfContainedOption, bool hasRuntimeOption, IEnumerable projectArgs) + public static void ValidateSelfContainedOptions(bool hasSelfContainedOption, bool hasNoSelfContainedOption) { if (hasSelfContainedOption && hasNoSelfContainedOption) { diff --git a/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs b/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs index 87f2f8955053..5c9e8a0a0b34 100644 --- a/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-build/BuildCommand.cs @@ -33,9 +33,7 @@ public static BuildCommand FromArgs(string[] args, string msbuildPath = null) parseResult.ShowHelpOrErrorIfAppropriate(); CommonOptions.ValidateSelfContainedOptions(parseResult.HasOption(BuildCommandParser.SelfContainedOption), - parseResult.HasOption(BuildCommandParser.NoSelfContainedOption), - parseResult.HasOption(BuildCommandParser.RuntimeOption), - parseResult.ValueForArgument>(BuildCommandParser.SlnOrProjectArgument) ?? Array.Empty()); + parseResult.HasOption(BuildCommandParser.NoSelfContainedOption)); msbuildArgs.Add($"-consoleloggerparameters:Summary"); diff --git a/src/Cli/dotnet/commands/dotnet-publish/Program.cs b/src/Cli/dotnet/commands/dotnet-publish/Program.cs index 457ced01161f..40fbb1637421 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-publish/Program.cs @@ -36,9 +36,7 @@ public static PublishCommand FromArgs(string[] args, string msbuildPath = null) msbuildArgs.Add("-target:Publish"); CommonOptions.ValidateSelfContainedOptions(parseResult.HasOption(PublishCommandParser.SelfContainedOption), - parseResult.HasOption(PublishCommandParser.NoSelfContainedOption), - parseResult.HasOption(PublishCommandParser.RuntimeOption), - parseResult.ValueForArgument>(PublishCommandParser.SlnOrProjectArgument) ?? Array.Empty()); + parseResult.HasOption(PublishCommandParser.NoSelfContainedOption)); msbuildArgs.AddRange(parseResult.OptionValuesToBeForwarded(PublishCommandParser.GetCommand()));