зеркало из https://github.com/dotnet/sdk.git
Merge branch 'release/8.0.3xx'
This commit is contained in:
Коммит
dca1a925ba
|
@ -21,7 +21,7 @@ jobs:
|
|||
CreatePr: true
|
||||
LclSource: lclFilesfromPackage
|
||||
LclPackageId: 'LCL-JUNO-PROD-DOTNETSDK'
|
||||
MirrorBranch: release/8.0.3xx
|
||||
MirrorBranch: release/8.0.4xx
|
||||
MirrorRepo: sdk
|
||||
|
||||
- ${{ if not(contains(parameters.agentOs, 'TemplateEngine')) }}:
|
||||
|
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
CreatePr: true
|
||||
LclSource: lclFilesfromPackage
|
||||
LclPackageId: 'LCL-JUNO-PROD-DOTNETSDK'
|
||||
MirrorBranch: release/8.0.3xx
|
||||
MirrorBranch: release/8.0.4xx
|
||||
MirrorRepo: sdk
|
||||
|
||||
- ${{ if not(contains(parameters.agentOs, 'TemplateEngine')) }}:
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace Microsoft.DotNet.Workloads.Workload
|
|||
protected readonly ReleaseVersion _targetSdkVersion;
|
||||
protected readonly string _fromRollbackDefinition;
|
||||
protected string _workloadSetVersion;
|
||||
protected string _workloadSetVersionFromGlobalJson;
|
||||
protected readonly PackageSourceLocation _packageSourceLocation;
|
||||
protected readonly IWorkloadResolverFactory _workloadResolverFactory;
|
||||
protected IWorkloadResolver _workloadResolver;
|
||||
|
@ -104,7 +105,15 @@ namespace Microsoft.DotNet.Workloads.Workload
|
|||
return installStateContents.UseWorkloadSets ?? false;
|
||||
}
|
||||
|
||||
protected IEnumerable<ManifestVersionUpdate> HandleWorkloadUpdateFromVersion(ITransactionContext context, DirectoryPath? offlineCache)
|
||||
protected void ErrorIfGlobalJsonAndCommandLineMismatch(string globaljsonPath)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson) && !string.IsNullOrWhiteSpace(_workloadSetVersion) && !_workloadSetVersion.Equals(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
throw new Exception(string.Format(Strings.CannotSpecifyVersionOnCommandLineAndInGlobalJson, globaljsonPath));
|
||||
}
|
||||
}
|
||||
|
||||
protected bool TryHandleWorkloadUpdateFromVersion(ITransactionContext context, DirectoryPath? offlineCache, out IEnumerable<ManifestVersionUpdate> updates)
|
||||
{
|
||||
// Ensure workload set mode is set to 'workloadset'
|
||||
// Do not skip checking the mode first, as setting it triggers
|
||||
|
@ -114,11 +123,11 @@ namespace Microsoft.DotNet.Workloads.Workload
|
|||
_workloadInstaller.UpdateInstallMode(_sdkFeatureBand, true);
|
||||
}
|
||||
|
||||
_workloadManifestUpdater.DownloadWorkloadSet(_workloadSetVersion, offlineCache);
|
||||
return InstallWorkloadSet(context);
|
||||
_workloadManifestUpdater.DownloadWorkloadSet(_workloadSetVersionFromGlobalJson ?? _workloadSetVersion, offlineCache);
|
||||
return TryInstallWorkloadSet(context, out updates);
|
||||
}
|
||||
|
||||
public IEnumerable<ManifestVersionUpdate> InstallWorkloadSet(ITransactionContext context)
|
||||
public bool TryInstallWorkloadSet(ITransactionContext context, out IEnumerable<ManifestVersionUpdate> updates)
|
||||
{
|
||||
var advertisingPackagePath = Path.Combine(_userProfileDir, "sdk-advertising", _sdkFeatureBand.ToString(), "microsoft.net.workloads");
|
||||
if (File.Exists(Path.Combine(advertisingPackagePath, Constants.workloadSetVersionFileName)))
|
||||
|
@ -126,15 +135,24 @@ namespace Microsoft.DotNet.Workloads.Workload
|
|||
// This file isn't created in tests.
|
||||
PrintWorkloadSetTransition(File.ReadAllText(Path.Combine(advertisingPackagePath, Constants.workloadSetVersionFileName)));
|
||||
}
|
||||
else if (_workloadInstaller is FileBasedInstaller || _workloadInstaller is NetSdkMsiInstallerClient)
|
||||
{
|
||||
// No workload sets found
|
||||
Reporter.WriteLine(Update.LocalizableStrings.NoWorkloadUpdateFound);
|
||||
updates = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
var workloadSetPath = _workloadInstaller.InstallWorkloadSet(context, advertisingPackagePath);
|
||||
var files = Directory.EnumerateFiles(workloadSetPath, "*.workloadset.json");
|
||||
return _workloadManifestUpdater.ParseRollbackDefinitionFiles(files);
|
||||
updates = _workloadManifestUpdater.ParseRollbackDefinitionFiles(files);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void PrintWorkloadSetTransition(string newVersion)
|
||||
{
|
||||
var currentVersion = _workloadResolver.GetWorkloadVersion();
|
||||
if (currentVersion == null)
|
||||
if (currentVersion == null || !string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
Reporter.WriteLine(string.Format(Strings.NewWorkloadSet, newVersion));
|
||||
}
|
||||
|
@ -246,12 +264,6 @@ namespace Microsoft.DotNet.Workloads.Workload
|
|||
|
||||
internal static class InstallingWorkloadCommandParser
|
||||
{
|
||||
public static readonly CliOption<string> WorkloadSetMode = new("--mode")
|
||||
{
|
||||
Description = Strings.WorkloadSetMode,
|
||||
Hidden = true
|
||||
};
|
||||
|
||||
public static readonly CliOption<string> WorkloadSetVersionOption = new("--version")
|
||||
{
|
||||
Description = Strings.WorkloadSetVersionOptionDescription
|
||||
|
|
|
@ -124,6 +124,7 @@ namespace Microsoft.DotNet.Cli
|
|||
command.Subcommands.Add(WorkloadRestoreCommandParser.GetCommand());
|
||||
command.Subcommands.Add(WorkloadCleanCommandParser.GetCommand());
|
||||
command.Subcommands.Add(WorkloadElevateCommandParser.GetCommand());
|
||||
command.Subcommands.Add(WorkloadConfigCommandParser.GetCommand());
|
||||
|
||||
command.Validators.Add(commandResult =>
|
||||
{
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CommandDescription" xml:space="preserve">
|
||||
<value>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</value>
|
||||
</data>
|
||||
<data name="UpdateModeDescription" xml:space="preserve">
|
||||
<value>Controls whether updates should look for workload sets or the latest version of each individual manifest.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,97 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.CommandLine;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Deployment.DotNet.Releases;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Workloads.Workload;
|
||||
using Microsoft.DotNet.Workloads.Workload.Install;
|
||||
using Microsoft.NET.Sdk.WorkloadManifestReader;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace Microsoft.DotNet.Workloads.Workload.Config
|
||||
{
|
||||
internal class WorkloadConfigCommand : WorkloadCommandBase
|
||||
{
|
||||
private bool _hasUpdateMode;
|
||||
private string? _updateMode;
|
||||
private readonly IWorkloadResolverFactory _workloadResolverFactory;
|
||||
|
||||
private string? _dotnetPath;
|
||||
private string _userProfileDir;
|
||||
private readonly IWorkloadResolver _workloadResolver;
|
||||
private readonly ReleaseVersion _sdkVersion;
|
||||
private readonly SdkFeatureBand _sdkFeatureBand;
|
||||
|
||||
readonly IInstaller _workloadInstaller;
|
||||
|
||||
public WorkloadConfigCommand(
|
||||
ParseResult parseResult,
|
||||
IReporter? reporter = null,
|
||||
IWorkloadResolverFactory? workloadResolverFactory = null
|
||||
) : base(parseResult, CommonOptions.HiddenVerbosityOption, reporter)
|
||||
{
|
||||
_hasUpdateMode = parseResult.HasOption(WorkloadConfigCommandParser.UpdateMode);
|
||||
_updateMode = parseResult.GetValue(WorkloadConfigCommandParser.UpdateMode);
|
||||
|
||||
_workloadResolverFactory = workloadResolverFactory ?? new WorkloadResolverFactory();
|
||||
|
||||
var creationResult = _workloadResolverFactory.Create();
|
||||
|
||||
_dotnetPath = creationResult.DotnetPath;
|
||||
_userProfileDir = creationResult.UserProfileDir;
|
||||
_workloadResolver = creationResult.WorkloadResolver;
|
||||
_sdkVersion = creationResult.SdkVersion;
|
||||
|
||||
_sdkFeatureBand = new SdkFeatureBand(_sdkVersion);
|
||||
_workloadInstaller = WorkloadInstallerFactory.GetWorkloadInstaller(Reporter, _sdkFeatureBand, creationResult.WorkloadResolver, Verbosity, creationResult.UserProfileDir, VerifySignatures, PackageDownloader, creationResult.DotnetPath);
|
||||
}
|
||||
|
||||
public override int Execute()
|
||||
{
|
||||
// When we support multiple configuration values, it would be nice if we could process and display them in the order they are passed.
|
||||
// It seems that the parser doesn't give us a good way to do that, however
|
||||
if (_hasUpdateMode)
|
||||
{
|
||||
if (WorkloadConfigCommandParser.UpdateMode_WorkloadSet.Equals(_updateMode, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
_workloadInstaller.UpdateInstallMode(_sdkFeatureBand, true);
|
||||
}
|
||||
else if (WorkloadConfigCommandParser.UpdateMode_Manifests.Equals(_updateMode, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
_workloadInstaller.UpdateInstallMode(_sdkFeatureBand, false);
|
||||
}
|
||||
else if (string.IsNullOrEmpty(_updateMode))
|
||||
{
|
||||
if (InstallingWorkloadCommand.ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath))
|
||||
{
|
||||
Reporter.WriteLine(WorkloadConfigCommandParser.UpdateMode_WorkloadSet);
|
||||
}
|
||||
else
|
||||
{
|
||||
Reporter.WriteLine(WorkloadConfigCommandParser.UpdateMode_Manifests);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// This should not be hit, as parser sets the accepted values and should error before getting here if the value is not valid
|
||||
throw new InvalidOperationException($"Invalid update mode: {_updateMode}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_parseResult.ShowHelp();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System.CommandLine;
|
||||
using Microsoft.DotNet.Workloads.Workload.Config;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
internal static class WorkloadConfigCommandParser
|
||||
{
|
||||
// dotnet workload config --update-mode workload-set
|
||||
|
||||
public static readonly string UpdateMode_WorkloadSet = "workload-set";
|
||||
public static readonly string UpdateMode_Manifests = "manifests";
|
||||
|
||||
public static readonly CliOption<string> UpdateMode = new("--update-mode")
|
||||
{
|
||||
Description = LocalizableStrings.UpdateModeDescription,
|
||||
Arity = ArgumentArity.ZeroOrOne
|
||||
};
|
||||
|
||||
private static readonly CliCommand Command = ConstructCommand();
|
||||
|
||||
public static CliCommand GetCommand()
|
||||
{
|
||||
return Command;
|
||||
}
|
||||
|
||||
private static CliCommand ConstructCommand()
|
||||
{
|
||||
UpdateMode.AcceptOnlyFromAmong(UpdateMode_WorkloadSet, UpdateMode_Manifests);
|
||||
|
||||
CliCommand command = new("config", LocalizableStrings.CommandDescription);
|
||||
command.Options.Add(UpdateMode);
|
||||
|
||||
command.SetAction(parseResult =>
|
||||
{
|
||||
new WorkloadConfigCommand(parseResult).Execute();
|
||||
});
|
||||
|
||||
return command;
|
||||
}
|
||||
}
|
||||
}
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.cs.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.cs.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Upravit nebo zobrazit hodnoty konfigurace úlohy.
|
||||
Pokud chcete zobrazit hodnotu, zadejte odpovídající volbu příkazového řádku bez zadání hodnoty. Například: dotnet workload config --update-mode</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Určuje, zda mají aktualizace vyhledávat sady úloh nebo nejnovější verzi každého jednotlivého manifestu.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.de.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.de.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Workloadkonfigurationswerte ändern oder anzeigen.
|
||||
Um einen Wert anzuzeigen, geben Sie die entsprechende Befehlszeilenoption an, ohne einen Wert anzugeben. Beispiel: „dotnet workload config --update-mode“</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Steuert, ob Updates nach Workloadsätzen oder der neuesten Version jedes einzelnen Manifests suchen sollen.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.es.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.es.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Modificar o mostrar los valores de configuración de la carga de trabajo.
|
||||
Para mostrar un valor, especifique la opción de línea de comandos correspondiente sin proporcionar un valor. Por ejemplo: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Controla si las actualizaciones deben buscar conjuntos de cargas de trabajo o la versión más reciente de cada manifiesto individual.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.fr.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.fr.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="fr" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Modifiez ou affichez les valeurs de configuration de la charge de travail.
|
||||
Pour afficher une valeur, spécifiez l’option de ligne de commande correspondante sans fournir de valeur. Par exemple : « dotnet workload config --update-mode »</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Contrôle si les mises à jour doivent rechercher des ensembles de charge de travail ou la dernière version de chaque manifeste individuel.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.it.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.it.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="it" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Modifica o mostra i valori di configurazione del carico di lavoro.
|
||||
Per mostrare un valore, specifica l'opzione della riga di comando corrispondente senza fornire un valore. Ad esempio: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Controlla se gli aggiornamenti devono cercare i set di carichi di lavoro o la versione più recente di ogni singolo manifesto.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.ja.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.ja.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">ワークロード構成値を変更または表示します。
|
||||
値を表示するには、値を指定せずに対応するコマンド ライン オプションを指定します。例: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">更新プログラムでワークロード セットを検索するか、各個別マニフェストの最新バージョンを検索するかを制御します。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.ko.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.ko.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="ko" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">워크로드 구성 값을 수정하거나 표시합니다.
|
||||
값을 표시하려면 값을 제공하지 않고 해당 명령줄 옵션을 지정합니다. 예: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">업데이트에서 워크로드 집합을 찾을지 또는 각 개별 매니페스트의 최신 버전을 찾을지 여부를 제어합니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.pl.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.pl.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="pl" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Modyfikuj lub wyświetlaj wartości konfiguracji obciążenia.
|
||||
Aby wyświetlić wartość, należy podać odpowiednią opcję wiersza poleceń bez podawania wartości. Na przykład: „dotnet workload config --update-mode”</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Kontroluje, czy aktualizacje powinny szukać zestawów obciążeń, czy najnowszej wersji każdego pojedynczego manifestu.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.pt-BR.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.pt-BR.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Modifique ou exiba valores de configuração de carga de trabalho.
|
||||
Para exibir um valor, especifique a opção de linha de comando correspondente sem fornecer um valor. Por exemplo: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Controla se as atualizações devem procurar conjuntos de cargas de trabalho ou a versão mais recente de cada manifesto individual.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.ru.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.ru.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="ru" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">Изменение или отображение значений конфигурации рабочей нагрузки.
|
||||
Чтобы отобразить значение, укажите соответствующий параметр командной строки без значения. Например: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Управляет тем, должны ли обновления искать наборы рабочих нагрузок или последнюю версию каждого отдельного манифеста.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.tr.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.tr.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">İş yükü yapılandırması değerlerini değiştirin veya görüntüleyin.
|
||||
Bir değeri görüntülemek için, bir değer sağlamadan ilgili komut satırı seçeneğini belirtin. Örnek: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">Güncelleştirmelerin iş yükü kümelerini mi yoksa her bir bildirimin en son sürümünü mü araması gerektiğini denetler.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.zh-Hans.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.zh-Hans.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">修改或显示工作负载配置值。
|
||||
若要显示值,请指定相应的命令行选项,而不用提供值。例如,“dotnet workload config --update-mode”</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">控制更新是应查找工作负载集还是每个单个清单的最新版本。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.zh-Hant.xlf
сгенерированный
Normal file
19
src/Cli/dotnet/commands/dotnet-workload/config/xlf/LocalizableStrings.zh-Hant.xlf
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="CommandDescription">
|
||||
<source>Modify or display workload configuration values.
|
||||
To display a value, specify the corresponding command-line option without providing a value. For example: "dotnet workload config --update-mode"</source>
|
||||
<target state="translated">修改或顯示工作負載設定值。
|
||||
若要顯示值,請指定對應的命令列選項而不提供值。例如: "dotnet workload config --update-mode"</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdateModeDescription">
|
||||
<source>Controls whether updates should look for workload sets or the latest version of each individual manifest.</source>
|
||||
<target state="translated">控制更新是否應尋找工作負載集或每個單獨資訊清單的最新版本。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -514,6 +514,7 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
var installStateContents = InstallStateContents.FromPath(path);
|
||||
installStateContents.UseWorkloadSets = newMode;
|
||||
File.WriteAllText(path, installStateContents.ToString());
|
||||
_reporter.WriteLine(string.Format(LocalizableStrings.UpdatedWorkloadMode, newMode ? WorkloadConfigCommandParser.UpdateMode_WorkloadSet : WorkloadConfigCommandParser.UpdateMode_Manifests));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -183,9 +183,6 @@
|
|||
<data name="PrintDownloadLinkOnlyDescription" xml:space="preserve">
|
||||
<value>Only print the list of links to download without downloading.</value>
|
||||
</data>
|
||||
<data name="WorkloadSetMode" xml:space="preserve">
|
||||
<value>Control whether future workload operations should use workload sets or loose manifests.</value>
|
||||
</data>
|
||||
<data name="DownloadToCacheOptionDescription" xml:space="preserve">
|
||||
<value>Download packages needed to install a workload to a folder that can be used for offline installation.</value>
|
||||
</data>
|
||||
|
@ -355,4 +352,10 @@
|
|||
<data name="WorkloadSetUpgrade" xml:space="preserve">
|
||||
<value>Updating workload version from {0} to {1}.</value>
|
||||
</data>
|
||||
<data name="CannotSpecifyVersionOnCommandLineAndInGlobalJson" xml:space="preserve">
|
||||
<value>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</value>
|
||||
</data>
|
||||
<data name="UpdatedWorkloadMode" xml:space="preserve">
|
||||
<value>Successfully updated workload install mode to use {0}.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -462,7 +462,7 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
},
|
||||
rollback: () =>
|
||||
{
|
||||
InstallWorkloadManifestImplementation(manifestUpdate.Reverse(), offlineCache: null, isRollback: true);
|
||||
InstallWorkloadManifestImplementation(manifestUpdate, offlineCache: null, isRollback: true, action: InstallAction.Uninstall);
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -472,7 +472,7 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
}
|
||||
}
|
||||
|
||||
void InstallWorkloadManifestImplementation(ManifestVersionUpdate manifestUpdate, DirectoryPath? offlineCache = null, bool isRollback = false)
|
||||
void InstallWorkloadManifestImplementation(ManifestVersionUpdate manifestUpdate, DirectoryPath? offlineCache = null, bool isRollback = false, InstallAction action = InstallAction.Install)
|
||||
{
|
||||
ReportPendingReboot();
|
||||
|
||||
|
@ -491,7 +491,7 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
MsiPayload msi = GetCachedMsiPayload(msiPackageId, msiPackageVersion, offlineCache);
|
||||
VerifyPackage(msi);
|
||||
DetectState state = DetectPackage(msi.ProductCode, out Version installedVersion);
|
||||
InstallAction plannedAction = PlanPackage(msi, state, InstallAction.Install, installedVersion);
|
||||
InstallAction plannedAction = PlanPackage(msi, state, action, installedVersion);
|
||||
|
||||
ExecutePackage(msi, plannedAction, msiPackageId);
|
||||
|
||||
|
@ -1081,6 +1081,10 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
}
|
||||
}
|
||||
|
||||
void IInstaller.UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode) => UpdateInstallMode(sdkFeatureBand, newMode);
|
||||
void IInstaller.UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode)
|
||||
{
|
||||
UpdateInstallMode(sdkFeatureBand, newMode);
|
||||
Reporter.WriteLine(string.Format(LocalizableStrings.UpdatedWorkloadMode, newMode ? WorkloadConfigCommandParser.UpdateMode_WorkloadSet : WorkloadConfigCommandParser.UpdateMode_Manifests));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,12 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
var resolver = GetResolver();
|
||||
|
||||
var installedWorkloadSets = resolver.GetWorkloadManifestProvider().GetAvailableWorkloadSets();
|
||||
|
||||
|
||||
foreach (var set in installedWorkloadSets.Keys)
|
||||
{
|
||||
WorkloadSetsToKeep.Add(set);
|
||||
}
|
||||
|
||||
var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetDir), "default.json");
|
||||
if (File.Exists(installStateFilePath))
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ using Microsoft.NET.Sdk.WorkloadManifestReader;
|
|||
using NuGet.Common;
|
||||
using NuGet.Versioning;
|
||||
using static Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.DotNet.Workloads.Workload.Install
|
||||
{
|
||||
|
@ -46,14 +47,6 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
_workloadInstaller.GetWorkloadInstallationRecordRepository(), _workloadInstaller, _packageSourceLocation, displayManifestUpdates: Verbosity.IsDetailedOrDiagnostic());
|
||||
|
||||
_workloadSetVersion = parseResult.GetValue(InstallingWorkloadCommandParser.WorkloadSetVersionOption);
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersion))
|
||||
{
|
||||
// If the version of the workload set is currently pinned, treat it as if it were freshly pinned.
|
||||
var installStateContents = InstallStateContents.FromPath(Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"));
|
||||
_workloadSetVersion = installStateContents.WorkloadVersion;
|
||||
}
|
||||
|
||||
ValidateWorkloadIdsInput();
|
||||
}
|
||||
|
||||
private void ValidateWorkloadIdsInput()
|
||||
|
@ -85,6 +78,8 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
restoreActionConfig: RestoreActionConfiguration,
|
||||
verifySignatures: VerifySignatures);
|
||||
|
||||
ValidateWorkloadIdsInput();
|
||||
|
||||
// Take the union of the currently installed workloads and the ones that are being requested. This is so that if there are updates to the manifests
|
||||
// which require new packs for currently installed workloads, those packs will be downloaded.
|
||||
// If the packs are already installed, they won't be included in the results
|
||||
|
@ -97,6 +92,8 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
}
|
||||
else if (!string.IsNullOrWhiteSpace(_downloadToCacheOption))
|
||||
{
|
||||
ValidateWorkloadIdsInput();
|
||||
|
||||
try
|
||||
{
|
||||
// Take the union of the currently installed workloads and the ones that are being requested. This is so that if there are updates to the manifests
|
||||
|
@ -119,11 +116,34 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
}
|
||||
else
|
||||
{
|
||||
var globaljsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory);
|
||||
_workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(globaljsonPath);
|
||||
|
||||
try
|
||||
{
|
||||
ErrorIfGlobalJsonAndCommandLineMismatch(globaljsonPath);
|
||||
|
||||
// Normally we want to validate that the workload IDs specified were valid. However, if there is a global.json file with a workload
|
||||
// set version specified, and we might update the workload version, then we don't do that check here, because we might not have the right
|
||||
// workload set installed yet, and trying to list the available workloads would throw an error
|
||||
if (_skipManifestUpdate || string.IsNullOrEmpty(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
ValidateWorkloadIdsInput();
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json");
|
||||
if (File.Exists(installStateFilePath))
|
||||
{
|
||||
var installStateContents = InstallStateContents.FromPath(installStateFilePath);
|
||||
_workloadSetVersion = installStateContents.WorkloadVersion;
|
||||
}
|
||||
}
|
||||
|
||||
DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption);
|
||||
var workloadIds = _workloadIds.Select(id => new WorkloadId(id));
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersion))
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
InstallWorkloads(
|
||||
workloadIds,
|
||||
|
@ -135,9 +155,18 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
{
|
||||
RunInNewTransaction(context =>
|
||||
{
|
||||
var manifests = HandleWorkloadUpdateFromVersion(context, offlineCache);
|
||||
InstallWorkloadsAndGarbageCollect(context, workloadIds, manifests, offlineCache, false);
|
||||
if (!TryHandleWorkloadUpdateFromVersion(context, offlineCache, out var manifests))
|
||||
{
|
||||
return;
|
||||
}
|
||||
InstallWorkloadsWithInstallRecord(context, _workloadInstaller, workloadIds, _sdkFeatureBand, manifests, offlineCache, false);
|
||||
});
|
||||
|
||||
TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache);
|
||||
|
||||
Reporter.WriteLine();
|
||||
Reporter.WriteLine(string.Format(LocalizableStrings.InstallationSucceeded, string.Join(" ", workloadIds)));
|
||||
Reporter.WriteLine();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -163,7 +192,9 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
if (!skipManifestUpdate)
|
||||
{
|
||||
var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json");
|
||||
if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && File.Exists(installStateFilePath) && InstallStateContents.FromString(File.ReadAllText(installStateFilePath)).Manifests is not null)
|
||||
var installState = InstallStateContents.FromPath(installStateFilePath);
|
||||
if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson) &&
|
||||
(installState?.Manifests is not null || installState?.WorkloadVersion is not null))
|
||||
{
|
||||
// If there is a rollback state file, then we don't want to automatically update workloads when a workload is installed
|
||||
// To update to a new version, the user would need to run "dotnet workload update"
|
||||
|
@ -195,7 +226,10 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
|
||||
if (useWorkloadSets)
|
||||
{
|
||||
manifestsToUpdate = InstallWorkloadSet(context);
|
||||
if (!TryInstallWorkloadSet(context, out manifestsToUpdate))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -204,13 +238,8 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
}
|
||||
}
|
||||
|
||||
InstallWorkloadsAndGarbageCollect(context, workloadIds, manifestsToUpdate, offlineCache, useRollback);
|
||||
InstallWorkloadsWithInstallRecord(context, _workloadInstaller, workloadIds, _sdkFeatureBand, manifestsToUpdate, offlineCache, useRollback);
|
||||
});
|
||||
}
|
||||
|
||||
private void InstallWorkloadsAndGarbageCollect(ITransactionContext context, IEnumerable<WorkloadId> workloadIds, IEnumerable<ManifestVersionUpdate> manifestsToUpdate, DirectoryPath? offlineCache, bool useRollback)
|
||||
{
|
||||
InstallWorkloadsWithInstallRecord(context, _workloadInstaller, workloadIds, _sdkFeatureBand, manifestsToUpdate, offlineCache, useRollback);
|
||||
|
||||
TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache);
|
||||
|
||||
|
@ -271,7 +300,10 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
installer.SaveInstallStateManifestVersions(sdkFeatureBand, GetInstallStateContents(manifestsToUpdate));
|
||||
}
|
||||
|
||||
installer.AdjustWorkloadSetInInstallState(sdkFeatureBand, string.IsNullOrWhiteSpace(_workloadSetVersion) ? null : _workloadSetVersion);
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
installer.AdjustWorkloadSetInInstallState(sdkFeatureBand, string.IsNullOrWhiteSpace(_workloadSetVersion) ? null : _workloadSetVersion);
|
||||
}
|
||||
|
||||
_workloadResolver.RefreshWorkloadManifests();
|
||||
|
||||
|
|
|
@ -88,10 +88,10 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
}
|
||||
}
|
||||
|
||||
public async void DownloadWorkloadSet(string version, DirectoryPath? offlineCache = null)
|
||||
public void DownloadWorkloadSet(string version, DirectoryPath? offlineCache = null)
|
||||
{
|
||||
var correctedVersion = WorkloadSetVersionToWorkloadSetPackageVersion(version);
|
||||
await UpdateManifestWithVersionAsync("Microsoft.NET.Workloads", includePreviews: true, _sdkFeatureBand, new NuGetVersion(correctedVersion), offlineCache);
|
||||
Task.Run(() => UpdateManifestWithVersionAsync("Microsoft.NET.Workloads", includePreviews: true, _sdkFeatureBand, new NuGetVersion(correctedVersion), offlineCache)).Wait();
|
||||
}
|
||||
|
||||
public static async Task BackgroundUpdateAdvertisingManifestsAsync(string userProfileDir)
|
||||
|
@ -247,14 +247,12 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
|
||||
private IEnumerable<ManifestVersionUpdate> CalculateManifestRollbacks(IEnumerable<(ManifestId Id, ManifestVersionWithBand ManifestWithBand)> versionUpdates)
|
||||
{
|
||||
var manifestUpdates = versionUpdates.Select(manifest =>
|
||||
return versionUpdates.Select(manifest =>
|
||||
{
|
||||
var (id, (version, band)) = manifest;
|
||||
var (installedVersion, installedBand) = GetInstalledManifestVersion(id);
|
||||
return new ManifestVersionUpdate(id, installedVersion, installedBand.ToString(), version, band.ToString());
|
||||
});
|
||||
|
||||
return manifestUpdates;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<WorkloadDownload>> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand)
|
||||
|
@ -475,26 +473,21 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
|
||||
public IEnumerable<ManifestVersionUpdate> ParseRollbackDefinitionFiles(IEnumerable<string> rollbackFilePaths)
|
||||
{
|
||||
var zeroVersion = new ManifestVersion("0.0.0");
|
||||
if (rollbackFilePaths.Count() == 1)
|
||||
{
|
||||
return CalculateManifestRollbacks(rollbackFilePaths.Single());
|
||||
return ParseRollbackDefinitionFile(rollbackFilePaths.Single(), _sdkFeatureBand).Select(manifest =>
|
||||
{
|
||||
var (id, (version, band)) = manifest;
|
||||
return new ManifestVersionUpdate(id, zeroVersion, band.ToString(), version, band.ToString());
|
||||
});
|
||||
}
|
||||
|
||||
var currentManifestIds = GetInstalledManifestIds();
|
||||
// Create a single workload set that includes all the others
|
||||
List<(ManifestId, ManifestVersionWithBand)> fullSet = new();
|
||||
foreach (var rollbackFile in rollbackFilePaths)
|
||||
{
|
||||
var rollbacks = ParseRollbackDefinitionFile(rollbackFile, _sdkFeatureBand);
|
||||
|
||||
var unrecognizedManifestIds = rollbacks.Where(rollbackManifest => !currentManifestIds.Contains(rollbackManifest.Id));
|
||||
if (unrecognizedManifestIds.Any())
|
||||
{
|
||||
_reporter.WriteLine(string.Format(LocalizableStrings.RollbackDefinitionContainsExtraneousManifestIds, rollbackFile, string.Join(" ", unrecognizedManifestIds)).Yellow());
|
||||
rollbacks = rollbacks.Where(rollbackManifest => currentManifestIds.Contains(rollbackManifest.Id));
|
||||
}
|
||||
|
||||
fullSet.AddRange(rollbacks);
|
||||
fullSet.AddRange(ParseRollbackDefinitionFile(rollbackFile, _sdkFeatureBand));
|
||||
}
|
||||
|
||||
var reducedFullSet = fullSet.DistinctBy<(ManifestId, ManifestVersionWithBand), ManifestId>(update => update.Item1).ToList();
|
||||
|
@ -504,7 +497,11 @@ namespace Microsoft.DotNet.Workloads.Workload.Install
|
|||
throw new ArgumentException("There were duplicates of the following manifests between the workload set files: " + string.Join(", ", duplicates));
|
||||
}
|
||||
|
||||
return CalculateManifestRollbacks(fullSet);
|
||||
return fullSet.Select(manifest =>
|
||||
{
|
||||
var (id, (version, band)) = manifest;
|
||||
return new ManifestVersionUpdate(id, zeroVersion, band.ToString(), version, band.ToString());
|
||||
});
|
||||
}
|
||||
|
||||
private static IEnumerable<(ManifestId Id, ManifestVersionWithBand ManifestWithBand)> ParseRollbackDefinitionFile(string rollbackDefinitionFilePath, SdkFeatureBand featureBand)
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Možnosti {0} a {1} nelze použít společně. Při instalaci ze souboru vráceného zpět odeberte {0}. V opačném případě odeberte {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Kontrolují se aktualizované manifesty úloh.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Vytiskne pouze seznam odkazů, které se mají stáhnout, aniž by se tento seznam stahoval.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Instaluje se balíček {0} verze {1} z offline mezipaměti {2}.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">CESTA</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Určete, jestli by budoucí operace úloh měly používat sady úloh nebo volné manifesty.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Aktualizuje se verze úlohy z {0} na {1}.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Die Optionen {0} und {1} können nicht zusammen verwendet werden. Entfernen Sie bei der Installation aus einer Rollbackdatei {0}. Entfernen Sie andernfalls {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Es wird nach aktualisierten Workloadmanifesten gesucht.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Drucken Sie nur die Liste der Links zum Herunterladen, ohne sie herunterzuladen.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Das Paket "{0}", Version {1}, aus dem Offlinecache "{2}" wird installiert.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">PFAD</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Hiermit wird gesteuert, ob zukünftige Workloadvorgänge Workloadsätze oder lose Manifeste verwenden sollen.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Die Workloadversion wird von {0} auf {1} aktualisiert.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">No se pueden usar las opciones {0} y {1} juntas. Si se instala desde un archivo de reversión, quite {0}. De lo contrario, quite {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Comprobando si hay manifiestos de carga de trabajo actualizados.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Imprima solo la lista de vínculos para descargar, sin descargarla.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Instalando el paquete {0}, versión {1} desde la caché sin conexión {2}.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">RUTA DE ACCESO</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Controle si las operaciones de carga de trabajo futuras deben usar conjuntos de cargas de trabajo o manifiestos flexibles.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Actualizando la versión de carga de trabajo de {0} a {1}.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Impossible d’utiliser les options {0} et {1} ensemble. Si vous installez à partir d’un fichier de restauration, supprimez {0}. Sinon, supprimez {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="translated">Impossible de spécifier une version de charge de travail particulière sur la ligne de commande via --version ou --from-history lorsqu’une version est déjà spécifiée dans global.json fichier {0}. Pour mettre à jour la version de la charge de travail installée globalement, exécutez la commande en dehors du chemin contenant ce fichier global.json ou mettez à jour la version spécifiée dans le fichier global.json et exécutez « dotnet workload update »</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Recherche de manifestes de charge de travail mis à jour</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Imprimer uniquement la liste des liens à télécharger sans télécharger.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="translated">Le mode d’installation de la charge de travail a été mis à jour pour utiliser {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Installation du {0} de {1} la version du package à partir du {2} de cache hors connexion.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">PATH</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Contrôlez si les futures opérations de charge de travail doivent utiliser des ensembles de charges de travail ou des manifestes lâches.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Mise à jour de la version de la charge de travail de {0} à {1}.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Impossibile utilizzare contemporaneamente le opzioni {0} e {1}. Se si esegue l'installazione da un file di rollback, rimuovere {0}. In caso contrario, rimuovere {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Verifica della disponibilità di manifesti del carico di lavoro aggiornati.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Stampa solo l'elenco dei collegamenti da scaricare senza scaricarlo.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Installazione del pacchetto {0}, versione {1}, dalla cache offline {2}.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">PERCORSO</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Controllare se le operazioni future del carico di lavoro devono usare set di carichi di lavoro o manifesti separati.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Aggiornamento della versione del carico di lavoro da {0} a {1}.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">{0} オプションと {1} オプションを併用することはできません。ロールバック ファイルからインストールする場合、{0} を削除してください。その他の場合には、{1} を削除します</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="translated">global.json ファイル {0} に既にバージョンが指定されている場合は、コマンド ラインで --version または --from-history を使用して特定のワークロード バージョンを指定することはできません。グローバルにインストールされたワークロード バージョンを更新するには、その global.json ファイルを含むパスの外部でコマンドを実行するか、global.json ファイルで指定されたバージョンを更新して、"dotnet workload update" を実行します。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">更新されたワークロード マニフェストを確認しています。</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">ダウンロードするリンクの一覧をダウンロードせず、印刷だけを行います。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="translated">{0} を使用するようにワークロード インストール モードが正常に更新されました。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">オフライン キャッシュ {2} でパッケージ {0} のバージョン {1} をインストールしています。</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">パス</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">将来のワークロード操作でワークロード セットを使用するか、ルーズ マニフェストを使用するかを制御します。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">ワークロードのバージョンを {0} から {1} に更新しています。</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">{0} 및 {1} 옵션을 함께 사용할 수 없습니다. 롤백 파일에서 설치하는 경우 {0}을(를) 제거합니다. 그렇지 않으면 {1}을(를) 제거합니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">업데이트된 워크로드 매니페스트를 확인하는 중입니다.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">다운로드할 링크 목록을 다운로드하지 않고 인쇄만 합니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">오프라인 캐시 {2}에서 패키지 {0} 버전 {1}(을)를 설치하는 중입니다.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">경로</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">향후 워크로드 작업에서 워크로드 집합을 사용할지, 매니페스트를 완화할지를 제어합니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">워크로드 버전을 {0}에서 {1}(으)로 업데이트하는 중입니다.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Nie można jednocześnie używać poleceń {0} i {1}. W przypadku instalowania z pliku wycofywania usuń polecenie {0}. W przeciwnym razie usuń polecenie {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Sprawdzanie zaktualizowanych manifestów obciążenia.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Drukuj tylko listę linków do pobrania bez ich pobierania.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Instalowanie pakietu {0} w wersji {1} z pamięci podręcznej w trybie offline {2}.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">ŚCIEŻKA</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Określ, czy przyszłe operacje związane z obciążeniami powinny wykorzystywać zestawy obciążeń, czy luźne manifesty.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Aktualizowanie wersji obciążenia z {0} do {1}.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Não é possível usar as opções {0} e {1} juntas. Se estiver instalando a partir de um arquivo de reversão, remova {0}. Caso contrário, remova {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Verificando manifestos de carga de trabalho atualizados.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Somente imprimir a lista de links para download sem baixá-la.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Instalando o pacote {0} versão {1} do cache offline {2}.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">CAMINHO</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Controle se as operações de carga de trabalho futuras devem usar conjuntos de carga de trabalho ou manifestos flexíveis.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Atualizando a versão da carga de trabalho {0} para {1}.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Невозможно использовать параметры {0} и {1} одновременно. При установке из файла отката удалите {0}, в противном случае удалите {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Проверка обновленных манифестов рабочей нагрузки.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">Печатать только список ссылок для скачивания, не выполняя загрузку.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">Установка пакета {0} версии {1} из автономного кэша {2}.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">PATH</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Укажите, должны ли будущие операции рабочей нагрузки использовать наборы рабочей нагрузки или свободные манифесты.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">Обновление версии рабочей нагрузки с {0} до {1}.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">{0} ve {1} seçenekleri birlikte kullanılamıyor. Bir geri alma dosyasından yükleniyorsa {0} seçeneğini kaldırın. Aksi takdirde, {1} seçeneğini kaldırın</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">Güncelleştirilmiş iş yükü bildirimleri denetleniyor.</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">İndirmeden, yalnızca indirilecek bağlantıların listesini yazdırın.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">{0} paketi sürüm {1}, {2} çevrimdışı önbelleğinden yükleniyor.</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">YOL</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">Gelecekteki iş yükü işlemlerinin iş yükü kümelerini mi yoksa gevşek bildirimleri mi kullanması gerektiğini kontrol edin.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">İş yükü {0} sürümünden {1} sürümüne güncelleştiriliyor.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">不能同时使用 {0} 和 {1} 选项。如果从回滚文件安装,请删除 {0}。否则,请删除 {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="translated">当 global.json 文件 {0} 中已指定版本时,无法在命令行上通过 --version 或 --from-history 指定特定工作负载版本。若要更新全局安装的工作负载版本,请在包含该 global.json 文件的路径外部运行命令,或者更新 global.json 文件中指定的版本,然后运行 "dotnet workload update"。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">正在检查更新的工作负载清单。</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">仅打印要下载的链接的列表,而不下载列表。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="translated">已成功更新工作负载安装模式以使用 {0}。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">正在从脱机缓存 {2} 安装程序包 {0} 版本 {1}。</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">路径</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">控制未来的工作负载操作应该使用工作负载集还是松散清单。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">正在将工作负载版本从 {0} 更新为 {1}。</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">無法同時使用 {0} 與 {1} 選項。如果從復原檔案安裝,請移除 {0}。否則,請移除 {1}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CannotSpecifyVersionOnCommandLineAndInGlobalJson">
|
||||
<source>Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</source>
|
||||
<target state="new">Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update."</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="CheckForUpdatedWorkloadManifests">
|
||||
<source>Checking for updated workload manifests.</source>
|
||||
<target state="translated">正在檢查更新的工作負載資訊清單。</target>
|
||||
|
@ -282,6 +287,11 @@
|
|||
<target state="translated">只列印要下載的連結清單,而不下載。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UpdatedWorkloadMode">
|
||||
<source>Successfully updated workload install mode to use {0}.</source>
|
||||
<target state="new">Successfully updated workload install mode to use {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="UsingCacheForPackInstall">
|
||||
<source>Installing package {0} version {1} from offline cache {2}.</source>
|
||||
<target state="translated">正在從離線快取 {2} 安裝套件 {0} 版本 {1}。</target>
|
||||
|
@ -367,11 +377,6 @@
|
|||
<target state="translated">路徑</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetMode">
|
||||
<source>Control whether future workload operations should use workload sets or loose manifests.</source>
|
||||
<target state="translated">控制未來的工作負載作業應該使用工作負載集合還是鬆散資訊清單。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetUpgrade">
|
||||
<source>Updating workload version from {0} to {1}.</source>
|
||||
<target state="translated">正在將工作負載版本從 {0} 更新為 {1}。</target>
|
||||
|
|
|
@ -131,4 +131,10 @@
|
|||
<data name="WorkloadSetVersion" xml:space="preserve">
|
||||
<value>Workload version: {0}</value>
|
||||
</data>
|
||||
<data name="WorkloadSetFromGlobalJsonInstalled" xml:space="preserve">
|
||||
<value>Found workload version {0} pinned in the global.json file at {1}.</value>
|
||||
</data>
|
||||
<data name="WorkloadSetFromGlobalJsonNotInstalled" xml:space="preserve">
|
||||
<value>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -74,29 +74,46 @@ namespace Microsoft.DotNet.Workloads.Workload.List
|
|||
}
|
||||
else
|
||||
{
|
||||
var manifestInfoDict = _workloadListHelper.WorkloadResolver.GetInstalledManifests().ToDictionary(info => info.Id, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
InstalledWorkloadsCollection installedWorkloads = _workloadListHelper.AddInstalledVsWorkloads(installedList);
|
||||
var globalJsonInformation = _workloadListHelper.ManifestProvider.GetGlobalJsonInformation();
|
||||
Reporter.WriteLine();
|
||||
PrintableTable<KeyValuePair<string, string>> table = new();
|
||||
table.AddColumn(InformationStrings.WorkloadIdColumn, workload => workload.Key);
|
||||
table.AddColumn(InformationStrings.WorkloadManfiestVersionColumn, workload =>
|
||||
if (globalJsonInformation is not null)
|
||||
{
|
||||
var m = _workloadListHelper.WorkloadResolver.GetManifestFromWorkload(new WorkloadId(workload.Key));
|
||||
var manifestInfo = manifestInfoDict[m.Id];
|
||||
return m.Version + "/" + manifestInfo.ManifestFeatureBand;
|
||||
});
|
||||
table.AddColumn(InformationStrings.WorkloadSourceColumn, workload => workload.Value);
|
||||
|
||||
table.PrintRows(installedWorkloads.AsEnumerable(), l => Reporter.WriteLine(l));
|
||||
|
||||
var installState = InstallStateContents.FromPath(Path.Combine(WorkloadInstallType.GetInstallStateFolder(_workloadListHelper._currentSdkFeatureBand, _workloadListHelper.DotnetPath), "default.json"));
|
||||
if (installState.UseWorkloadSets == true)
|
||||
{
|
||||
Reporter.WriteLine();
|
||||
Reporter.WriteLine(string.Format(LocalizableStrings.WorkloadSetVersion, _workloadListHelper.WorkloadResolver.GetWorkloadVersion() ?? "unknown"));
|
||||
Reporter.WriteLine(string.Format(
|
||||
globalJsonInformation.WorkloadVersionInstalled ?
|
||||
LocalizableStrings.WorkloadSetFromGlobalJsonInstalled :
|
||||
LocalizableStrings.WorkloadSetFromGlobalJsonNotInstalled,
|
||||
globalJsonInformation.GlobalJsonVersion,
|
||||
globalJsonInformation.GlobalJsonPath));
|
||||
}
|
||||
|
||||
|
||||
if (globalJsonInformation?.WorkloadVersionInstalled != false)
|
||||
{
|
||||
var manifestInfoDict = _workloadListHelper.WorkloadResolver.GetInstalledManifests().ToDictionary(info => info.Id, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
InstalledWorkloadsCollection installedWorkloads = _workloadListHelper.AddInstalledVsWorkloads(installedList);
|
||||
PrintableTable<KeyValuePair<string, string>> table = new();
|
||||
table.AddColumn(InformationStrings.WorkloadIdColumn, workload => workload.Key);
|
||||
table.AddColumn(InformationStrings.WorkloadManfiestVersionColumn, workload =>
|
||||
{
|
||||
var m = _workloadListHelper.WorkloadResolver.GetManifestFromWorkload(new WorkloadId(workload.Key));
|
||||
var manifestInfo = manifestInfoDict[m.Id];
|
||||
return m.Version + "/" + manifestInfo.ManifestFeatureBand;
|
||||
});
|
||||
table.AddColumn(InformationStrings.WorkloadSourceColumn, workload => workload.Value);
|
||||
|
||||
table.PrintRows(installedWorkloads.AsEnumerable(), l => Reporter.WriteLine(l));
|
||||
|
||||
if (globalJsonInformation is null)
|
||||
{
|
||||
var installState = InstallStateContents.FromPath(Path.Combine(WorkloadInstallType.GetInstallStateFolder(_workloadListHelper._currentSdkFeatureBand, _workloadListHelper.DotnetPath), "default.json"));
|
||||
if (installState.UseWorkloadSets == true)
|
||||
{
|
||||
Reporter.WriteLine();
|
||||
Reporter.WriteLine(string.Format(LocalizableStrings.WorkloadSetVersion, _workloadListHelper.WorkloadResolver.GetWorkloadVersion() ?? "unknown"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reporter.WriteLine();
|
||||
Reporter.WriteLine(LocalizableStrings.WorkloadListFooter);
|
||||
Reporter.WriteLine();
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Pokud chcete najít další úlohy, které se mají nainstalovat, použijte `dotnet workload search`.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Verze úlohy: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Verwenden Sie „dotnet workload search“, um zusätzliche zu installierende Workloads zu finden.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Workloadversion: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Use "dotnet workload search" para buscar cargas de trabajo adicionales para instalar.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Versión de carga de trabajo: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Utilisez `dotnet workload search` pour rechercher d’autres charges de travail à installer.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="translated">Version de charge de travail trouvée {0} épinglée dans le fichier global.json à {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="translated">Version de charge de travail {0} épinglée dans le fichier global.json à {1}, mais elle n’a pas été installée. L’exécution de « dotnet workload install », « dotnet workload update » ou « dotnet workload restore » peut résoudre ce problème.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Version de la charge de travail : {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Utilizzare la `dotnet workload search` per trovare i carichi di lavoro aggiuntivi da installare.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Versione carico di lavoro: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">`dotnet workload search` を使用して追加ワークロードを検出し、インストールします。</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="translated">{1} で、global.json ファイルでピン留めされたワークロード バージョン {0} が見つかりました。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="translated">{1} で、global.json ファイルでピン留めされたワークロード バージョン {0} が見つかりましたが、インストールされませんでした。'dotnet workload install'、'dotnet workload update'、または 'dotnet workload restore' を実行すると、この問題が解決する場合があります。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">ワークロードのバージョン: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">`dotnet workload search`을 사용하여 설치할 추가 워크로드를 찾습니다.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">워크로드 버전: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Użyj polecenia „dotnet workload search”, aby znaleźć dodatkowe obciążenia do zainstalowania.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Wersja obciążenia: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Use `dotnet workload search` para encontrar cargas de trabalho adicionais a serem instaladas.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Versão da carga de trabalho: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Используйте `dotnet workload search`, чтобы найти дополнительные рабочие нагрузки для установки.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">Версия рабочей нагрузки: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">Yüklenecek ek iş yüklerini bulmak için `dotnet workload search` kullanın.</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">İş yükü sürümü: {0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">使用`dotnet workload search`查找要安装的其他工作负载。</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="translated">在 {1} 处找到固定在 global.json 文件中的工作负载版本 {0}。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="translated">在 {1} 处找到固定在 global.json 文件中的工作负载版本 {0},但未安装它。运行 `dotnet workload install`、`dotnet workload update` 或 `dotnet workload restore` 可能会解决此问题。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">工作负载版本:{0}</target>
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
<target state="translated">使用 `dotnet workload search` 尋找其他要安裝的工作負載。</target>
|
||||
<note>{Locked="dotnet workload search"}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetFromGlobalJsonNotInstalled">
|
||||
<source>Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</source>
|
||||
<target state="new">Found workload version {0} pinned in the global.json file at {1}, but it was not installed. Running `dotnet workload install`, `dotnet workload update`, or `dotnet workload restore` may fix this.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetVersion">
|
||||
<source>Workload version: {0}</source>
|
||||
<target state="translated">工作負載版本: {0}</target>
|
||||
|
|
|
@ -138,9 +138,6 @@
|
|||
<data name="WorkloadUpdateFailed" xml:space="preserve">
|
||||
<value>Workload update failed: {0}</value>
|
||||
</data>
|
||||
<data name="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto" xml:space="preserve">
|
||||
<value>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</value>
|
||||
</data>
|
||||
<data name="FromPreviousSdkOptionDescription" xml:space="preserve">
|
||||
<value>Include workloads installed with earlier SDK versions in update.</value>
|
||||
</data>
|
||||
|
@ -159,4 +156,7 @@
|
|||
<data name="UpdateFromRollbackSwitchesModeToLooseManifests" xml:space="preserve">
|
||||
<value>Updating to a rollback file is not compatible with workload sets. Install and Update will now use loose manifests. To update to a specific workload version, use --version.</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="NoWorkloadUpdateFound" xml:space="preserve">
|
||||
<value>No workload update found.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -23,8 +23,6 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
private readonly bool _adManifestOnlyOption;
|
||||
private readonly bool _printRollbackDefinitionOnly;
|
||||
private readonly bool _fromPreviousSdk;
|
||||
private readonly string _workloadSetMode;
|
||||
|
||||
public WorkloadUpdateCommand(
|
||||
ParseResult parseResult,
|
||||
IReporter reporter = null,
|
||||
|
@ -43,7 +41,6 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
_adManifestOnlyOption = parseResult.GetValue(WorkloadUpdateCommandParser.AdManifestOnlyOption);
|
||||
_printRollbackDefinitionOnly = parseResult.GetValue(WorkloadUpdateCommandParser.PrintRollbackOption);
|
||||
var resolvedReporter = _printDownloadLinkOnly || _printRollbackDefinitionOnly ? NullReporter.Instance : Reporter;
|
||||
_workloadSetMode = parseResult.GetValue(InstallingWorkloadCommandParser.WorkloadSetMode);
|
||||
|
||||
_workloadInstaller = _workloadInstallerFromConstructor ?? WorkloadInstallerFactory.GetWorkloadInstaller(resolvedReporter,
|
||||
_sdkFeatureBand, _workloadResolver, Verbosity, _userProfileDir, VerifySignatures, PackageDownloader,
|
||||
|
@ -98,28 +95,16 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
var workloadSet = WorkloadSet.FromManifests(_workloadResolver.GetInstalledManifests());
|
||||
Reporter.WriteLine(workloadSet.ToJson());
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(_workloadSetMode))
|
||||
{
|
||||
if (_workloadSetMode.Equals("workloadset", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_workloadInstaller.UpdateInstallMode(_sdkFeatureBand, true);
|
||||
}
|
||||
else if (_workloadSetMode.Equals("loosemanifest", StringComparison.OrdinalIgnoreCase) ||
|
||||
_workloadSetMode.Equals("auto", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_workloadInstaller.UpdateInstallMode(_sdkFeatureBand, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new GracefulException(string.Format(LocalizableStrings.WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto, _workloadSetMode), isUserError: true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var globaljsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory);
|
||||
_workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(globaljsonPath);
|
||||
|
||||
try
|
||||
{
|
||||
ErrorIfGlobalJsonAndCommandLineMismatch(globaljsonPath);
|
||||
DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption);
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersion))
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
CalculateManifestUpdatesAndUpdateWorkloads(_includePreviews, offlineCache);
|
||||
}
|
||||
|
@ -127,7 +112,10 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
{
|
||||
RunInNewTransaction(context =>
|
||||
{
|
||||
var manifestUpdates = HandleWorkloadUpdateFromVersion(context, offlineCache);
|
||||
if (!TryHandleWorkloadUpdateFromVersion(context, offlineCache, out var manifestUpdates))
|
||||
{
|
||||
return;
|
||||
}
|
||||
UpdateWorkloads(false, manifestUpdates, offlineCache, context);
|
||||
});
|
||||
}
|
||||
|
@ -167,7 +155,10 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
{
|
||||
if (useWorkloadSets)
|
||||
{
|
||||
manifestsToUpdate = InstallWorkloadSet(context);
|
||||
if (!TryInstallWorkloadSet(context, out manifestsToUpdate))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -176,11 +167,15 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
}
|
||||
|
||||
UpdateWorkloads(useRollback, manifestsToUpdate, offlineCache, context);
|
||||
|
||||
Reporter.WriteLine();
|
||||
Reporter.WriteLine(string.Format(LocalizableStrings.UpdateSucceeded, string.Join(" ", workloadIds)));
|
||||
Reporter.WriteLine();
|
||||
});
|
||||
|
||||
WorkloadInstallCommand.TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache);
|
||||
|
||||
_workloadManifestUpdater.DeleteUpdatableWorkloadsFile();
|
||||
|
||||
Reporter.WriteLine();
|
||||
Reporter.WriteLine(string.Format(LocalizableStrings.UpdateSucceeded, string.Join(" ", workloadIds)));
|
||||
Reporter.WriteLine();
|
||||
}
|
||||
|
||||
private void UpdateWorkloads(bool useRollback, IEnumerable<ManifestVersionUpdate> manifestsToUpdate, DirectoryPath? offlineCache, ITransactionContext context)
|
||||
|
@ -188,10 +183,6 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
var workloadIds = GetUpdatableWorkloads();
|
||||
|
||||
UpdateWorkloadsWithInstallRecord(_sdkFeatureBand, manifestsToUpdate, useRollback, context, offlineCache);
|
||||
|
||||
WorkloadInstallCommand.TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache);
|
||||
|
||||
_workloadManifestUpdater.DeleteUpdatableWorkloadsFile();
|
||||
}
|
||||
|
||||
private void WriteSDKInstallRecordsForVSWorkloads(IEnumerable<WorkloadId> updateableWorkloads)
|
||||
|
@ -228,7 +219,10 @@ namespace Microsoft.DotNet.Workloads.Workload.Update
|
|||
_workloadInstaller.RemoveManifestsFromInstallState(sdkFeatureBand);
|
||||
}
|
||||
|
||||
_workloadInstaller.AdjustWorkloadSetInInstallState(sdkFeatureBand, string.IsNullOrWhiteSpace(_workloadSetVersion) ? null : _workloadSetVersion);
|
||||
if (string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson))
|
||||
{
|
||||
_workloadInstaller.AdjustWorkloadSetInInstallState(sdkFeatureBand, string.IsNullOrWhiteSpace(_workloadSetVersion) ? null : _workloadSetVersion);
|
||||
}
|
||||
|
||||
_workloadResolver.RefreshWorkloadManifests();
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ namespace Microsoft.DotNet.Cli
|
|||
command.Options.Add(CommonOptions.VerbosityOption);
|
||||
command.Options.Add(PrintRollbackOption);
|
||||
command.Options.Add(WorkloadInstallCommandParser.SkipSignCheckOption);
|
||||
command.Options.Add(InstallingWorkloadCommandParser.WorkloadSetMode);
|
||||
|
||||
command.SetAction((parseResult) => new WorkloadUpdateCommand(parseResult).Execute());
|
||||
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Aktualizuje úlohy na základě zadaného souboru definice vrácení zpět.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Pro toto pásmo funkcí nejsou nainstalované žádné úlohy. Pokud chcete provést aktualizaci úlohy nainstalované z předchozí sady SDK, přidejte možnost --from-previous-sdk.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">Nepovedlo se stáhnout balíčky aktualizace úlohy do mezipaměti: {0}.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Neplatný argument „{0}“ argumentu --mode pro aktualizaci úlohy dotnet. Jediné podporované režimy jsou workloadset, loosemanifest a auto.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Manifesty reklamy se úspěšně aktualizovaly.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Aktualisieren Sie Workloads basierend auf der angegebenen Rollbackdefinitionsdatei.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Für diesen Featurebereich sind keine Workloads installiert. Um Workloads zu aktualisieren, die mit früheren SDK-Versionen installiert wurden, schließen Sie die Option „--from-previous-sdk“ ein.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">Fehler beim Herunterladen von Paketen zur Workloadaktualisierung in den Cache: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Ungültiges Argument "{0}" zum Argument --mode für das Dotnet Workload-Update. Es werden nur die Modi "workloadset", "loosemanifest" und "auto" unterstützt.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Werbemanifeste wurden erfolgreich aktualisiert.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Actualice las cargas de trabajo en función del archivo de definición de reversión especificado.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">No hay cargas de trabajo instaladas para esta banda de características. Para actualizar las cargas de trabajo instaladas con versiones anteriores del SDK, incluya la opción --from-previous-sdk.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">No se pudieron descargar los paquetes de actualización de la carga de trabajo en caché: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Argumento "{0}" no válido para el argumento --mode para la actualización de la carga de trabajo de dotnet. Solo los modos admitidos son "workloadset", "loosemanifest" y "auto".</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Los manifiestos de publicidad se han actualizado correctamente.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Mettez à jour les charges de travail en fonction du fichier de définition de restauration spécifié.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="translated">Aucune mise à jour de charge de travail trouvée.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Aucune charge de travail installée pour cette bande de fonctionnalités. Pour mettre à jour les charges de travail installées avec des versions antérieures du SDK, incluez l'option --from-previous-sdk.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">Échec du téléchargement des packages de mise à jour de charge de travail dans le cache : {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Argument «{0}» non valide à l’argument --mode pour la mise à jour de charge de travail dotnet. Seuls les modes pris en charge sont « workloadset », « loosemanifest » et « auto ».</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Les manifestes de publicité ont été mis à jour.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Aggiornare i carichi di lavoro in base al file di definizione di ripristino dello stato precedente specificato.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Nessun carico di lavoro installato per questa banda di caratteristiche. Per eseguire l'aggiornamento da un SDK precedente, includere l'opzione --from-previous-sdk.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">Non è stato possibile scaricare i pacchetti di aggiornamento del carico di lavoro nella cache: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Argomento non valido "{0}" per l'argomento --mode per l'aggiornamento del carico di lavoro dotnet. Le uniche modalità supportate sono "workloadset", "loosemanifest" e "auto".</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">I manifesti pubblicitari sono stati aggiornati.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">指定されたロールバック定義ファイルに基づいてワークロードを更新します。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="translated">ワークロードの更新が見つかりませんでした。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">この機能バンドにはワークロードがインストールされていません。以前の SDK バージョンでインストールしたワークロードを更新するには、--from-previous-sdk オプションを含めます。</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">ワークロード更新パッケージをキャッシュにダウンロードできませんでした: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">.NET ワークロード更新の --mode 引数に対する引数 "{0}" が無効です。サポートされているモードは、"workloadset"、"loosemanifest"、および "auto" のみです。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">広告マニフェストを正常に更新しました。</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">지정된 롤백 정의 파일을 기반으로 워크로드를 업데이트합니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">이 기능 밴드에 대해 설치된 워크로드가 없습니다. 이전 SDK 버전으로 설치된 워크로드를 업데이트하려면 --from-previous-sdk 옵션을 포함합니다.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">캐시할 워크로드 업데이트 패키지를 다운로드하지 못했습니다. {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">dotnet 워크로드 업데이트의 --mode 인수에 대한 "{0}" 인수가 잘못되었습니다. "workloadset", "loosemanifest", "auto" 모드만 지원됩니다.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">알림 매니페스트를 업데이트했습니다.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Zaktualizuj obciążenia na podstawie określonego pliku definicji wycofywania.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Nie zainstalowano żadnych obciążeń dla tego pasma funkcji. Aby zaktualizować obciążenia zainstalowane przy użyciu wcześniejszych wersji zestawu SDK, dołącz opcję --from-previous-sdk.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">Nie można pobrać pakietów aktualizacji pakietów roboczych do pamięci podręcznej: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Nieprawidłowy argument „{0}” argumentu --mode dla aktualizacji obciążenia dotnet. Obsługiwane tryby to „workloadset”, „loosemanifest” i „auto”.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Pomyślnie zaktualizowano manifesty reklam.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Atualizar cargas de trabalho com base no arquivo de definição de reversão especificado.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Nenhuma carga de trabalho instalada para esta faixa de recursos. Para atualizar cargas de trabalho instaladas com versões anteriores do SDK, inclua a opção --from-previous-sdk.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">Falha ao baixar pacotes de atualização de carga de trabalho para o cache: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Argumento "{0}" inválido para o argumento --mode para atualização de carga de trabalho dotnet. Os únicos modos com suporte são "workloadset", "loosemanifest" e "auto".</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Manifestos de anúncio atualizados com êxito.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">Обновление рабочих нагрузок на основе указанного файла определения отката.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Для этого диапазона функций не установлены рабочие нагрузки. Чтобы обновить рабочие нагрузки, установленные в более ранних версиях SDK, включите параметр --from-previous-sdk.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">Не удалось скачать пакеты обновления рабочей нагрузки в кэш: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Недопустимый аргумент "{0}" для аргумента --mode для обновления рабочей нагрузки dotnet. Поддерживаются только режимы "workloadset", "loosemanifest" и "auto".</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Манифесты рекламы успешно обновлены.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">İş yüklerini belirtilen geri alma tanım dosyasına göre güncelleştirin.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">Bu özellik bandı için iş yükü yüklenmedi. Önceki SDK sürümleriyle yüklenen iş yüklerini güncelleştirmek için --from-previous-sdk seçeneğini ekleyin.</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">İş yükü güncelleştirme paketleri önbelleğe yüklenemedi: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">Dotnet iş yükü güncelleştirmesi için --mod bağımsız değişkeninde geçersiz "{0}" bağımsız değişkeni. Yalnızca "workloadset", "loosemanifest" ve "auto" modları desteklenir.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">Reklam bildirimleri başarıyla güncelleştirildi.</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">基于指定的回滚定义文件更新工作负载。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="translated">找不到工作负载更新。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">没有为此功能安装工作负载。若要更新更早的 SDK 版本安装的工作负载,请包括 “--from-previous-sdk” 选项。</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">未能将工作负载更新程序包下载到缓存: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">dotnet 工作负载更新的 --mode 参数的参数“{0}”无效。仅支持“workloadset”、“loosemanifest”和“auto”模式。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">成功更新广告清单。</target>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<target state="translated">根據指定的復原定義檔更新工作負載。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadUpdateFound">
|
||||
<source>No workload update found.</source>
|
||||
<target state="new">No workload update found.</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="NoWorkloadsToUpdate">
|
||||
<source>No workloads installed for this feature band. To update workloads installed with earlier SDK versions, include the --from-previous-sdk option.</source>
|
||||
<target state="translated">此功能帶未安裝任何工作負載。若要更新與舊版本 SDK 一起安裝的工作負載,請包含 --from-previous-sdk 選項。</target>
|
||||
|
@ -57,11 +62,6 @@
|
|||
<target state="translated">無法將工作負載更新套件下載到快取: {0}</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto">
|
||||
<source>Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".</source>
|
||||
<target state="translated">dotnet 工作負載更新的 --mode 引數之引數 "{0}" 無效。僅支援 "workloadset"、"loosemanifest" 和 "auto" 模式。</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkloadUpdateAdManifestsSucceeded">
|
||||
<source>Successfully updated advertising manifests.</source>
|
||||
<target state="translated">已成功更新廣告資訊清單。</target>
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
<EmbeddedResource Update="**\dotnet-workload\repair\*.resx" Namespace="Microsoft.DotNet.Workloads.Workload.Repair" />
|
||||
<EmbeddedResource Update="**\dotnet-workload\elevate\*.resx" Namespace="Microsoft.DotNet.Workloads.Workload.Elevate" />
|
||||
<EmbeddedResource Update="**\dotnet-workload\clean\*.resx" Namespace="Microsoft.DotNet.Workloads.Workload.Clean" />
|
||||
<EmbeddedResource Update="**\dotnet-workload\config\*.resx" Namespace="Microsoft.DotNet.Workloads.Workload.Config" />
|
||||
<EmbeddedResource Update="Installer\Windows\*.resx" Namespace="Microsoft.DotNet.Installer.Windows" />
|
||||
<EmbeddedResource Update="ToolManifest\*.resx" Namespace="Microsoft.DotNet.ToolManifest" />
|
||||
<EmbeddedResource Update="NugetSearch\*.resx" Namespace="Microsoft.DotNet.NugetSearch" />
|
||||
|
@ -88,7 +89,7 @@
|
|||
<!-- override the Microsoft.TemplateEngine.Cli's dependency with the latest Microsoft.DotNet.TemplateLocator -->
|
||||
<ProjectReference Include="../../Microsoft.DotNet.TemplateLocator\Microsoft.DotNet.TemplateLocator.csproj" />
|
||||
<ProjectReference Include="../../Resolvers\Microsoft.DotNet.NativeWrapper\Microsoft.DotNet.NativeWrapper.csproj" />
|
||||
<ProjectReference Include="../../Microsoft.Win32.Msi/Microsoft.Win32.Msi.csproj"/>
|
||||
<ProjectReference Include="../../Microsoft.Win32.Msi/Microsoft.Win32.Msi.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.TemplateEngine.Cli\Microsoft.TemplateEngine.Cli.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -115,7 +116,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="SDDLTests"/>
|
||||
<InternalsVisibleTo Include="SDDLTests" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="LinkVSEmbeddableAssemblies" DependsOnTargets="ResolveReferences" AfterTargets="ResolveReferences">
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="GenerateDigestLabelWithoutGenerateLabels">
|
||||
<source>CONTAINER2030: GenerateLabels was disabled but GenerateDigestLabel was enabled - no digest label will be created.</source>
|
||||
<target state="new">CONTAINER2030: GenerateLabels was disabled but GenerateDigestLabel was enabled - no digest label will be created.</target>
|
||||
<target state="translated">CONTAINER2030: GenerateLabels devre dışı bırakıldı ancak GenerateDigestLabel etkinleştirildi; özet etiketi oluşturulmayacak.</target>
|
||||
<note>{StrBegin="CONTAINER2030: "}</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="HostObjectNotDetected">
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
This version brings the following new features and enhancements:
|
||||
|
||||
* The .NET SDK can now natively support containerizing any kind of publishable project! Web and Worker projects work with no modifications, but console applications will need to add an MSBuild property to signal support. Supported projects must:
|
||||
* Have set `IsPublishable` to `true`, and
|
||||
* Have set `EnableSdkContainerSupport` to `true`
|
||||
* The .NET SDK now natively supports containerizing any kind of publishable project! Web and Worker projects work with no modifications, but console applications will need to add an MSBuild property to signal support. Supported projects must:
|
||||
* Set `<IsPublishable>true</IsPublishable>`, and
|
||||
* Set `<EnableSdkContainerSupport>true</EnableSdkContainerSupport>`
|
||||
|
||||
* Improved support for applications targeting `alpine` base images (meaning those publishing for `linux-musl` Runtime Identifiers). Now when you specify a `linux-musl` RuntimeIdentifier, the containers tooling will automatically look for `-alpine` variants of the base images. This means that you can now target `alpine` base images without needing to specify the `ContainerFamily` property at all.
|
||||
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
# Microsoft.NET.Build.Containers 8.0.300
|
||||
|
||||
This version brings the following new features and enhancements:
|
||||
|
||||
* The SDK will generate additional container metadata labels now.
|
||||
* The `org.opencontainers.image.base.digest` label will be added to uniquely identify the image used as a base for the application container.
|
||||
* The `net.dot.runtime.majorminor` label will be added to identify the major and minor version of the .NET Runtime that the application runs against.
|
||||
* The `net.dot.sdk.version` label will be added to identify the .NET SDK version used to build the application container.
|
||||
|
||||
* The SDK can use and produce OCI base image layers, not just Docker base image layers. This will happen automatically based on the kind of base image digest you use.
|
||||
|
||||
* The SDK will automatically use the `-extra` variant of base images when the application needs globalization/ICU support. So if you set `<ContainerFamily>jammy-chiseled</ContainerFamily>` and `<InvariantGlobalization>false</InvariantGlobalization>` in your project file, the SDK will behave as if you set `<ContainerFamily>jammy-chiseled-extra</ContainerFamily>` - this ensures that your application has the required ICU/Globalization support libraries.
|
||||
|
||||
* The SDK will use the runtime-deps base images for Trimmed applications, in addition to AOT applications.
|
||||
|
|
|
@ -195,12 +195,35 @@
|
|||
|
||||
<Target Name="_CheckContainersPackage" AfterTargets="Build">
|
||||
<PropertyGroup>
|
||||
<ContainersPackageIdentity>Microsoft.NET.Build.Containers</ContainersPackageIdentity>
|
||||
<!-- facts to base on comparisons on -->
|
||||
<_ContainersPackageIdentity>Microsoft.NET.Build.Containers</_ContainersPackageIdentity>
|
||||
<_WebDefaultSdkVersion>7.0.300</_WebDefaultSdkVersion>
|
||||
<_WorkerDefaultSdkVersion>8.0.100</_WorkerDefaultSdkVersion>
|
||||
<_ConsoleDefaultSdkVersion>8.0.200</_ConsoleDefaultSdkVersion>
|
||||
|
||||
<!-- capability detection for the executing SDK -->
|
||||
<_SdkCanPublishWeb>$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '$(_WebDefaultSdkVersion)'))</_SdkCanPublishWeb>
|
||||
<_SdkCanPublishWorker>$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '$(_WorkerDefaultSdkVersion)'))</_SdkCanPublishWorker>
|
||||
<_SdkCanPublishConsole>$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '$(_ConsoleDefaultSdkVersion)'))</_SdkCanPublishConsole>
|
||||
|
||||
<!-- capability detection for the executing project -->
|
||||
<_ContainerPackageIsPresent>false</_ContainerPackageIsPresent>
|
||||
<_ContainerPackageIsPresent Condition="@(PackageReference->AnyHaveMetadataValue('Identity', '$(_ContainersPackageIdentity)'))">true</_ContainerPackageIsPresent>
|
||||
<_IsWebProject>false</_IsWebProject>
|
||||
<_IsWebProject Condition="@(ProjectCapability->AnyHaveMetadataValue('Identity', 'DotNetCoreWeb'))">true</_IsWebProject>
|
||||
<_IsWorkerProject>false</_IsWorkerProject>
|
||||
<_IsWorkerProject Condition="@(ProjectCapability->AnyHaveMetadataValue('Identity', 'DotNetCoreWorker'))">true</_IsWorkerProject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ContainersPackage Include="@(PackageReference)" Condition="'%(Identity)' == '$(ContainersPackageIdentity)'" />
|
||||
</ItemGroup>
|
||||
<Warning Text="Microsoft.NET.Build.Containers NuGet package is explicitly referenced. Consider removing the package reference to Microsoft.NET.Build.Containers as it is now part of .NET SDK." Condition="'@(ContainersPackage)' != ''" />
|
||||
|
||||
<Warning
|
||||
Condition="$(_ContainerPackageIsPresent)
|
||||
and (
|
||||
($(_SdkCanPublishWeb) and $(_IsWebProject)) or
|
||||
($(_SdkCanPublishWorker) and $(_IsWorkerProject)) or
|
||||
($(_SdkCanPublishConsole) and '$(EnableSdkContainerSupport)' == 'true')
|
||||
)"
|
||||
Text="The $(_ContainersPackageIdentity) NuGet package is explicitly referenced but the current SDK can natively publish the project as a container. Consider removing the package reference to $(_ContainersPackageIdentity) because it is no longer needed." />
|
||||
|
||||
<PropertyGroup>
|
||||
<EnableSdkContainerSupport Condition="'@(ContainersPackage)' != ''">true</EnableSdkContainerSupport>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -58,8 +58,11 @@
|
|||
<EmbeddedResource Include="..\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\Strings.resx" LinkBase="Resources" GenerateSource="True" Namespace="Microsoft.NET.Sdk.Localization"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
||||
<PackageReference Include="System.Text.Json" VersionOverride="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Text.Json" Condition="'$(UseSystemTextJson)'=='True'"/>
|
||||
<PackageReference Include="Newtonsoft.Json" Condition="'$(UseSystemTextJson)'!='True'"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
||||
<PackageReference Include="System.Text.Json" VersionOverride="$(SystemTextJsonVersionOverride)" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="All" ExcludeAssets="Runtime" />
|
||||
|
@ -104,8 +105,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- No PackageReference to System.Text.Json necessary when targeting .NET, because it's included in .NET 5.0 and higher -->
|
||||
<PackageReference Include="System.Text.Json" VersionOverride="$(SystemTextJsonVersionOverride)" Condition="'$(UseSystemTextJson)'=='True' and '$(TargetFramework)'=='net472'"/>
|
||||
<PackageReference Include="Newtonsoft.Json" Condition="'$(UseSystemTextJson)'!='True'"/>
|
||||
|
||||
<!-- Reference this package to avoid package downgrade errors. See https://github.com/dotnet/sdk/issues/3044 for details -->
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
{
|
||||
public partial class SdkDirectoryWorkloadManifestProvider
|
||||
{
|
||||
static class GlobalJsonReader
|
||||
public static class GlobalJsonReader
|
||||
{
|
||||
public static string? GetWorkloadVersionFromGlobalJson(string? globalJsonPath)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,12 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
private WorkloadSet? _manifestsFromInstallState;
|
||||
private string? _installStateFilePath;
|
||||
|
||||
// This will be non-null if there is an error loading manifests that should be thrown when they need to be accessed.
|
||||
// We delay throwing the error so that in the case where global.json specifies a workload set that isn't installed,
|
||||
// we can successfully construct a resolver and install that workload set
|
||||
private Exception? _exceptionToThrow = null;
|
||||
string? _globalJsonWorkloadSetVersion;
|
||||
|
||||
public SdkDirectoryWorkloadManifestProvider(string sdkRootPath, string sdkVersion, string? userProfileDir, string? globalJsonPath)
|
||||
: this(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath)
|
||||
{
|
||||
|
@ -107,6 +113,13 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
public void RefreshWorkloadManifests()
|
||||
{
|
||||
// Reset exception state, we may be refreshing manifests after a missing workload set was installed
|
||||
_exceptionToThrow = null;
|
||||
_globalJsonWorkloadSetVersion = null;
|
||||
|
||||
_workloadSet = null;
|
||||
_manifestsFromInstallState = null;
|
||||
_installStateFilePath = null;
|
||||
var availableWorkloadSets = GetAvailableWorkloadSets();
|
||||
|
||||
if (_workloadSetVersionFromConstructor != null)
|
||||
|
@ -116,32 +129,38 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
throw new FileNotFoundException(string.Format(Strings.WorkloadVersionNotFound, _workloadSetVersionFromConstructor));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (_workloadSet is null)
|
||||
{
|
||||
string? globalJsonWorkloadSetVersion = GlobalJsonReader.GetWorkloadVersionFromGlobalJson(_globalJsonPathFromConstructor);
|
||||
if (globalJsonWorkloadSetVersion != null)
|
||||
_globalJsonWorkloadSetVersion = GlobalJsonReader.GetWorkloadVersionFromGlobalJson(_globalJsonPathFromConstructor);
|
||||
if (_globalJsonWorkloadSetVersion != null)
|
||||
{
|
||||
if (!availableWorkloadSets.TryGetValue(globalJsonWorkloadSetVersion, out _workloadSet))
|
||||
if (!availableWorkloadSets.TryGetValue(_globalJsonWorkloadSetVersion, out _workloadSet))
|
||||
{
|
||||
throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, globalJsonWorkloadSetVersion, _globalJsonPathFromConstructor));
|
||||
_exceptionToThrow = new FileNotFoundException(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, _globalJsonWorkloadSetVersion, _globalJsonPathFromConstructor));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if (_workloadSet is null)
|
||||
{
|
||||
var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkRootPath), "default.json");
|
||||
if (File.Exists(installStateFilePath))
|
||||
{
|
||||
var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkRootPath), "default.json");
|
||||
if (File.Exists(installStateFilePath))
|
||||
var installState = InstallStateContents.FromPath(installStateFilePath);
|
||||
if (!string.IsNullOrEmpty(installState.WorkloadVersion))
|
||||
{
|
||||
var installState = InstallStateContents.FromPath(installStateFilePath);
|
||||
if (!string.IsNullOrEmpty(installState.WorkloadVersion))
|
||||
if (!availableWorkloadSets.TryGetValue(installState.WorkloadVersion!, out _workloadSet))
|
||||
{
|
||||
if (!availableWorkloadSets.TryGetValue(installState.WorkloadVersion!, out _workloadSet))
|
||||
{
|
||||
throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromInstallStateNotFound, installState.WorkloadVersion, installStateFilePath));
|
||||
}
|
||||
throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromInstallStateNotFound, installState.WorkloadVersion, installStateFilePath));
|
||||
}
|
||||
_manifestsFromInstallState = installState.Manifests is null ? new WorkloadSet() : WorkloadSet.FromDictionaryForJson(installState.Manifests!, _sdkVersionBand);
|
||||
_installStateFilePath = installStateFilePath;
|
||||
}
|
||||
|
||||
// Note: It is possible here to have both a workload set and loose manifests listed in the install state. This might happen if there is a
|
||||
// third-party workload manifest installed that's not part of the workload set
|
||||
_manifestsFromInstallState = installState.Manifests is null ? null : WorkloadSet.FromDictionaryForJson(installState.Manifests!, _sdkVersionBand);
|
||||
_installStateFilePath = installStateFilePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,18 +171,28 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
}
|
||||
}
|
||||
|
||||
void ThrowExceptionIfManifestsNotAvailable()
|
||||
{
|
||||
if (_exceptionToThrow != null)
|
||||
{
|
||||
throw _exceptionToThrow;
|
||||
}
|
||||
}
|
||||
|
||||
public string? GetWorkloadVersion()
|
||||
{
|
||||
if (_globalJsonWorkloadSetVersion != null)
|
||||
{
|
||||
return _globalJsonWorkloadSetVersion;
|
||||
}
|
||||
|
||||
ThrowExceptionIfManifestsNotAvailable();
|
||||
|
||||
if (_workloadSet?.Version is not null)
|
||||
{
|
||||
return _workloadSet?.Version!;
|
||||
}
|
||||
|
||||
if (InstallStateContents.FromPath(Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkRootPath), "default.json")).UseWorkloadSets == true)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using (SHA256 sha256Hash = SHA256.Create())
|
||||
{
|
||||
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(string.Join(";",
|
||||
|
@ -184,6 +213,8 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
public IEnumerable<ReadableWorkloadManifest> GetManifests()
|
||||
{
|
||||
ThrowExceptionIfManifestsNotAvailable();
|
||||
|
||||
// Scan manifest directories
|
||||
var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
|
@ -471,5 +502,25 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public GlobalJsonInformation? GetGlobalJsonInformation()
|
||||
{
|
||||
return _globalJsonWorkloadSetVersion is null || _globalJsonPathFromConstructor is null ?
|
||||
null :
|
||||
new GlobalJsonInformation(_globalJsonPathFromConstructor, _globalJsonWorkloadSetVersion, _exceptionToThrow is null);
|
||||
}
|
||||
|
||||
public record GlobalJsonInformation
|
||||
{
|
||||
public string GlobalJsonPath { get; }
|
||||
public string GlobalJsonVersion { get; }
|
||||
public bool WorkloadVersionInstalled { get; }
|
||||
public GlobalJsonInformation(string path, string version, bool installed)
|
||||
{
|
||||
GlobalJsonPath = path;
|
||||
GlobalJsonVersion = version;
|
||||
WorkloadVersionInstalled = installed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
public void RefreshWorkloadManifests() { }
|
||||
|
||||
public IEnumerable<ReadableWorkloadManifest>
|
||||
GetManifests()
|
||||
public IEnumerable<ReadableWorkloadManifest> GetManifests()
|
||||
{
|
||||
foreach (var workloadManifestDirectory in GetManifestDirectories())
|
||||
{
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
private IWorkloadManifestProvider _manifestProvider;
|
||||
private string[] _currentRuntimeIdentifiers;
|
||||
private readonly (string path, bool installable)[] _dotnetRootPaths;
|
||||
private bool _initializedManifests = false;
|
||||
|
||||
private Func<string, bool>? _fileExistOverride;
|
||||
private Func<string, bool>? _directoryExistOverride;
|
||||
|
@ -81,9 +82,16 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
: this(dotnetRootPaths, currentRuntimeIdentifiers, manifestProvider.GetSdkFeatureBand())
|
||||
{
|
||||
_manifestProvider = manifestProvider;
|
||||
}
|
||||
|
||||
LoadManifestsFromProvider(manifestProvider);
|
||||
ComposeWorkloadManifests();
|
||||
private void InitializeManifests()
|
||||
{
|
||||
if (!_initializedManifests)
|
||||
{
|
||||
LoadManifestsFromProvider(_manifestProvider);
|
||||
ComposeWorkloadManifests();
|
||||
_initializedManifests = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -105,8 +113,8 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
_manifestProvider.RefreshWorkloadManifests();
|
||||
_manifests.Clear();
|
||||
LoadManifestsFromProvider(_manifestProvider);
|
||||
ComposeWorkloadManifests();
|
||||
_initializedManifests = false;
|
||||
InitializeManifests();
|
||||
}
|
||||
|
||||
public string? GetWorkloadVersion() => _manifestProvider.GetWorkloadVersion();
|
||||
|
@ -232,6 +240,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
/// </remarks>
|
||||
public IEnumerable<PackInfo> GetInstalledWorkloadPacksOfKind(WorkloadPackKind kind)
|
||||
{
|
||||
InitializeManifests();
|
||||
foreach ((var pack, _) in _packs.Values)
|
||||
{
|
||||
if (pack.Kind != kind)
|
||||
|
@ -361,6 +370,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
/// </summary>
|
||||
private HashSet<WorkloadPackId> GetInstalledPacks()
|
||||
{
|
||||
InitializeManifests();
|
||||
var installedPacks = new HashSet<WorkloadPackId>();
|
||||
foreach ((WorkloadPackId id, (WorkloadPack pack, WorkloadManifest _)) in _packs)
|
||||
{
|
||||
|
@ -380,6 +390,8 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
throw new ArgumentException($"'{nameof(workloadId)}' cannot be null or empty", nameof(workloadId));
|
||||
}
|
||||
|
||||
InitializeManifests();
|
||||
|
||||
if (!_workloads.TryGetValue(workloadId, out var value))
|
||||
{
|
||||
throw new Exception($"Workload not found: {workloadId}. Known workloads: {string.Join(" ", _workloads.Select(workload => workload.Key.ToString()))}");
|
||||
|
@ -415,6 +427,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
IEnumerable<(WorkloadDefinition workload, WorkloadManifest workloadManifest)> EnumerateWorkloadWithExtendsRec(WorkloadId workloadId, IEnumerable<WorkloadId> extends, WorkloadManifest? manifest)
|
||||
{
|
||||
InitializeManifests();
|
||||
dedup ??= new HashSet<WorkloadId> { workloadId };
|
||||
|
||||
foreach (var baseWorkloadId in extends)
|
||||
|
@ -479,6 +492,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
throw new ArgumentException($"'{nameof(packId)}' cannot be null or empty", nameof(packId));
|
||||
}
|
||||
|
||||
InitializeManifests();
|
||||
if (_packs.TryGetValue(packId) is (WorkloadPack pack, _))
|
||||
{
|
||||
if (ResolvePackPath(pack, out WorkloadPackId resolvedPackageId, out bool isInstalled) is string aliasedPath)
|
||||
|
@ -498,6 +512,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
/// </remarks>
|
||||
public ISet<WorkloadInfo>? GetWorkloadSuggestionForMissingPacks(IList<WorkloadPackId> packIds, out ISet<WorkloadPackId> unsatisfiablePacks)
|
||||
{
|
||||
InitializeManifests();
|
||||
var requestedPacks = new HashSet<WorkloadPackId>(packIds);
|
||||
var availableWorkloads = GetAvailableWorkloadDefinitions();
|
||||
|
||||
|
@ -537,6 +552,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
private IEnumerable<(WorkloadDefinition workload, WorkloadManifest manifest)> GetAvailableWorkloadDefinitions()
|
||||
{
|
||||
InitializeManifests();
|
||||
foreach ((WorkloadId _, (WorkloadDefinition workload, WorkloadManifest manifest)) in _workloads)
|
||||
{
|
||||
if (!workload.IsAbstract && IsWorkloadPlatformCompatible(workload, manifest) && !IsWorkloadImplicitlyAbstract(workload, manifest))
|
||||
|
@ -554,6 +570,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
/// <returns></returns>
|
||||
public IEnumerable<WorkloadId> GetUpdatedWorkloads(WorkloadResolver advertisingManifestResolver, IEnumerable<WorkloadId> installedWorkloads)
|
||||
{
|
||||
InitializeManifests();
|
||||
foreach (var workloadId in installedWorkloads)
|
||||
{
|
||||
if (!_workloads.ContainsKey(workloadId) || !advertisingManifestResolver._workloads.ContainsKey(workloadId))
|
||||
|
@ -605,11 +622,14 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
/// <exception>ArgumentNullException</exception>
|
||||
public WorkloadManifest GetManifestFromWorkload(WorkloadId workloadId)
|
||||
{
|
||||
InitializeManifests();
|
||||
return _workloads[workloadId].manifest;
|
||||
}
|
||||
|
||||
public WorkloadResolver CreateOverlayResolver(IWorkloadManifestProvider overlayManifestProvider)
|
||||
{
|
||||
InitializeManifests();
|
||||
|
||||
// we specifically don't assign the overlayManifestProvider to the new resolver
|
||||
// because it's not possible to refresh an overlay resolver
|
||||
var overlayResolver = new WorkloadResolver(_dotnetRootPaths, _currentRuntimeIdentifiers, GetSdkFeatureBand());
|
||||
|
@ -624,6 +644,9 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
overlayResolver.ComposeWorkloadManifests();
|
||||
|
||||
// Because we're injecting additional manifests, InitializeManifests isn't used for the overlay resolver
|
||||
overlayResolver._initializedManifests = true;
|
||||
|
||||
return overlayResolver;
|
||||
}
|
||||
|
||||
|
@ -693,6 +716,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
public WorkloadInfo GetWorkloadInfo(WorkloadId workloadId)
|
||||
{
|
||||
InitializeManifests();
|
||||
if (_workloads.TryGetValue(workloadId) is not (WorkloadDefinition workload, _))
|
||||
{
|
||||
throw new ArgumentException($"Workload '{workloadId}' not found", nameof(workloadId));
|
||||
|
@ -702,6 +726,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
public bool IsPlatformIncompatibleWorkload(WorkloadId workloadId)
|
||||
{
|
||||
InitializeManifests();
|
||||
if (_workloads.TryGetValue(workloadId) is not (WorkloadDefinition workload, WorkloadManifest manifest))
|
||||
{
|
||||
// Not a recognized workload
|
||||
|
@ -718,6 +743,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
|
||||
public string GetManifestVersion(string manifestId)
|
||||
{
|
||||
InitializeManifests();
|
||||
if (_manifests.TryGetValue(manifestId, out var value))
|
||||
{
|
||||
return value.manifest.Version;
|
||||
|
@ -725,7 +751,11 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader
|
|||
throw new Exception($"Manifest with id {manifestId} does not exist.");
|
||||
}
|
||||
|
||||
public IEnumerable<WorkloadManifestInfo> GetInstalledManifests() => _manifests.Select(t => t.Value.info);
|
||||
public IEnumerable<WorkloadManifestInfo> GetInstalledManifests()
|
||||
{
|
||||
InitializeManifests();
|
||||
return _manifests.Select(t => t.Value.info);
|
||||
}
|
||||
|
||||
private class EmptyWorkloadManifestProvider : IWorkloadManifestProvider
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ partial class Program
|
|||
BeforeTestRun(newArgs);
|
||||
}
|
||||
|
||||
int returnCode;
|
||||
int returnCode = 0;
|
||||
|
||||
if (testCommandLine.ShowSdkInfo)
|
||||
{
|
||||
|
@ -36,7 +36,17 @@ partial class Program
|
|||
}
|
||||
else
|
||||
{
|
||||
returnCode = Xunit.ConsoleClient.Program.Main(newArgs.ToArray());
|
||||
var xunitReturnCode = Xunit.ConsoleClient.Program.Main(newArgs.ToArray());
|
||||
if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
|
||||
{
|
||||
// If we are running in Helix, we want the test work item to return 0 unless there's a crash
|
||||
Console.WriteLine($"Xunit return code: {xunitReturnCode}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// If we are running locally, we to return the xunit return code
|
||||
returnCode = xunitReturnCode;
|
||||
}
|
||||
}
|
||||
|
||||
if (testCommandLine.ShouldShowHelp)
|
||||
|
|
|
@ -369,7 +369,7 @@ public class EndToEndTests : IDisposable
|
|||
|
||||
if (addPackageReference)
|
||||
{
|
||||
commandResult.Should().HaveStdOutContaining("warning : Microsoft.NET.Build.Containers NuGet package is explicitly referenced. Consider removing the package reference to Microsoft.NET.Build.Containers as it is now part of .NET SDK.");
|
||||
commandResult.Should().HaveStdOutContaining("warning : The Microsoft.NET.Build.Containers NuGet package is explicitly referenced but the current SDK can natively publish the project as a container. Consider removing the package reference to Microsoft.NET.Build.Containers because it is no longer needed.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -518,7 +518,8 @@ public class EndToEndTests : IDisposable
|
|||
$"/p:ContainerBaseImage={DockerRegistryManager.FullyQualifiedBaseImageAspNet}",
|
||||
$"/p:ContainerRegistry={DockerRegistryManager.LocalRegistry}",
|
||||
$"/p:ContainerRepository={imageName}",
|
||||
$"/p:ContainerImageTag={imageTag}")
|
||||
$"/p:ContainerImageTag={imageTag}",
|
||||
"/p:EnableSdkContainerSupport=true")
|
||||
.WithEnvironmentVariable("NUGET_PACKAGES", privateNuGetAssets.FullName)
|
||||
.WithWorkingDirectory(newProjectDir.FullName)
|
||||
.Execute()
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
namespace Microsoft.NET.Build.Containers.IntegrationTests;
|
||||
|
||||
using Xunit;
|
||||
|
||||
/// <summary>
|
||||
/// Collection definition for tests that require MSBuild to be run.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This collection is used to ensure that tests that require MSBuild are run serially.
|
||||
/// The MSBuild engine only allows a single logical Build to run at once, so running tests
|
||||
/// that require MSBuild in parallel can cause tests to fail./
|
||||
/// </remarks>
|
||||
[CollectionDefinition(nameof(MSBuildCollection), DisableParallelization = true)]
|
||||
public class MSBuildCollection : ICollectionFixture<MSBuildCollection>
|
||||
{
|
||||
// This class has no code, and is never created. Its purpose is simply
|
||||
// to be the place to apply [CollectionDefinition] and all the
|
||||
// ICollectionFixture<> interfaces.
|
||||
}
|
|
@ -8,6 +8,7 @@ using static Microsoft.NET.Build.Containers.KnownStrings.Properties;
|
|||
|
||||
namespace Microsoft.NET.Build.Containers.Tasks.IntegrationTests;
|
||||
|
||||
[Collection(nameof(MSBuildCollection))]
|
||||
public class ParseContainerPropertiesTests
|
||||
{
|
||||
[Fact]
|
||||
|
|
|
@ -7,6 +7,7 @@ using static Microsoft.NET.Build.Containers.KnownStrings.Properties;
|
|||
|
||||
namespace Microsoft.NET.Build.Containers.Targets.IntegrationTests;
|
||||
|
||||
[Collection(nameof(MSBuildCollection))]
|
||||
public class TargetsTests
|
||||
{
|
||||
[InlineData("SelfContained", true, "/app/foo.exe")]
|
||||
|
|
|
@ -179,7 +179,9 @@ namespace ManifestReaderTests
|
|||
{ "AAA", MakeManifest("20.0.0", ("BBB", "5.0.0"), ("CCC", "63.0.0"), ("DDD", "25.0.0")) }
|
||||
};
|
||||
|
||||
var missingManifestEx = Assert.Throws<WorkloadManifestCompositionException>(() => WorkloadResolver.CreateForTests(missingManifestProvider, fakeRootPath));
|
||||
var missingManifestResolver = WorkloadResolver.CreateForTests(missingManifestProvider, fakeRootPath);
|
||||
|
||||
var missingManifestEx = Assert.Throws<WorkloadManifestCompositionException>(() => missingManifestResolver.GetAvailableWorkloads().ToList());
|
||||
Assert.StartsWith("Did not find workload manifest dependency 'BBB' required by manifest 'AAA'", missingManifestEx.Message);
|
||||
|
||||
var inconsistentManifestProvider = new InMemoryFakeManifestProvider
|
||||
|
@ -190,7 +192,8 @@ namespace ManifestReaderTests
|
|||
{ "DDD", MakeManifest("30.0.0") },
|
||||
};
|
||||
|
||||
var inconsistentManifestEx = Assert.Throws<WorkloadManifestCompositionException>(() => WorkloadResolver.CreateForTests(inconsistentManifestProvider, fakeRootPath));
|
||||
var inconsistentManifestResolver = WorkloadResolver.CreateForTests(inconsistentManifestProvider, fakeRootPath);
|
||||
var inconsistentManifestEx = Assert.Throws<WorkloadManifestCompositionException>(() => inconsistentManifestResolver.GetAvailableWorkloads().ToList());
|
||||
Assert.StartsWith("Workload manifest dependency 'DDD' version '30.0.0' is lower than version '39.0.0' required by manifest 'BBB'", inconsistentManifestEx.Message);
|
||||
}
|
||||
|
||||
|
|
|
@ -552,7 +552,8 @@ namespace ManifestReaderTests
|
|||
}
|
||||
""");
|
||||
|
||||
var ex = Assert.Throws<FileNotFoundException>(() => new SdkDirectoryWorkloadManifestProvider(sdkRootPath: _fakeDotnetRootDirectory, sdkVersion: "8.0.200", userProfileDir: null, globalJsonPath: globalJsonPath));
|
||||
var manifestProvider = new SdkDirectoryWorkloadManifestProvider(sdkRootPath: _fakeDotnetRootDirectory, sdkVersion: "8.0.200", userProfileDir: null, globalJsonPath: globalJsonPath);
|
||||
var ex = Assert.Throws<FileNotFoundException>(() => manifestProvider.GetManifests());
|
||||
ex.Message.Should().Be(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, "8.0.201", globalJsonPath));
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using FluentAssertions.Execution;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
abstract class RemoteDirectory
|
||||
{
|
|
@ -9,7 +9,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using FluentAssertions.Execution;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
abstract class RemoteFile
|
||||
{
|
|
@ -10,7 +10,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
abstract class VMAction
|
||||
{
|
||||
|
@ -124,6 +124,26 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
}
|
||||
}
|
||||
|
||||
class VMMoveFolderAction : VMAction
|
||||
{
|
||||
public string SourcePath { get; set; }
|
||||
public string TargetPath { get; set; }
|
||||
|
||||
public VMMoveFolderAction(VirtualMachine vm) : base(vm)
|
||||
{
|
||||
}
|
||||
|
||||
protected override SerializedVMAction SerializeDerivedProperties()
|
||||
{
|
||||
return new SerializedVMAction
|
||||
{
|
||||
Type = VMActionType.MoveFolderOnVM,
|
||||
SourcePath = SourcePath,
|
||||
TargetPath = TargetPath,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class VMWriteFileAction : VMAction
|
||||
{
|
||||
public string TargetPath { get; set; }
|
||||
|
@ -168,6 +188,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
RunCommand,
|
||||
CopyFileToVM,
|
||||
CopyFolderToVM,
|
||||
MoveFolderOnVM,
|
||||
WriteFileToVM,
|
||||
GetRemoteDirectory,
|
||||
GetRemoteFile,
|
||||
|
@ -190,10 +211,10 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
// Applies to RunCommand
|
||||
public string WorkingDirectory { get; set; }
|
||||
|
||||
// Applies to CopyFileToVM, CopyFolderToVM, WriteFileToVM, GetRemoteDirectory, GetRemoteFile
|
||||
// Applies to CopyFileToVM, CopyFolderToVM, MoveFolderOnVM, WriteFileToVM, GetRemoteDirectory, GetRemoteFile
|
||||
public string TargetPath { get; set; }
|
||||
|
||||
// Applies to CopyFileToVM, CopyFolderToVM
|
||||
// Applies to CopyFileToVM, CopyFolderToVM, MoveFolderOnVM
|
||||
public string SourcePath { get; set; }
|
||||
|
||||
// Applies to CopyFileToVM, CopyFolderToVM
|
||||
|
@ -222,6 +243,8 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
return $"Copy file to VM: {SourcePath} -> {TargetPath}";
|
||||
case VMActionType.CopyFolderToVM:
|
||||
return $"Copy folder to VM: {SourcePath} -> {TargetPath}";
|
||||
case VMActionType.MoveFolderOnVM:
|
||||
return $"Move folder {SourcePath} -> {TargetPath}";
|
||||
case VMActionType.WriteFileToVM:
|
||||
return $"Write file to VM: {TargetPath}";
|
||||
case VMActionType.GetRemoteDirectory:
|
|
@ -6,7 +6,7 @@ using Microsoft.DotNet.Installer.Windows;
|
|||
using Microsoft.Management.Infrastructure;
|
||||
using Microsoft.Management.Infrastructure.Serialization;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
internal class VMControl : IDisposable
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
{
|
||||
var remoteCommand = new RemoteCommand(Log, VMMachineName, _psExecPath, workingDirectory, args);
|
||||
|
||||
for (int i=0; i<3; i++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
var result = remoteCommand.Execute();
|
||||
if (result.ExitCode != 6 && !result.StdErr.Contains("The handle is invalid"))
|
||||
|
@ -204,7 +204,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
{
|
||||
VMEnabledState getCurrentState()
|
||||
{
|
||||
var state = (VMEnabledState) (UInt16)VMInstance.CimInstanceProperties["EnabledState"].Value;
|
||||
var state = (VMEnabledState)(ushort)VMInstance.CimInstanceProperties["EnabledState"].Value;
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
|
||||
var methodParameters = new CimMethodParametersCollection()
|
||||
{
|
||||
CimMethodParameter.Create("RequestedState", (UInt16) targetState, CimFlags.In)
|
||||
CimMethodParameter.Create("RequestedState", (ushort) targetState, CimFlags.In)
|
||||
};
|
||||
|
||||
|
||||
|
@ -245,13 +245,13 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
{
|
||||
CimInstance job = (CimInstance)result.OutParameters["Job"].Value;
|
||||
job = _session.GetInstance(virtNamespace, job);
|
||||
while (IsRunning((JobState)(UInt16)job.CimInstanceProperties["JobState"].Value))
|
||||
while (IsRunning((JobState)(ushort)job.CimInstanceProperties["JobState"].Value))
|
||||
{
|
||||
await Task.Delay(100);
|
||||
job = _session.GetInstance(job.CimSystemProperties.Namespace, job);
|
||||
}
|
||||
|
||||
var jobState = (JobState)(UInt16)job.CimInstanceProperties["JobState"].Value;
|
||||
var jobState = (JobState)(ushort)job.CimInstanceProperties["JobState"].Value;
|
||||
if (jobState != JobState.Completed && jobState != JobState.CompletedWithWarnings)
|
||||
{
|
||||
Log.WriteLine("Job failed: " + jobState);
|
||||
|
@ -271,7 +271,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
}
|
||||
else
|
||||
{
|
||||
if (result.ReturnValue.Value is UInt32 returnValue)
|
||||
if (result.ReturnValue.Value is uint returnValue)
|
||||
{
|
||||
if (returnValue != 0)
|
||||
{
|
||||
|
@ -305,7 +305,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
CompletedWithWarnings = 32768
|
||||
}
|
||||
|
||||
enum VMEnabledState : UInt16
|
||||
enum VMEnabledState : ushort
|
||||
{
|
||||
Unknown = 0,
|
||||
Other = 1,
|
||||
|
@ -314,7 +314,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
ShuttingDown = 4,
|
||||
NotApplicable = 5,
|
||||
EnabledButOffline = 6,
|
||||
|
||||
|
||||
}
|
||||
|
||||
class RemoteCommand : TestCommand
|
|
@ -1,11 +1,11 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
internal class VMStateTree
|
||||
{
|
||||
public string SnapshotId { get; set; }
|
||||
public string SnapshotId { get; set; }
|
||||
public string SnapshotName { get; set; }
|
||||
|
||||
public Dictionary<SerializedVMAction, (VMActionResult actionResult, VMStateTree resultingState)> Actions { get; set; } = new();
|
||||
|
@ -18,7 +18,8 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
{
|
||||
SnapshotId = SnapshotId,
|
||||
SnapshotName = SnapshotName,
|
||||
Actions = Actions.Select(a => new SerializableVMStateTree.Entry() {
|
||||
Actions = Actions.Select(a => new SerializableVMStateTree.Entry()
|
||||
{
|
||||
Action = a.Key,
|
||||
ActionResult = a.Value.actionResult,
|
||||
ResultingState = a.Value.resultingState.ToSerializeable()
|
|
@ -0,0 +1,150 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using Microsoft.NET.Sdk.WorkloadManifestReader;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
public class VMTestBase : SdkTest, IDisposable
|
||||
{
|
||||
internal VirtualMachine VM { get; }
|
||||
|
||||
public VMTestBase(ITestOutputHelper log) : base(log)
|
||||
{
|
||||
VM = new VirtualMachine(Log);
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
VM.Dispose();
|
||||
}
|
||||
|
||||
protected string SdkInstallerVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(VM.VMTestSettings.SdkInstallerVersion))
|
||||
{
|
||||
return VM.VMTestSettings.SdkInstallerVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "8.0.203";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string SdkInstallerFileName => $"dotnet-sdk-{SdkInstallerVersion}-win-x64.exe";
|
||||
|
||||
protected void InstallSdk(bool deployStage2 = true)
|
||||
{
|
||||
VM.CreateRunCommand("setx", "DOTNET_NOLOGO", "true")
|
||||
.WithDescription("Disable .NET SDK first run message")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
VM.CreateRunCommand($@"c:\SdkTesting\{SdkInstallerFileName}", "/quiet")
|
||||
.WithDescription($"Install SDK {SdkInstallerVersion}")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
if (deployStage2)
|
||||
{
|
||||
DeployStage2Sdk();
|
||||
}
|
||||
}
|
||||
|
||||
protected void UninstallSdk()
|
||||
{
|
||||
VM.CreateRunCommand($@"c:\SdkTesting\{SdkInstallerFileName}", "/quiet", "/uninstall")
|
||||
.WithDescription($"Uninstall SDK {SdkInstallerVersion}")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
}
|
||||
|
||||
protected void DeployStage2Sdk()
|
||||
{
|
||||
if (!VM.VMTestSettings.ShouldTestStage2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var installedSdkFolder = $@"c:\Program Files\dotnet\sdk\{SdkInstallerVersion}";
|
||||
|
||||
Log.WriteLine($"Deploying SDK from {TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest} to {installedSdkFolder} on VM.");
|
||||
|
||||
// TODO: It would be nice if the description included the date/time of the SDK build, to distinguish different snapshots
|
||||
VM.CreateActionGroup("Deploy Stage 2 SDK",
|
||||
VM.CopyFolder(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, installedSdkFolder),
|
||||
ChangeVersionFileContents(SdkInstallerVersion))
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
}
|
||||
|
||||
protected void ChangeSdkVersion(string oldVersion, string newVersion)
|
||||
{
|
||||
var oldSdkFolder = $@"c:\Program Files\dotnet\sdk\{oldVersion}";
|
||||
var newSdkFolder = $@"c:\Program Files\dotnet\sdk\{newVersion}";
|
||||
|
||||
new VMMoveFolderAction(VM)
|
||||
{
|
||||
SourcePath = oldSdkFolder,
|
||||
TargetPath = newSdkFolder
|
||||
}
|
||||
.WithDescription($"Change SDK version to {newVersion}")
|
||||
.Execute().Should().Pass();
|
||||
|
||||
ChangeVersionFileContents(newVersion)
|
||||
.WithDescription("Update .version file")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
}
|
||||
|
||||
private VMWriteFileAction ChangeVersionFileContents(string sdkVersion)
|
||||
{
|
||||
var installedSdkFolder = $@"c:\Program Files\dotnet\sdk\{sdkVersion}";
|
||||
var vmVersionFilePath = Path.Combine(installedSdkFolder, ".version");
|
||||
|
||||
var newVersionFileContents = File.ReadAllLines(Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, ".version"));
|
||||
newVersionFileContents[1] = sdkVersion;
|
||||
|
||||
return VM.WriteFile(vmVersionFilePath, string.Join(Environment.NewLine, newVersionFileContents));
|
||||
|
||||
}
|
||||
|
||||
protected string GetInstalledSdkVersion()
|
||||
{
|
||||
var command = VM.CreateRunCommand("dotnet", "--version");
|
||||
command.IsReadOnly = true;
|
||||
var result = command.Execute();
|
||||
result.Should().Pass();
|
||||
return result.StdOut;
|
||||
}
|
||||
|
||||
protected WorkloadSet GetRollback()
|
||||
{
|
||||
var result = VM.CreateRunCommand("dotnet", "workload", "update", "--print-rollback")
|
||||
.WithIsReadOnly(true)
|
||||
.Execute();
|
||||
|
||||
result.Should().Pass();
|
||||
|
||||
return ParseRollbackOutput(result.StdOut);
|
||||
}
|
||||
|
||||
protected WorkloadSet ParseRollbackOutput(string output)
|
||||
{
|
||||
var filteredOutput = string.Join(Environment.NewLine,
|
||||
output.Split(Environment.NewLine)
|
||||
.Except(["==workloadRollbackDefinitionJsonOutputStart==", "==workloadRollbackDefinitionJsonOutputEnd=="]));
|
||||
|
||||
return WorkloadSet.FromJson(filteredOutput, defaultFeatureBand: new SdkFeatureBand(SdkInstallerVersion));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
internal class VMTestSettings
|
||||
{
|
|
@ -4,7 +4,7 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
namespace Microsoft.DotNet.MsiInstallerTests.Framework
|
||||
{
|
||||
class VirtualMachine : IDisposable
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
Log.WriteLine($"Removing missing snapshot from tree: {nodeToRemove.Value.resultingState.SnapshotName}");
|
||||
node.Actions.Remove(nodeToRemove.Key);
|
||||
}
|
||||
|
||||
|
||||
foreach (var result in node.Actions.Select(a => a.Value.resultingState))
|
||||
{
|
||||
Recurse(result);
|
||||
|
@ -211,7 +211,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
}
|
||||
else if (action.Type == VMActionType.ActionGroup && result.GroupedResults != null)
|
||||
{
|
||||
for (int i=0; i<result.GroupedResults.Count; i++)
|
||||
for (int i = 0; i < result.GroupedResults.Count; i++)
|
||||
{
|
||||
LogActionResult(action.Actions[i], result.GroupedResults[i]);
|
||||
}
|
||||
|
@ -299,6 +299,14 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
|
||||
return VMActionResult.Success();
|
||||
}
|
||||
else if (action.Type == VMActionType.MoveFolderOnVM)
|
||||
{
|
||||
var sourceSharePath = VMPathToSharePath(action.SourcePath);
|
||||
var targetSharePath = VMPathToSharePath(action.TargetPath);
|
||||
Directory.Move(sourceSharePath, targetSharePath);
|
||||
|
||||
return VMActionResult.Success();
|
||||
}
|
||||
else if (action.Type == VMActionType.WriteFileToVM)
|
||||
{
|
||||
var targetSharePath = VMPathToSharePath(action.TargetPath);
|
|
@ -2,30 +2,13 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.MsiInstallerTests.Framework;
|
||||
using Microsoft.NET.Sdk.WorkloadManifestReader;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
{
|
||||
public class WorkloadTests : SdkTest, IDisposable
|
||||
public class WorkloadTests : VMTestBase
|
||||
{
|
||||
|
||||
string SdkInstallerVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(VM.VMTestSettings.SdkInstallerVersion))
|
||||
{
|
||||
return VM.VMTestSettings.SdkInstallerVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "8.0.101";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string SdkInstallerFileName => $"dotnet-sdk-{SdkInstallerVersion}-win-x64.exe";
|
||||
|
||||
const string RollbackRC1 = """
|
||||
{
|
||||
"microsoft.net.sdk.android": "34.0.0-rc.1.432/8.0.100-rc.1",
|
||||
|
@ -61,45 +44,8 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
}
|
||||
""";
|
||||
|
||||
VirtualMachine VM { get; }
|
||||
|
||||
public WorkloadTests(ITestOutputHelper log) : base(log)
|
||||
{
|
||||
VM = new VirtualMachine(Log);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
VM.Dispose();
|
||||
}
|
||||
|
||||
void InstallSdk(bool deployStage2 = true)
|
||||
{
|
||||
VM.CreateRunCommand("setx", "DOTNET_NOLOGO", "true")
|
||||
.WithDescription("Disable .NET SDK first run message")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
VM.CreateRunCommand($@"c:\SdkTesting\{SdkInstallerFileName}", "/quiet")
|
||||
.WithDescription($"Install SDK {SdkInstallerVersion}")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
if (deployStage2)
|
||||
{
|
||||
DeployStage2Sdk();
|
||||
}
|
||||
}
|
||||
|
||||
void UninstallSdk()
|
||||
{
|
||||
VM.CreateRunCommand($@"c:\SdkTesting\{SdkInstallerFileName}", "/quiet", "/uninstall")
|
||||
.WithDescription($"Uninstall SDK {SdkInstallerVersion}")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
}
|
||||
|
||||
private CommandResult ApplyManifests(string manifestContents, string rollbackID)
|
||||
|
@ -286,14 +232,6 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string GetInstalledSdkVersion()
|
||||
{
|
||||
var command = VM.CreateRunCommand("dotnet", "--version");
|
||||
command.IsReadOnly = true;
|
||||
var result = command.Execute();
|
||||
result.Should().Pass();
|
||||
return result.StdOut;
|
||||
}
|
||||
|
||||
void TestWasmWorkload()
|
||||
{
|
||||
|
@ -372,31 +310,7 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
return installedManifestVersions;
|
||||
}
|
||||
|
||||
void DeployStage2Sdk()
|
||||
{
|
||||
if (!VM.VMTestSettings.ShouldTestStage2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var installedSdkFolder = $@"c:\Program Files\dotnet\sdk\{SdkInstallerVersion}";
|
||||
|
||||
Log.WriteLine($"Deploying SDK from {TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest} to {installedSdkFolder} on VM.");
|
||||
|
||||
var vmVersionFilePath = Path.Combine(installedSdkFolder, ".version");
|
||||
|
||||
var existingVersionFileContents = VM.GetRemoteFile(vmVersionFilePath).ReadAllText().Split(Environment.NewLine);
|
||||
var newVersionFileContents = File.ReadAllLines(Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, ".version"));
|
||||
newVersionFileContents[1] = existingVersionFileContents[1];
|
||||
|
||||
// TODO: It would be nice if the description included the date/time of the SDK build, to distinguish different snapshots
|
||||
VM.CreateActionGroup("Deploy Stage 2 SDK",
|
||||
VM.CopyFolder(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, installedSdkFolder),
|
||||
VM.WriteFile(vmVersionFilePath, string.Join(Environment.NewLine, newVersionFileContents)))
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
}
|
||||
|
||||
CommandResult InstallWorkload(string workloadName)
|
||||
{
|
||||
|
@ -419,25 +333,5 @@ namespace Microsoft.DotNet.MsiInstallerTests
|
|||
|
||||
return result.StdOut;
|
||||
}
|
||||
|
||||
WorkloadSet GetRollback()
|
||||
{
|
||||
var result = VM.CreateRunCommand("dotnet", "workload", "update", "--print-rollback")
|
||||
.WithIsReadOnly(true)
|
||||
.Execute();
|
||||
|
||||
result.Should().Pass();
|
||||
|
||||
return ParseRollbackOutput(result.StdOut);
|
||||
}
|
||||
|
||||
WorkloadSet ParseRollbackOutput(string output)
|
||||
{
|
||||
var filteredOutput = string.Join(Environment.NewLine,
|
||||
output.Split(Environment.NewLine)
|
||||
.Except(["==workloadRollbackDefinitionJsonOutputStart==", "==workloadRollbackDefinitionJsonOutputEnd=="]));
|
||||
|
||||
return WorkloadSet.FromJson(filteredOutput, defaultFeatureBand: new SdkFeatureBand(SdkInstallerVersion));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.DotNet.MsiInstallerTests.Framework;
|
||||
using Microsoft.NET.Sdk.WorkloadManifestReader;
|
||||
|
||||
namespace Microsoft.DotNet.MsiInstallerTests
|
||||
{
|
||||
public class WorkloadSetTests : VMTestBase
|
||||
{
|
||||
public WorkloadSetTests(ITestOutputHelper log) : base(log)
|
||||
{
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoesNotUseWorkloadSetsByDefault()
|
||||
{
|
||||
InstallSdk();
|
||||
|
||||
VM.CreateRunCommand("dotnet", "workload", "update")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
var originalRollback = GetRollback();
|
||||
|
||||
VM.CreateRunCommand("dotnet", "nuget", "add", "source", @"c:\SdkTesting\WorkloadSets")
|
||||
.WithDescription("Add WorkloadSets to NuGet.config")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
VM.CreateRunCommand("dotnet", "workload", "update")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
var newRollback = GetRollback();
|
||||
|
||||
newRollback.ManifestVersions.Should().BeEquivalentTo(originalRollback.ManifestVersions);
|
||||
|
||||
}
|
||||
|
||||
void UpdateAndSwitchToWorkloadSetMode(out string updatedWorkloadVersion, out WorkloadSet rollbackAfterUpdate)
|
||||
{
|
||||
var originalWorkloadVersion = GetWorkloadVersion();
|
||||
originalWorkloadVersion.Should().StartWith("8.0.200-manifests.");
|
||||
|
||||
VM.CreateRunCommand("dotnet", "workload", "update")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
rollbackAfterUpdate = GetRollback();
|
||||
updatedWorkloadVersion = GetWorkloadVersion();
|
||||
updatedWorkloadVersion.Should().StartWith("8.0.200-manifests.");
|
||||
updatedWorkloadVersion.Should().NotBe(originalWorkloadVersion);
|
||||
|
||||
GetUpdateMode().Should().Be("manifests");
|
||||
|
||||
VM.CreateRunCommand("dotnet", "workload", "config", "--update-mode", "workload-set")
|
||||
.WithDescription("Switch mode to workload-set")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
GetWorkloadVersion().Should().Be(updatedWorkloadVersion);
|
||||
|
||||
GetUpdateMode().Should().Be("workload-set");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UpdateWithWorkloadSets()
|
||||
{
|
||||
InstallSdk();
|
||||
|
||||
UpdateAndSwitchToWorkloadSetMode(out string _, out WorkloadSet rollbackAfterUpdate);
|
||||
|
||||
VM.CreateRunCommand("dotnet", "nuget", "add", "source", @"c:\SdkTesting\WorkloadSets")
|
||||
.WithDescription("Add WorkloadSets to NuGet.config")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
VM.CreateRunCommand("dotnet", "workload", "update")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
var newRollback = GetRollback();
|
||||
|
||||
newRollback.ManifestVersions.Should().NotBeEquivalentTo(rollbackAfterUpdate.ManifestVersions);
|
||||
|
||||
GetWorkloadVersion().Should().Be("8.0.201");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UpdateInWorkloadSetModeWithNoAvailableWorkloadSet()
|
||||
{
|
||||
InstallSdk();
|
||||
|
||||
UpdateAndSwitchToWorkloadSetMode(out string updatedWorkloadVersion, out WorkloadSet rollbackAfterUpdate);
|
||||
|
||||
VM.CreateRunCommand("dotnet", "workload", "update")
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
var newRollback = GetRollback();
|
||||
|
||||
newRollback.ManifestVersions.Should().BeEquivalentTo(rollbackAfterUpdate.ManifestVersions);
|
||||
|
||||
GetWorkloadVersion().Should().Be(updatedWorkloadVersion);
|
||||
}
|
||||
|
||||
string GetWorkloadVersion()
|
||||
{
|
||||
var result = VM.CreateRunCommand("dotnet", "workload", "--version")
|
||||
.WithIsReadOnly(true)
|
||||
.Execute();
|
||||
|
||||
result.Should().Pass();
|
||||
|
||||
return result.StdOut;
|
||||
}
|
||||
|
||||
string GetUpdateMode()
|
||||
{
|
||||
var result = VM.CreateRunCommand("dotnet", "workload", "config", "--update-mode")
|
||||
.WithIsReadOnly(true)
|
||||
.Execute();
|
||||
|
||||
result.Should().Pass();
|
||||
|
||||
return result.StdOut;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -325,9 +325,11 @@ namespace Microsoft.DotNet.Cli.Workload.Install.Tests
|
|||
var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", mockWorkloadId });
|
||||
var workloadResolverFactory = new MockWorkloadResolverFactory(dotnetRoot, "6.0.100", workloadResolver, userProfileDir: testDirectory);
|
||||
|
||||
var exceptionThrown = Assert.Throws<GracefulException>(() => new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolverFactory, workloadInstaller: installer,
|
||||
nugetPackageDownloader: nugetDownloader, workloadManifestUpdater: manifestUpdater));
|
||||
exceptionThrown.Message.Should().Be(String.Format(Workloads.Workload.Install.LocalizableStrings.WorkloadNotSupportedOnPlatform, mockWorkloadId));
|
||||
var command = new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolverFactory, workloadInstaller: installer,
|
||||
nugetPackageDownloader: nugetDownloader, workloadManifestUpdater: manifestUpdater);
|
||||
|
||||
var exceptionThrown = Assert.Throws<GracefulException>(() => command.Execute());
|
||||
exceptionThrown.Message.Should().Be(String.Format(Workloads.Workload.Install.LocalizableStrings.WorkloadInstallationFailed, String.Format(Workloads.Workload.Install.LocalizableStrings.WorkloadNotSupportedOnPlatform, mockWorkloadId)));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
|
Загрузка…
Ссылка в новой задаче