From 92507184bd5c25e89b97eb8c787036f191a5715e Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Tue, 26 Jun 2018 16:34:00 -0700 Subject: [PATCH 1/8] Log a verbose message when DOTNET_CLI_HOME is being used. This commit logs a diagnostic message when the `DOTNET_CLI_HOME` variable is used. This enables users to determine where first-run-experience and global tool files are being written to. Fixes #9510. --- .../LocalizableStrings.resx | 3 +++ .../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 +++++ src/dotnet/Program.cs | 17 +++++++++++++++++ .../GivenThatDotNetRunsCommands.cs | 18 ++++++++++++++++++ 16 files changed, 103 insertions(+) diff --git a/src/Microsoft.DotNet.Cli.Utils/LocalizableStrings.resx b/src/Microsoft.DotNet.Cli.Utils/LocalizableStrings.resx index 0052c7542..18c0804fd 100644 --- a/src/Microsoft.DotNet.Cli.Utils/LocalizableStrings.resx +++ b/src/Microsoft.DotNet.Cli.Utils/LocalizableStrings.resx @@ -276,4 +276,7 @@ dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf index bad5c47e0..502437409 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf index bf31a852b..45bf69e2e 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf index 9b05c72de..9f0e9b9fc 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf index 413171965..9a352ea90 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf index 89599aa27..f5a466d8c 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf index 90a131afc..680d6eed3 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf index 49f7b2038..91dc78d4a 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet 도구를 설치하세요. install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf index 4f51ed2e5..6411bf6ad 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf index d1ecbe2c9..4aab3f1f9 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf index d744062cb..b16a0bbce 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf index edaf50309..9ae002142 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf index e8c13f337..0c4504c5f 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet 工具安装 -- 全局 {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf index 1330462bd..dc0f356ff 100644 --- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf @@ -268,6 +268,11 @@ dotnet tool install --global {1} dotnet tool install --global {1} + + Using home directory '{0}' set by the '{1}' environment variable. + Using home directory '{0}' set by the '{1}' environment variable. + + \ No newline at end of file diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs index 6e0dbeee1..de1ebb9e6 100644 --- a/src/dotnet/Program.cs +++ b/src/dotnet/Program.cs @@ -149,6 +149,8 @@ namespace Microsoft.DotNet.Cli bool skipFirstRunExperience = environmentProvider.GetEnvironmentVariableAsBool("DOTNET_SKIP_FIRST_TIME_EXPERIENCE", false); + ReportDotnetHomeUsage(environmentProvider); + topLevelCommandParserResult = new TopLevelCommandParserResult(command); var hasSuperUserAccess = false; if (IsDotnetBeingInvokedFromNativeInstaller(topLevelCommandParserResult)) @@ -229,6 +231,21 @@ namespace Microsoft.DotNet.Cli return exitCode; } + private static void ReportDotnetHomeUsage(IEnvironmentProvider provider) + { + var home = provider.GetEnvironmentVariable(CliFolderPathCalculator.DotnetHomeVariableName); + if (string.IsNullOrEmpty(home)) + { + return; + } + + Reporter.Verbose.WriteLine( + string.Format( + LocalizableStrings.DotnetCliHomeUsed, + home, + CliFolderPathCalculator.DotnetHomeVariableName)); + } + private static bool IsDotnetBeingInvokedFromNativeInstaller(TopLevelCommandParserResult parseResult) { return parseResult.Command == "internal-reportinstallsuccess"; diff --git a/test/dotnet.Tests/GivenThatDotNetRunsCommands.cs b/test/dotnet.Tests/GivenThatDotNetRunsCommands.cs index c76400e56..e6ea890c9 100644 --- a/test/dotnet.Tests/GivenThatDotNetRunsCommands.cs +++ b/test/dotnet.Tests/GivenThatDotNetRunsCommands.cs @@ -49,5 +49,23 @@ namespace Microsoft.DotNet.Tests .And .HaveStdErrContaining(CliFolderPathCalculator.DotnetHomeVariableName); } + + [Fact] + public void GivenASpecifiedDotnetCliHomeVariableItPrintsUsageMessage() + { + var home = Path.Combine(TempRoot.Root, Path.GetRandomFileName()); + + new TestCommand("dotnet") + .WithEnvironmentVariable(CliFolderPathCalculator.DotnetHomeVariableName, home) + .ExecuteWithCapturedOutput("-d help") + .Should() + .Pass() + .And + .HaveStdOutContaining( + string.Format( + LocalizableStrings.DotnetCliHomeUsed, + home, + CliFolderPathCalculator.DotnetHomeVariableName)); + } } } From 460788c91ab8980b801d401dfdeb595f8ccde2ed Mon Sep 17 00:00:00 2001 From: John Beisner Date: Tue, 3 Jul 2018 16:23:35 +0000 Subject: [PATCH 2/8] Removing 'Locked-file' test; CLI:release/2.1.3xx (#9604) * Removing 'Locked-file' test: ItFailsInLessThanOneSecondWhenTheProjectAssetsJsonDoesNotExist --- README.md | 2 + .../GivenThatWeWantToReadLockFilesQuickly.cs | 49 ------------------- 2 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs diff --git a/README.md b/README.md index 2e45c01fc..37c675614 100644 --- a/README.md +++ b/README.md @@ -216,3 +216,5 @@ License ------- By downloading the .zip you are agreeing to the terms in the project [EULA](https://aka.ms/dotnet-core-eula). + + diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs deleted file mode 100644 index 5b1300348..000000000 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.Diagnostics; -using System.IO; -using FluentAssertions; -using Microsoft.DotNet.Cli; -using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.InternalAbstractions; -using Microsoft.DotNet.TestFramework; -using Microsoft.DotNet.Tools.Test.Utilities; -using NuGet.Frameworks; -using NuGet.ProjectModel; -using Xunit; - -namespace Microsoft.DotNet.Cli.Utils.Tests -{ - public class GivenThatWeWantToReadLockFilesQuickly : TestBase - { - [Fact] - public void ItFailsInLessThanOneSecondWhenTheProjectAssetsJsonDoesNotExist() - { - var testInstance = TestAssets.Get("TestAppWithProjDepTool") - .CreateInstance() - .WithSourceFiles(); - - var assetsFile = testInstance.Root.GetDirectory("obj").GetFile("project.assets.json").FullName; - var expectedMessage = string.Join( - Environment.NewLine, - string.Format(LocalizableStrings.FileNotFound, assetsFile), - LocalizableStrings.ProjectNotRestoredOrRestoreFailed); - - Action action = () => - { - var lockFile = new LockFileFormat() - .ReadWithLock(assetsFile) - .Result; - }; - - var stopWatch = Stopwatch.StartNew(); - - action.ShouldThrow().WithMessage(expectedMessage); - - stopWatch.Stop(); - stopWatch.ElapsedMilliseconds.Should().BeLessThan(1000); - } - } -} From 85e29304a6ea7f6a829756ad9193785b38e5b457 Mon Sep 17 00:00:00 2001 From: vramak Date: Thu, 5 Jul 2018 18:22:54 -0700 Subject: [PATCH 3/8] Updating the WebSdk from aspnet/websdk/2.1.4xx --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index d4227b341..a51c2a757 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -26,7 +26,7 @@ 2.1.400-preview-63027-01 $(MicrosoftNETSdkPackageVersion) $(MicrosoftAspNetCoreAppPackageVersion) - 2.1.400-preview1-20180614-1774926 + 2.1.400-preview1-20180705-1834985 $(MicrosoftNETSdkWebPackageVersion) $(MicrosoftNETSdkWebPackageVersion) 1.0.2-beta3 From d9e8947ff4c20c9878cc6ea46661e73cc245b536 Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Mon, 9 Jul 2018 11:47:59 -0700 Subject: [PATCH 4/8] Revert implementation of the --mode option for the publish command. This commit reverts the implementation of the `--mode` option for the `dotnet publish` command. A bug in the apphost prevents this feature from working properly in some cases and there currently is not a mechanism to service it with this feature. The team has decided to move this feature to 2.2.1xx for the .NET Core SDK. Fixes dotnet/sdk#2380. --- build/DependencyVersions.props | 2 +- .../dotnet-publish/LocalizableStrings.resx | 23 ++---- src/dotnet/commands/dotnet-publish/Program.cs | 31 -------- .../dotnet-publish/PublishCommandParser.cs | 14 +--- .../xlf/LocalizableStrings.cs.xlf | 44 +++-------- .../xlf/LocalizableStrings.de.xlf | 44 +++-------- .../xlf/LocalizableStrings.es.xlf | 44 +++-------- .../xlf/LocalizableStrings.fr.xlf | 44 +++-------- .../xlf/LocalizableStrings.it.xlf | 44 +++-------- .../xlf/LocalizableStrings.ja.xlf | 44 +++-------- .../xlf/LocalizableStrings.ko.xlf | 44 +++-------- .../xlf/LocalizableStrings.pl.xlf | 44 +++-------- .../xlf/LocalizableStrings.pt-BR.xlf | 44 +++-------- .../xlf/LocalizableStrings.ru.xlf | 44 +++-------- .../xlf/LocalizableStrings.tr.xlf | 44 +++-------- .../xlf/LocalizableStrings.zh-Hans.xlf | 44 +++-------- .../xlf/LocalizableStrings.zh-Hant.xlf | 44 +++-------- .../Commands/PublishCommand.cs | 10 +-- .../GivenDotnetPublishPublishesProjects.cs | 78 ++++--------------- 19 files changed, 156 insertions(+), 574 deletions(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index d4227b341..4da59168b 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -23,7 +23,7 @@ $(MicrosoftCodeAnalysisCSharpPackageVersion) $(MicrosoftCodeAnalysisCSharpPackageVersion) $(MicrosoftCodeAnalysisCSharpPackageVersion) - 2.1.400-preview-63027-01 + 2.1.400-preview-63109-04 $(MicrosoftNETSdkPackageVersion) $(MicrosoftAspNetCoreAppPackageVersion) 2.1.400-preview1-20180614-1774926 diff --git a/src/dotnet/commands/dotnet-publish/LocalizableStrings.resx b/src/dotnet/commands/dotnet-publish/LocalizableStrings.resx index 59c01c3af..1537472b5 100644 --- a/src/dotnet/commands/dotnet-publish/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-publish/LocalizableStrings.resx @@ -135,16 +135,9 @@ The path to a target manifest file that contains the list of packages to be excluded from the publish step. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - MODE + + Publish the .NET Core 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. @@ -153,16 +146,10 @@ The default is 'self-contained' when a target runtime is specified. The target framework to publish for. The target framework has to be specified in the project file. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. The configuration to publish for. The default for most projects is 'Debug'. - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - The specified publish mode '{0}' is not supported. - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/Program.cs b/src/dotnet/commands/dotnet-publish/Program.cs index 631416b82..ed8f3260c 100644 --- a/src/dotnet/commands/dotnet-publish/Program.cs +++ b/src/dotnet/commands/dotnet-publish/Program.cs @@ -39,37 +39,6 @@ namespace Microsoft.DotNet.Tools.Publish var appliedPublishOption = result["dotnet"]["publish"]; - if (appliedPublishOption.HasOption("mode") && appliedPublishOption.HasOption("self-contained")) - { - throw new GracefulException(LocalizableStrings.PublishModeAndSelfContainedOptionsConflict); - } - - var mode = appliedPublishOption.ValueOrDefault("mode"); - switch (mode) - { - case null: - break; - - case PublishCommandParser.SelfContainedMode: - msbuildArgs.Add("-p:SelfContained=true"); - break; - - case PublishCommandParser.FxDependentMode: - msbuildArgs.Add("-p:SelfContained=false"); - break; - - case PublishCommandParser.FxDependentNoExeMode: - msbuildArgs.Add("-p:SelfContained=false"); - msbuildArgs.Add("-p:UseAppHost=false"); - break; - - default: - throw new GracefulException( - string.Format( - LocalizableStrings.UnsupportedPublishMode, - mode)); - } - msbuildArgs.AddRange(appliedPublishOption.OptionValuesToBeForwarded()); msbuildArgs.AddRange(appliedPublishOption.Arguments); diff --git a/src/dotnet/commands/dotnet-publish/PublishCommandParser.cs b/src/dotnet/commands/dotnet-publish/PublishCommandParser.cs index 96519680f..19ee3ec12 100644 --- a/src/dotnet/commands/dotnet-publish/PublishCommandParser.cs +++ b/src/dotnet/commands/dotnet-publish/PublishCommandParser.cs @@ -10,10 +10,6 @@ namespace Microsoft.DotNet.Cli { internal static class PublishCommandParser { - public const string SelfContainedMode = "self-contained"; - public const string FxDependentMode = "fx-dependent"; - public const string FxDependentNoExeMode = "fx-dependent-no-exe"; - public static Command Publish() => CreateWithRestoreOptions.Command( "publish", @@ -44,7 +40,7 @@ namespace Microsoft.DotNet.Cli Accept.NoArguments().ForwardAs("-property:NoBuild=true")), Create.Option( "--self-contained", - "", // Hidden option for backwards-compatibility (now '--mode self-contained'). + LocalizableStrings.SelfContainedOptionDescription, Accept.ZeroOrOneArgument() .WithSuggestionsFrom("true", "false") .ForwardAsSingle(o => @@ -52,14 +48,6 @@ namespace Microsoft.DotNet.Cli string value = o.Arguments.Any() ? o.Arguments.Single() : "true"; return $"-property:SelfContained={value}"; })), - Create.Option( - "--mode", - LocalizableStrings.ModeOptionDescription, - Accept.AnyOneOf( - SelfContainedMode, - FxDependentMode, - FxDependentNoExeMode) - .With(name: LocalizableStrings.ModeOptionName)), CommonOptions.NoRestoreOption(), CommonOptions.VerbosityOption()); } diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf index 65cdf77c0..99f4af0de 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf @@ -37,16 +37,22 @@ Cesta k cílovému souboru manifestu obsahujícímu seznam balíčků, které se mají vyloučit z kroku publikování + + Publish the .NET Core 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. + Publikuje spolu s aplikací modul runtime .NET Core, aby se tento modul nemusel instalovat na cílový počítač. Standardně se nastaví na True, pokud je zadaný identifikátor modulu runtime. + + Do not build the project before publishing. Implies --no-restore. Nesestavujte projekt, dokud ho nepublikujete. Implikuje možnost --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf index 54fe79e46..7a670d1f5 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf @@ -37,16 +37,22 @@ Der Pfad zu einer Zielmanifestdatei, die die Liste der von der Veröffentlichung auszuschließenden Pakete enthält. + + Publish the .NET Core 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. + Veröffentlichen Sie die .NET Core-Runtime mit Ihrer Anwendung, damit die Runtime auf dem Zielcomputer nicht installiert werden muss. Der Standardwert ist "true", wenn ein Runtimebezeichner angegeben ist. + + Do not build the project before publishing. Implies --no-restore. Erstellt das Projekt nicht vor dem Veröffentlichen. Impliziert "--no-restore". - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf index d71ab145b..e3cd6f556 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf @@ -37,16 +37,22 @@ La ruta de acceso a un archivo de manifiesto de destino que contiene la lista de paquetes que se excluirán del paso de publicación. + + Publish the .NET Core 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. + Publica el tiempo de ejecución de .NET Core con su aplicación para que no sea necesario instalarlo en la máquina de destino. Si se especifica un identificador de tiempo de ejecución, se toma como predeterminado el valor "true". + + Do not build the project before publishing. Implies --no-restore. No compile el proyecto antes de publicarlo. Implica --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf index dbc2c0835..13935a23a 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf @@ -37,16 +37,22 @@ Chemin d'un fichier manifeste cible contenant la liste des packages à exclure de l'étape de publication. + + Publish the .NET Core 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 Core 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é. + + Do not build the project before publishing. Implies --no-restore. Ne pas générer le projet avant la publication. Implique --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf index d6b3ca3ca..85b719aa1 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf @@ -37,16 +37,22 @@ Percorso di un file manifesto di destinazione che contiene l'elenco di pacchetti da escludere dal passaggio di pubblicazione. + + Publish the .NET Core 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 di .NET Core con l'applicazione in modo che non sia necessario installarlo nel computer di destinazione. Se si specifica un identificatore di runtime, l'impostazione predefinita è 'true'. + + Do not build the project before publishing. Implies --no-restore. Non compila il progetto prima della pubblicazione. Implica --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf index 36949f48d..e67184cae 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf @@ -37,16 +37,22 @@ 発行ステップから除外されるパッケージのリストを含むターゲット マニフェスト ファイルへのパス。 + + Publish the .NET Core 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 Core ランタイムをアプリケーションと一緒に発行します。ランタイム ID が指定される場合、既定の 'true' になります。 + + Do not build the project before publishing. Implies --no-restore. 発行する前にプロジェクトをビルドしないでください。--no-restore を意味します。 - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf index b5781e2e6..79dc21315 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf @@ -37,16 +37,22 @@ 게시 단계에서 제외할 패키지 목록이 들어 있는 대상 매니페스트 파일의 경로입니다. + + Publish the .NET Core 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 Core 런타임을 게시합니다. 런타임 식별자가 지정된 경우 기본값은 'true'입니다. + + Do not build the project before publishing. Implies --no-restore. 게시하기 전에 프로젝트를 빌드하지 않습니다. 복원 없음을 의미합니다. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf index cb4c0c981..e0494fbd9 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf @@ -37,16 +37,22 @@ Ścieżka do docelowego pliku manifestu zawierającego listę pakietów, które mają zostać wykluczone z kroku publikowania. + + Publish the .NET Core 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 programu .NET Core z aplikacją, aby nie trzeba było go instalować na maszynie docelowej. Domyślnie jest ustawiona wartość „true” w przypadku określenia identyfikatora środowiska uruchomieniowego. + + Do not build the project before publishing. Implies --no-restore. Nie kompiluj tego projektu przed opublikowaniem. Powoduje przyjęcie, że podano parametr --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf index f7c91c76c..e635876eb 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf @@ -37,16 +37,22 @@ O caminho para um arquivo de manifesto de destino que contém a lista de pacotes a serem excluídos da etapa de publicação. + + Publish the .NET Core 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 tempo de execução .NET Core com seu aplicativo para que o tempo de execução não precise ser instalado no computador de destino. Assumirá 'true' como padrão se um identificador de tempo de execução for especificado. + + Do not build the project before publishing. Implies --no-restore. Não compile o projeto antes de publicar. Implica em --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf index 2b269e4ec..97c45336c 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf @@ -37,16 +37,22 @@ Путь к целевому файлу манифеста, содержащему список пакетов, исключаемых из публикации. + + Publish the .NET Core 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 Core вместе с приложением, чтобы ее не нужно было устанавливать на целевом компьютере. Если идентификатор среды выполнения указан, значение по умолчанию — true. + + Do not build the project before publishing. Implies --no-restore. Сборка проекта перед публикацией не выполняется. Подразумевает --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf index d39339db9..ec7335186 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf @@ -37,16 +37,22 @@ Yayımlama adımının dışında tutulacak paketlerin listesini içeren bir hedef bildirim dosyasının yolu. + + Publish the .NET Core 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. + Çalışma zamanının hedef makineye yüklenmesine gerek kalmaması için, .NET Core çalışma zamanını uygulamanızla birlikte yayımlayın. Bir çalışma zamanı tanımlayıcısı belirtilmişse, varsayılan olarak 'true' değerine ayarlanır. + + Do not build the project before publishing. Implies --no-restore. Yayımlamadan önce projeyi derlemeyin. --no-restore anlamına gelir. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf index 277fcd58e..bd47a935c 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf @@ -37,16 +37,22 @@ 指向目标清单文件的路径,该文件包含要通过发布步骤执行的包的列表。 + + Publish the .NET Core 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 Core 运行时,免除在目标计算机上安装运行时的需求。如果指定了运行时标识符,则默认为 “true”。 + + Do not build the project before publishing. Implies --no-restore. 发布之前不要生成项目。Implies --no-restore. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf index a23a56120..9a5770b10 100644 --- a/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf @@ -37,16 +37,22 @@ 目標資訊清單檔案的路徑,其包含要從發行步驟中排除的套件清單。 + + Publish the .NET Core 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 Core 執行階段,因此不需要在目標電腦上安裝此執行階段。若指定了執行階段識別碼,則預設為 'true'。 + + Do not build the project before publishing. Implies --no-restore. 請勿在執行之前建置專案。提示:-no-restore。 - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. - The target runtime to publish the application for. -The default is to publish a framework-dependent application without an executable. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. + The target runtime to publish for. This is used when creating a self-contained deployment. +The default is to publish a framework-dependent application. @@ -54,36 +60,6 @@ The default is to publish a framework-dependent application without an executabl The configuration to publish for. The default for most projects is 'Debug'. - - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - The mode to use when publishing the application. -The 'self-contained' mode publishes the application with the .NET Core runtime. -The 'fx-dependent' mode publishes the application as framework-dependent. If a target runtime is specified, it is published with an executable. -The 'fx-dependent-no-exe' mode publishes the application as framework-dependent without an executable. -The default is 'fx-dependent-no-exe' when a target runtime is not specified. -The default is 'self-contained' when a target runtime is specified. - - - - MODE - MODE - - - - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - The '--mode' and '--self-contained' options cannot be used together. Specify only one of the options. - - - - The specified publish mode '{0}' is not supported. - The specified publish mode '{0}' is not supported. - - \ No newline at end of file diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs index a22b5acf7..ada6a80be 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs @@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities private string _output; private string _runtime; private List _targetManifests = new List(); - private string _mode; + private bool? _selfContained; public PublishCommand WithFramework(string framework) { @@ -44,9 +44,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities return this; } - public PublishCommand WithMode(string value) + public PublishCommand WithSelfContained(bool value) { - _mode = value; + _selfContained = value; return this; } @@ -69,7 +69,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities OutputOption, TargetOption, RuntimeOption, - ModeOption); + SelfContainedOption); } private string FrameworkOption => string.IsNullOrEmpty(_framework) ? "" : $"-f {_framework}"; @@ -80,6 +80,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities private string TargetOption => string.Join(" ", _targetManifests); - private string ModeOption => string.IsNullOrEmpty(_mode) ? "" : $"--mode {_mode}"; + private string SelfContainedOption => _selfContained.HasValue ? $"--self-contained:{_selfContained.Value}" : ""; } } diff --git a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index 01e4b5922..d78108d3e 100644 --- a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -97,15 +97,14 @@ namespace Microsoft.DotNet.Cli.Publish.Tests } [Theory] - [InlineData("self-contained", null)] - [InlineData(null, null)] - [InlineData(null, "--self-contained")] - [InlineData(null, "--self-contained=true")] - public void ItPublishesSelfContainedWithRid(string mode, string args) + [InlineData(null)] + [InlineData("--self-contained")] + [InlineData("--self-contained=true")] + public void ItPublishesSelfContainedWithRid(string args) { var testAppName = "MSBuildTestApp"; var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); - var outputDirectory = PublishApp(testAppName, rid, mode, args); + var outputDirectory = PublishApp(testAppName, rid, args); var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); @@ -116,16 +115,14 @@ namespace Microsoft.DotNet.Cli.Publish.Tests } [Theory] - [InlineData("fx-dependent", null)] - [InlineData(null, "--self-contained=false")] - public void ItPublishesFrameworkDependentWithRid(string mode, string args) + [InlineData("--self-contained=false")] + public void ItPublishesFrameworkDependentWithRid(string args) { var testAppName = "MSBuildTestApp"; var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); - var outputDirectory = PublishApp(testAppName, rid, mode, args); + var outputDirectory = PublishApp(testAppName, rid, args); outputDirectory.Should().OnlyHaveFiles(new[] { - $"{testAppName}{Constants.ExeSuffix}", $"{testAppName}.dll", $"{testAppName}.pdb", $"{testAppName}.deps.json", @@ -134,31 +131,6 @@ namespace Microsoft.DotNet.Cli.Publish.Tests var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); - var command = new TestCommand(outputProgram); - command.Environment[Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"] = - new RepoDirectoriesProvider().DotnetRoot; - - command.ExecuteWithCapturedOutput() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); - } - - [Fact] - public void ItPublishesFrameworkDependentNoExeWithRid() - { - var testAppName = "MSBuildTestApp"; - var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); - var outputDirectory = PublishApp(testAppName, rid, mode: "fx-dependent-no-exe"); - - outputDirectory.Should().OnlyHaveFiles(new[] { - $"{testAppName}.dll", - $"{testAppName}.pdb", - $"{testAppName}.deps.json", - $"{testAppName}.runtimeconfig.json", - }); - new DotnetCommand() .ExecuteWithCapturedOutput(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll")) .Should().Pass() @@ -166,14 +138,12 @@ namespace Microsoft.DotNet.Cli.Publish.Tests } [Theory] - [InlineData("fx-dependent-no-exe", null)] - [InlineData("fx-dependent", null)] - [InlineData(null, "--self-contained=false")] - [InlineData(null, null)] - public void ItPublishesFrameworkDependentWithoutRid(string mode, string args) + [InlineData("--self-contained=false")] + [InlineData(null)] + public void ItPublishesFrameworkDependentWithoutRid(string args) { var testAppName = "MSBuildTestApp"; - var outputDirectory = PublishApp(testAppName, rid: null, mode: mode, args: args); + var outputDirectory = PublishApp(testAppName, rid: null, args: args); outputDirectory.Should().OnlyHaveFiles(new[] { $"{testAppName}.dll", @@ -188,10 +158,10 @@ namespace Microsoft.DotNet.Cli.Publish.Tests .And.HaveStdOutContaining("Hello World"); } - private DirectoryInfo PublishApp(string testAppName, string rid, string mode, string args = null) + private DirectoryInfo PublishApp(string testAppName, string rid, string args = null) { var testInstance = TestAssets.Get(testAppName) - .CreateInstance($"PublishApp_{rid ?? "none"}_{mode ?? "none"}_{args ?? "none"}") + .CreateInstance($"PublishApp_{rid ?? "none"}_{args ?? "none"}") .WithSourceFiles() .WithRestoreFiles(); @@ -199,7 +169,6 @@ namespace Microsoft.DotNet.Cli.Publish.Tests new PublishCommand() .WithRuntime(rid) - .WithMode(mode) .WithWorkingDirectory(testProjectDirectory) .Execute(args ?? "") .Should().Pass(); @@ -336,24 +305,5 @@ namespace Microsoft.DotNet.Cli.Publish.Tests .Should() .Fail(); } - - [Fact] - public void ItFailsToPublishIfBothModeAndSelfContainedAreSpecified() - { - var testInstance = TestAssets.Get("MSBuildTestApp") - .CreateInstance() - .WithSourceFiles() - .WithRestoreFiles(); - - var testProjectDirectory = testInstance.Root; - - new PublishCommand() - .WithWorkingDirectory(testProjectDirectory) - .Execute("--self-contained --mode fx-dependent") - .Should() - .Fail() - .And - .HaveStdErrContaining(LocalizableStrings.PublishModeAndSelfContainedOptionsConflict); - } } } From eadd6ead8ca088a3b5863ea721658cad12a1ad4e Mon Sep 17 00:00:00 2001 From: William Li Date: Tue, 10 Jul 2018 12:53:09 -0700 Subject: [PATCH 5/8] Update SDK to 2.1.400-preview-63110-09 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 6eb07be6f..2f2b4840c 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -23,7 +23,7 @@ $(MicrosoftCodeAnalysisCSharpPackageVersion) $(MicrosoftCodeAnalysisCSharpPackageVersion) $(MicrosoftCodeAnalysisCSharpPackageVersion) - 2.1.400-preview-63109-04 + 2.1.400-preview-63110-09 $(MicrosoftNETSdkPackageVersion) $(MicrosoftAspNetCoreAppPackageVersion) 2.1.400-preview1-20180705-1834985 From 461fd82844a5fa05240b09b5d018aef686559a6b Mon Sep 17 00:00:00 2001 From: William Li Date: Tue, 10 Jul 2018 14:13:29 -0700 Subject: [PATCH 6/8] Update MicrosoftNETCoreAppPackageVersion --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 2f2b4840c..099c68052 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -10,7 +10,7 @@ 2.1.1 2.1.1 2.1.1 - 2.1.1 + 2.1.2 $(MicrosoftNETCoreAppPackageVersion) 15.8.0-preview-000138 $(MicrosoftBuildPackageVersion) From eff7b49e3335070fb467d9c24d215834d9e07f9e Mon Sep 17 00:00:00 2001 From: William Li Date: Tue, 10 Jul 2018 14:41:53 -0700 Subject: [PATCH 7/8] Update date test according to MicrosoftNETSdkPackageVersion update --- .../GivenAProjectToolsCommandResolver.cs | 2 +- test/dotnet-new.Tests/GivenThatIWantANewApp.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs index 632a1cc36..b031a50ee 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs @@ -304,7 +304,7 @@ namespace Microsoft.DotNet.Tests result.Should().NotBeNull(); - result.Args.Should().Contain("--fx-version 2.1.1"); + result.Args.Should().Contain("--fx-version 2.1.2"); } [Fact] diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs index cb9d8135e..fc16d412f 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs @@ -106,7 +106,7 @@ namespace Microsoft.DotNet.New.Tests var sharedFxDir = dotnetDir .GetDirectory("shared", "Microsoft.NETCore.App") .EnumerateDirectories() - .Single(d => d.Name.StartsWith("2.1.1")); + .Single(d => d.Name.StartsWith("2.1.2")); if (packageName == "microsoft.netcore.app") { From 0ef0b3296bbda10947b59602164788b7057561ad Mon Sep 17 00:00:00 2001 From: William Li Date: Tue, 10 Jul 2018 16:24:50 -0700 Subject: [PATCH 8/8] Add XSLT Transform for apphost (#9609) To avoid sign check whitelist apphost.exe name changes very build. Sign check uses File Id in MSI as whitelist name. Template apphost.exe get a new "File Id" in msi different every time (since File Id is generated according to file path, and file path has version number). Use XSLT tranform to match the file path contains "AppHostTemplate\apphost.exe" and give it the same ID all the time. --- build/package/Installer.MSI.targets | 5 +++- .../StableFileIdForApphostTransform.xslt | 26 +++++++++++++++++++ packaging/windows/clisdk/generatemsi.ps1 | 17 ++++++++++-- 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 packaging/windows/clisdk/StableFileIdForApphostTransform.xslt diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets index 649947574..3c8f0f2f8 100644 --- a/build/package/Installer.MSI.targets +++ b/build/package/Installer.MSI.targets @@ -14,6 +14,7 @@ $(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe $(RepoRoot)/packaging/windows/clisdk/generatemsi.ps1 + $(RepoRoot)/packaging/windows/clisdk/stablefileidforapphosttransform.xslt $(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1 $(RepoRoot)/packaging/windows/clisdk/generatenupkg.ps1 @@ -110,7 +111,9 @@ '$(SimpleVersion)' '$(NugetVersion)' '$(SdkInstallerUpgradeCode)' - '$(Architecture)'" /> + '$(Architecture)' + '$(SdkStableFileIdForApphostTransform)' + " /> + + + + + + + + + + + + + + + + apphosttemplateapphostexe + + + + diff --git a/packaging/windows/clisdk/generatemsi.ps1 b/packaging/windows/clisdk/generatemsi.ps1 index fc9da871d..69c17d078 100644 --- a/packaging/windows/clisdk/generatemsi.ps1 +++ b/packaging/windows/clisdk/generatemsi.ps1 @@ -10,7 +10,8 @@ param( [Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$UpgradeCode, - [Parameter(Mandatory=$true)][string]$Architecture + [Parameter(Mandatory=$true)][string]$Architecture, + [Parameter(Mandatory=$true)][string]$StableFileIdForApphostTransform ) . "$PSScriptRoot\..\..\..\scripts\common\_common.ps1" @@ -26,7 +27,19 @@ function RunHeat Write-Output Running heat.. - .\heat.exe dir `"$inputDir`" -template fragment -sreg -gg -var var.DotnetSrc -cg InstallFiles -srd -dr DOTNETHOME -out $InstallFileswsx | Out-Host + # -t $StableFileIdForApphostTransform to avoid sign check baseline apphost.exe name changes every build. Sign check uses File Id in MSI as whitelist name. + # Template apphost.exe get a new "File Id" in msi different every time (since File Id is generated according to file + # path, and file path has version number) + # use XSLT tranform to match the file path contains "AppHostTemplate\apphost.exe" and give it the same ID all the time. + + .\heat.exe dir `"$inputDir`" -template fragment ` + -sreg -gg ` + -var var.DotnetSrc ` + -cg InstallFiles ` + -srd ` + -dr DOTNETHOME ` + -t $StableFileIdForApphostTransform ` + -out $InstallFileswsx | Out-Host if($LastExitCode -ne 0) {