Skip to content

Commit df7cda4

Browse files
authored
Merge branch 'release/9.0.1xx' into darc-release/9.0.1xx-97e88e94-edb9-4b5d-b56a-61684ee41e58
2 parents 90b59c7 + 57a772d commit df7cda4

19 files changed

+309
-147
lines changed

eng/Version.Details.xml

Lines changed: 87 additions & 87 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<VersionMajor>9</VersionMajor>
77
<VersionMinor>0</VersionMinor>
88
<VersionSDKMinor>1</VersionSDKMinor>
9-
<VersionFeature>01</VersionFeature>
9+
<VersionFeature>02</VersionFeature>
1010
<!-- This property powers the SdkAnalysisLevel property in end-user MSBuild code.
1111
It should always be the hundreds-value of the current SDK version, never any
1212
preview version components or anything else. E.g. 8.0.100, 9.0.300, etc. -->
@@ -35,7 +35,7 @@
3535
<VersionFeature50>17</VersionFeature50>
3636
<VersionFeature60>36</VersionFeature60>
3737
<VersionFeature70>20</VersionFeature70>
38-
<VersionFeature80>$([MSBuild]::Add($(VersionFeature), 11))</VersionFeature80>
38+
<VersionFeature80>$([MSBuild]::Add($(VersionFeature), 10))</VersionFeature80>
3939
<!-- Should be kept in sync with VersionFeature70. It should match the version of Microsoft.NET.ILLink.Tasks
4040
referenced by the same 7.0 SDK that references the 7.0.VersionFeature70 runtime pack. -->
4141
<_NET70ILLinkPackVersion>7.0.100-1.23211.1</_NET70ILLinkPackVersion>
@@ -153,18 +153,18 @@
153153
</PropertyGroup>
154154
<PropertyGroup>
155155
<!-- Dependencies from https://github.com/nuget/nuget.client -->
156-
<NuGetBuildTasksPackageVersion>6.12.1-rc.1</NuGetBuildTasksPackageVersion>
157-
<NuGetBuildTasksConsolePackageVersion>6.12.1-rc.1</NuGetBuildTasksConsolePackageVersion>
158-
<NuGetLocalizationPackageVersion>6.12.1-rc.1</NuGetLocalizationPackageVersion>
159-
<NuGetBuildTasksPackPackageVersion>6.12.1-rc.1</NuGetBuildTasksPackPackageVersion>
160-
<NuGetCommandLineXPlatPackageVersion>6.12.1-rc.1</NuGetCommandLineXPlatPackageVersion>
161-
<NuGetProjectModelPackageVersion>6.12.1-rc.1</NuGetProjectModelPackageVersion>
162-
<MicrosoftBuildNuGetSdkResolverPackageVersion>6.12.1-rc.1</MicrosoftBuildNuGetSdkResolverPackageVersion>
163-
<NuGetCommonPackageVersion>6.12.1-rc.1</NuGetCommonPackageVersion>
164-
<NuGetConfigurationPackageVersion>6.12.1-rc.1</NuGetConfigurationPackageVersion>
165-
<NuGetFrameworksPackageVersion>6.12.1-rc.1</NuGetFrameworksPackageVersion>
166-
<NuGetPackagingPackageVersion>6.12.1-rc.1</NuGetPackagingPackageVersion>
167-
<NuGetVersioningPackageVersion>6.12.1-rc.1</NuGetVersioningPackageVersion>
156+
<NuGetBuildTasksPackageVersion>6.12.2-rc.1</NuGetBuildTasksPackageVersion>
157+
<NuGetBuildTasksConsolePackageVersion>6.12.2-rc.1</NuGetBuildTasksConsolePackageVersion>
158+
<NuGetLocalizationPackageVersion>6.12.2-rc.1</NuGetLocalizationPackageVersion>
159+
<NuGetBuildTasksPackPackageVersion>6.12.2-rc.1</NuGetBuildTasksPackPackageVersion>
160+
<NuGetCommandLineXPlatPackageVersion>6.12.2-rc.1</NuGetCommandLineXPlatPackageVersion>
161+
<NuGetProjectModelPackageVersion>6.12.2-rc.1</NuGetProjectModelPackageVersion>
162+
<MicrosoftBuildNuGetSdkResolverPackageVersion>6.12.2-rc.1</MicrosoftBuildNuGetSdkResolverPackageVersion>
163+
<NuGetCommonPackageVersion>6.12.2-rc.1</NuGetCommonPackageVersion>
164+
<NuGetConfigurationPackageVersion>6.12.2-rc.1</NuGetConfigurationPackageVersion>
165+
<NuGetFrameworksPackageVersion>6.12.2-rc.1</NuGetFrameworksPackageVersion>
166+
<NuGetPackagingPackageVersion>6.12.2-rc.1</NuGetPackagingPackageVersion>
167+
<NuGetVersioningPackageVersion>6.12.2-rc.1</NuGetVersioningPackageVersion>
168168
</PropertyGroup>
169169
<PropertyGroup>
170170
<!-- Dependencies from https://github.com/Microsoft/vstest -->
@@ -174,8 +174,8 @@
174174
</PropertyGroup>
175175
<PropertyGroup>
176176
<!-- Dependencies from https://github.com/dotnet/roslyn-analyzers -->
177-
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24527.2</MicrosoftCodeAnalysisNetAnalyzersVersion>
178-
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.11.0-beta1.24527.2</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
177+
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24574.2</MicrosoftCodeAnalysisNetAnalyzersVersion>
178+
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.11.0-beta1.24574.2</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
179179
</PropertyGroup>
180180
<PropertyGroup>
181181
<!-- Dependencies from https://github.com/Microsoft/msbuild -->
@@ -220,14 +220,14 @@
220220
</PropertyGroup>
221221
<PropertyGroup>
222222
<!-- Dependencies from https://github.com/dotnet/roslyn -->
223-
<MicrosoftNetCompilersToolsetVersion>4.12.0-3.24570.6</MicrosoftNetCompilersToolsetVersion>
224-
<MicrosoftNetCompilersToolsetFrameworkPackageVersion>4.12.0-3.24570.6</MicrosoftNetCompilersToolsetFrameworkPackageVersion>
225-
<MicrosoftCodeAnalysisPackageVersion>4.12.0-3.24570.6</MicrosoftCodeAnalysisPackageVersion>
226-
<MicrosoftCodeAnalysisCSharpPackageVersion>4.12.0-3.24570.6</MicrosoftCodeAnalysisCSharpPackageVersion>
227-
<MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>4.12.0-3.24570.6</MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>
228-
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.12.0-3.24570.6</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
229-
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.12.0-3.24570.6</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
230-
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>4.12.0-3.24570.6</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
223+
<MicrosoftNetCompilersToolsetVersion>4.12.0-3.24574.8</MicrosoftNetCompilersToolsetVersion>
224+
<MicrosoftNetCompilersToolsetFrameworkPackageVersion>4.12.0-3.24574.8</MicrosoftNetCompilersToolsetFrameworkPackageVersion>
225+
<MicrosoftCodeAnalysisPackageVersion>4.12.0-3.24574.8</MicrosoftCodeAnalysisPackageVersion>
226+
<MicrosoftCodeAnalysisCSharpPackageVersion>4.12.0-3.24574.8</MicrosoftCodeAnalysisCSharpPackageVersion>
227+
<MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>4.12.0-3.24574.8</MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>
228+
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.12.0-3.24574.8</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
229+
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.12.0-3.24574.8</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
230+
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>4.12.0-3.24574.8</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
231231
</PropertyGroup>
232232
<PropertyGroup>
233233
<!-- Dependencies from https://github.com/aspnet/AspNetCore -->
@@ -247,9 +247,9 @@
247247
</PropertyGroup>
248248
<PropertyGroup>
249249
<!-- Dependencies from https://github.com/dotnet/razor -->
250-
<MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>9.0.0-preview.24565.8</MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>
251-
<MicrosoftCodeAnalysisRazorToolingInternalVersion>9.0.0-preview.24565.8</MicrosoftCodeAnalysisRazorToolingInternalVersion>
252-
<MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>9.0.0-preview.24565.8</MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>
250+
<MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>9.0.0-preview.24574.7</MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>
251+
<MicrosoftCodeAnalysisRazorToolingInternalVersion>9.0.0-preview.24574.7</MicrosoftCodeAnalysisRazorToolingInternalVersion>
252+
<MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>9.0.0-preview.24574.7</MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>
253253
</PropertyGroup>
254254
<PropertyGroup>
255255
<!-- Dependencies from https://github.com/dotnet/wpf -->
@@ -286,19 +286,19 @@
286286
</PropertyGroup>
287287
<PropertyGroup>
288288
<!-- Dependencies from https://github.com/dotnet/arcade -->
289-
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24562.13</MicrosoftDotNetBuildTasksInstallersPackageVersion>
290-
<MicrosoftDotNetSignToolVersion>9.0.0-beta.24562.13</MicrosoftDotNetSignToolVersion>
291-
<MicrosoftDotNetXliffTasksVersion>9.0.0-beta.24562.13</MicrosoftDotNetXliffTasksVersion>
292-
<MicrosoftDotNetXUnitExtensionsVersion>9.0.0-beta.24562.13</MicrosoftDotNetXUnitExtensionsVersion>
289+
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24572.2</MicrosoftDotNetBuildTasksInstallersPackageVersion>
290+
<MicrosoftDotNetSignToolVersion>9.0.0-beta.24572.2</MicrosoftDotNetSignToolVersion>
291+
<MicrosoftDotNetXliffTasksVersion>9.0.0-beta.24572.2</MicrosoftDotNetXliffTasksVersion>
292+
<MicrosoftDotNetXUnitExtensionsVersion>9.0.0-beta.24572.2</MicrosoftDotNetXUnitExtensionsVersion>
293293
</PropertyGroup>
294294
<PropertyGroup>
295295
<!-- Dependencies from https://github.com/dotnet/sourcelink -->
296-
<MicrosoftBuildTasksGitVersion>9.0.0-beta.24569.2</MicrosoftBuildTasksGitVersion>
297-
<MicrosoftSourceLinkCommonVersion>9.0.0-beta.24569.2</MicrosoftSourceLinkCommonVersion>
298-
<MicrosoftSourceLinkAzureReposGitVersion>9.0.0-beta.24569.2</MicrosoftSourceLinkAzureReposGitVersion>
299-
<MicrosoftSourceLinkGitHubVersion>9.0.0-beta.24569.2</MicrosoftSourceLinkGitHubVersion>
300-
<MicrosoftSourceLinkGitLabVersion>9.0.0-beta.24569.2</MicrosoftSourceLinkGitLabVersion>
301-
<MicrosoftSourceLinkBitbucketGitVersion>9.0.0-beta.24569.2</MicrosoftSourceLinkBitbucketGitVersion>
296+
<MicrosoftBuildTasksGitVersion>9.0.0-beta.24574.1</MicrosoftBuildTasksGitVersion>
297+
<MicrosoftSourceLinkCommonVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkCommonVersion>
298+
<MicrosoftSourceLinkAzureReposGitVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkAzureReposGitVersion>
299+
<MicrosoftSourceLinkGitHubVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkGitHubVersion>
300+
<MicrosoftSourceLinkGitLabVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkGitLabVersion>
301+
<MicrosoftSourceLinkBitbucketGitVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkBitbucketGitVersion>
302302
</PropertyGroup>
303303
<!-- Get .NET Framework reference assemblies from NuGet packages -->
304304
<PropertyGroup>

eng/common/sdk-task.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ try {
6464
$GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty
6565
}
6666
if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) {
67-
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.10.0-pre.4.0" -MemberType NoteProperty
67+
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.12.0" -MemberType NoteProperty
6868
}
6969
if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") {
7070
$xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true

eng/common/tools.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
383383

384384
# If the version of msbuild is going to be xcopied,
385385
# use this version. Version matches a package here:
386-
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.10.0-pre.4.0
387-
$defaultXCopyMSBuildVersion = '17.10.0-pre.4.0'
386+
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.12.0
387+
$defaultXCopyMSBuildVersion = '17.12.0'
388388

389389
if (!$vsRequirements) {
390390
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"cmake": "latest"
1818
},
1919
"msbuild-sdks": {
20-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24562.13",
21-
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24562.13",
20+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24572.2",
21+
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24572.2",
2222
"Microsoft.Build.NoTargets": "3.7.0",
2323
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24217.1"
2424
}

src/Cli/dotnet/ToolPackage/IToolPackageDownloader.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Threading.Tasks;
5+
using Microsoft.DotNet.Cli.NuGetPackageDownloader;
56
using Microsoft.DotNet.ToolPackage;
67
using NuGet.Versioning;
78

@@ -15,7 +16,8 @@ IToolPackage InstallPackage(PackageLocation packageLocation,
1516
VersionRange versionRange = null,
1617
string targetFramework = null,
1718
bool isGlobalTool = false,
18-
bool isGlobalToolRollForward = false
19+
bool isGlobalToolRollForward = false,
20+
RestoreActionConfig restoreActionConfig = null
1921
);
2022

2123
NuGetVersion GetNuGetVersion(

src/Cli/dotnet/ToolPackage/ToolPackageDownloader.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
7777
VersionRange versionRange = null,
7878
string targetFramework = null,
7979
bool isGlobalTool = false,
80-
bool isGlobalToolRollForward = false
80+
bool isGlobalToolRollForward = false,
81+
RestoreActionConfig restoreActionConfig = null
8182
)
8283
{
8384
var packageRootDirectory = _toolPackageStore.GetRootPackageDirectory(packageId);
@@ -100,7 +101,7 @@ public IToolPackage InstallPackage(PackageLocation packageLocation, PackageId pa
100101

101102
var toolDownloadDir = isGlobalTool ? _globalToolStageDir : _localToolDownloadDir;
102103
var assetFileDirectory = isGlobalTool ? _globalToolStageDir : _localToolAssetDir;
103-
var nugetPackageDownloader = new NuGetPackageDownloader.NuGetPackageDownloader(toolDownloadDir, verboseLogger: nugetLogger, shouldUsePackageSourceMapping: true, verbosityOptions: verbosity);
104+
var nugetPackageDownloader = new NuGetPackageDownloader.NuGetPackageDownloader(toolDownloadDir, verboseLogger: nugetLogger, shouldUsePackageSourceMapping: true, restoreActionConfig: restoreActionConfig, verbosityOptions: verbosity);
104105

105106
var packageSourceLocation = new PackageSourceLocation(packageLocation.NugetConfig, packageLocation.RootConfigDirectory, packageLocation.SourceFeedOverrides, packageLocation.AdditionalFeeds);
106107

src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ internal class ToolInstallGlobalOrToolPathCommand : CommandBase
5050
private readonly bool _updateAll;
5151

5252

53+
internal readonly RestoreActionConfig _restoreActionConfig;
54+
5355
public ToolInstallGlobalOrToolPathCommand(
5456
ParseResult parseResult,
5557
PackageId? packageId = null,
@@ -81,11 +83,11 @@ public ToolInstallGlobalOrToolPathCommand(
8183
var configOption = parseResult.GetValue(ToolInstallCommandParser.ConfigOption);
8284
var sourceOption = parseResult.GetValue(ToolInstallCommandParser.AddSourceOption);
8385
var packageSourceLocation = new PackageSourceLocation(string.IsNullOrEmpty(configOption) ? null : new FilePath(configOption), additionalSourceFeeds: sourceOption);
84-
var restoreAction = new RestoreActionConfig(DisableParallel: parseResult.GetValue(ToolCommandRestorePassThroughOptions.DisableParallelOption),
86+
_restoreActionConfig = new RestoreActionConfig(DisableParallel: parseResult.GetValue(ToolCommandRestorePassThroughOptions.DisableParallelOption),
8587
NoCache: (parseResult.GetValue(ToolCommandRestorePassThroughOptions.NoCacheOption) || parseResult.GetValue(ToolCommandRestorePassThroughOptions.NoHttpCacheOption)),
8688
IgnoreFailedSources: parseResult.GetValue(ToolCommandRestorePassThroughOptions.IgnoreFailedSourcesOption),
8789
Interactive: parseResult.GetValue(ToolCommandRestorePassThroughOptions.InteractiveRestoreOption));
88-
nugetPackageDownloader ??= new NuGetPackageDownloader(tempDir, verboseLogger: new NullLogger(), restoreActionConfig: restoreAction, verbosityOptions: _verbosity);
90+
nugetPackageDownloader ??= new NuGetPackageDownloader(tempDir, verboseLogger: new NullLogger(), restoreActionConfig: _restoreActionConfig, verbosityOptions: _verbosity);
8991
_shellShimTemplateFinder = new ShellShimTemplateFinder(nugetPackageDownloader, tempDir, packageSourceLocation);
9092
_store = store;
9193

@@ -190,7 +192,8 @@ private int ExecuteInstallCommand(PackageId packageId)
190192
targetFramework: _framework,
191193
verbosity: _verbosity,
192194
isGlobalTool: true,
193-
isGlobalToolRollForward: _allowRollForward
195+
isGlobalToolRollForward: _allowRollForward,
196+
restoreActionConfig: _restoreActionConfig
194197
);
195198

196199
EnsureVersionIsHigher(oldPackageNullable, newInstalledPackage, _allowPackageDowngrade);

src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System.CommandLine;
55
using Microsoft.DotNet.Cli;
6+
using Microsoft.DotNet.Cli.NuGetPackageDownloader;
67
using Microsoft.DotNet.Cli.ToolPackage;
78
using Microsoft.DotNet.Cli.Utils;
89
using Microsoft.DotNet.ToolManifest;
@@ -28,6 +29,8 @@ internal class ToolInstallLocalCommand : CommandBase
2829
private readonly bool _allowRollForward;
2930
private readonly bool _updateAll;
3031

32+
internal readonly RestoreActionConfig _restoreActionConfig;
33+
3134
public ToolInstallLocalCommand(
3235
ParseResult parseResult,
3336
PackageId? packageId = null,
@@ -53,7 +56,11 @@ public ToolInstallLocalCommand(
5356
new ToolManifestFinder(new DirectoryPath(Directory.GetCurrentDirectory()));
5457
_toolManifestEditor = toolManifestEditor ?? new ToolManifestEditor();
5558
_localToolsResolverCache = localToolsResolverCache ?? new LocalToolsResolverCache();
56-
_toolLocalPackageInstaller = new ToolInstallLocalInstaller(parseResult, toolPackageDownloader, runtimeJsonPathForTests);
59+
_restoreActionConfig = new RestoreActionConfig(DisableParallel: parseResult.GetValue(ToolCommandRestorePassThroughOptions.DisableParallelOption),
60+
NoCache: parseResult.GetValue(ToolCommandRestorePassThroughOptions.NoCacheOption),
61+
IgnoreFailedSources: parseResult.GetValue(ToolCommandRestorePassThroughOptions.IgnoreFailedSourcesOption),
62+
Interactive: parseResult.GetValue(ToolCommandRestorePassThroughOptions.InteractiveRestoreOption));
63+
_toolLocalPackageInstaller = new ToolInstallLocalInstaller(parseResult, toolPackageDownloader, runtimeJsonPathForTests, _restoreActionConfig);
5764
_allowRollForward = parseResult.GetValue(ToolInstallCommandParser.RollForwardOption);
5865
_allowPackageDowngrade = parseResult.GetValue(ToolInstallCommandParser.AllowPackageDowngradeOption);
5966
}

src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalInstaller.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System.CommandLine;
55
using Microsoft.DotNet.Cli;
6+
using Microsoft.DotNet.Cli.NuGetPackageDownloader;
67
using Microsoft.DotNet.Cli.ToolPackage;
78
using Microsoft.DotNet.Cli.Utils;
89
using Microsoft.DotNet.ToolPackage;
@@ -20,11 +21,13 @@ internal class ToolInstallLocalInstaller
2021
private readonly string _configFilePath;
2122
private readonly string[] _sources;
2223
private readonly VerbosityOptions _verbosity;
24+
private readonly RestoreActionConfig _restoreActionConfig;
2325

2426
public ToolInstallLocalInstaller(
2527
ParseResult parseResult,
2628
IToolPackageDownloader toolPackageDownloader = null,
27-
string runtimeJsonPathForTests = null)
29+
string runtimeJsonPathForTests = null,
30+
RestoreActionConfig restoreActionConfig = null)
2831
{
2932
_parseResult = parseResult;
3033
_configFilePath = parseResult.GetValue(ToolInstallCommandParser.ConfigOption);
@@ -37,7 +40,7 @@ public ToolInstallLocalInstaller(
3740
= ToolPackageFactory.CreateToolPackageStoresAndDownloader(
3841
additionalRestoreArguments: parseResult.OptionValuesToBeForwarded(ToolInstallCommandParser.GetCommand()), runtimeJsonPathForTests: runtimeJsonPathForTests);
3942
_toolPackageDownloader = toolPackageDownloader ?? toolPackageStoresAndDownloader.downloader;
40-
43+
_restoreActionConfig = restoreActionConfig;
4144

4245
TargetFrameworkToInstall = BundledTargetFramework.GetTargetFrameworkMoniker();
4346
}
@@ -70,7 +73,8 @@ public IToolPackage Install(FilePath manifestFile, PackageId packageId)
7073
packageId,
7174
verbosity: _verbosity,
7275
versionRange,
73-
TargetFrameworkToInstall
76+
TargetFrameworkToInstall,
77+
restoreActionConfig: _restoreActionConfig
7478
);
7579

7680
return toolDownloadedPackage;

0 commit comments

Comments
 (0)