From 2bbe922b567d0a2c907b2e9362e4dd19ad95b575 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 23 Nov 2024 13:13:43 +0000 Subject: [PATCH 01/49] Update dependencies from https://github.com/dotnet/arcade build 20241120.5 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24562.12 -> To Version 8.0.0-beta.24570.5 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4557a2acce6f..ad3533e58113 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -491,22 +491,22 @@ - + https://github.com/dotnet/arcade - 42652ca52cd5f9f637fef2b3ab6148805e3c5168 + 3c7e11bf80279cde53a6251c4d0fa10e613fc739 - + https://github.com/dotnet/arcade - 42652ca52cd5f9f637fef2b3ab6148805e3c5168 + 3c7e11bf80279cde53a6251c4d0fa10e613fc739 - + https://github.com/dotnet/arcade - 42652ca52cd5f9f637fef2b3ab6148805e3c5168 + 3c7e11bf80279cde53a6251c4d0fa10e613fc739 - + https://github.com/dotnet/arcade - 42652ca52cd5f9f637fef2b3ab6148805e3c5168 + 3c7e11bf80279cde53a6251c4d0fa10e613fc739 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 9261bf31ac8e..1d65b2301152 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -34,7 +34,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24562.12 + 8.0.0-beta.24570.5 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -209,7 +209,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24562.12 + 8.0.0-beta.24570.5 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 265d3b6f8cf6..6dc38f7387fd 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24562.12", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24562.12" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24570.5", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24570.5" } } From ecfed74ad655d6ba8b63bb8a4374462c0c839352 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 23 Nov 2024 16:28:46 +0000 Subject: [PATCH 02/49] Update dependencies from https://github.com/dotnet/templating build 20241123.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.112-servicing.24564.2 -> To Version 8.0.112-servicing.24573.2 --- NuGet.config | 2 +- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NuGet.config b/NuGet.config index 751a6ec00301..8a7b728112d4 100644 --- a/NuGet.config +++ b/NuGet.config @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4557a2acce6f..f9aebc6522d7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - ab82351fa7cab9a92a92b4e7082991d66027d10b + 7e0acf900fbe1081a0cf8981b0139aba830b3318 - + https://github.com/dotnet/templating - ab82351fa7cab9a92a92b4e7082991d66027d10b + 7e0acf900fbe1081a0cf8981b0139aba830b3318 - + https://github.com/dotnet/templating - ab82351fa7cab9a92a92b4e7082991d66027d10b + 7e0acf900fbe1081a0cf8981b0139aba830b3318 diff --git a/eng/Versions.props b/eng/Versions.props index 9261bf31ac8e..2239118e61f5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -143,7 +143,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.112-servicing.24564.2 + 8.0.112-servicing.24573.2 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 485bc9a2c447175d50a3bcfc97145da29925c816 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 18 Dec 2024 15:18:07 +0000 Subject: [PATCH 03/49] Update dependencies from https://github.com/dotnet/sourcelink build 20241217.1 Microsoft.SourceBuild.Intermediate.sourcelink , Microsoft.Build.Tasks.Git , Microsoft.SourceLink.AzureRepos.Git , Microsoft.SourceLink.Bitbucket.Git , Microsoft.SourceLink.Common , Microsoft.SourceLink.GitHub , Microsoft.SourceLink.GitLab From Version 9.0.0-beta.24603.2 -> To Version 9.0.0-beta.24617.1 --- NuGet.config | 7 +++++++ eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 12 ++++++------ 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7371e9a37303..935c1e9641e0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,6 +18,13 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 12607f6e6571..a18973ed73dd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -460,34 +460,34 @@ https://github.com/dotnet/deployment-tools 7871ee378dce87b64d930d4f33dca9c888f4034d - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b diff --git a/eng/Versions.props b/eng/Versions.props index d9f1aa94e495..445fc5dd7f03 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -277,12 +277,12 @@ - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 From cd554fcb7cabb98095972aba016208b479b17ac1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 18 Dec 2024 15:18:10 +0000 Subject: [PATCH 04/49] Update dependencies from https://github.com/dotnet/msbuild build 20241218.1 Microsoft.SourceBuild.Intermediate.msbuild , Microsoft.Build , Microsoft.Build.Localization From Version 17.12.18-preview-24610-04 -> To Version 17.12.21-preview-24618-01 --- NuGet.config | 9 ++++++++- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7371e9a37303..c89a8ae1d128 100644 --- a/NuGet.config +++ b/NuGet.config @@ -10,7 +10,7 @@ - + @@ -18,6 +18,13 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 12607f6e6571..eab221db5b9f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -73,18 +73,18 @@ 763d10a1a251be35337ee736832bfde3f9200672 - + https://github.com/dotnet/msbuild - ed8c6aec5b774cfdad4e95033910c30aa0d93391 + f7f4b086d628f5e6db8c660a6ea9d6c397386d1a - + https://github.com/dotnet/msbuild - ed8c6aec5b774cfdad4e95033910c30aa0d93391 + f7f4b086d628f5e6db8c660a6ea9d6c397386d1a - + https://github.com/dotnet/msbuild - ed8c6aec5b774cfdad4e95033910c30aa0d93391 + f7f4b086d628f5e6db8c660a6ea9d6c397386d1a diff --git a/eng/Versions.props b/eng/Versions.props index d9f1aa94e495..47e175e02b1b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -180,8 +180,8 @@ At usage sites, either we use MicrosoftBuildMinimumVersion, or MicrosoftBuildVersion in source-only modes. Additionally, set the MinimumVSVersion for the installer UI that's required for targeting NetCurrent --> - 17.12.18 - 17.12.18-preview-24610-04 + 17.12.21 + 17.12.21-preview-24618-01 17.11.4 17.12 From 8e17f0908f83df283b2a21a2dfac47e386614353 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 20 Dec 2024 05:01:41 +0000 Subject: [PATCH 05/49] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20241219.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24604.1 -> To Version 9.0.0-alpha.1.24619.1 --- NuGet.config | 7 +++++++ eng/Version.Details.xml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7371e9a37303..935c1e9641e0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,6 +18,13 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 12607f6e6571..d793cbeec3d8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -451,9 +451,9 @@ - + https://github.com/dotnet/source-build-reference-packages - c81acaa80719d0ecfadfe41e3c0e3548bdc4e78d + e2b1d16fd66540b3a5813ec0ac1fd166688c3e0a From 86715a6a304608c575d21e3c413fa4294bf408ef Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 20 Dec 2024 19:05:35 +0000 Subject: [PATCH 06/49] Update dependencies from https://github.com/dotnet/scenario-tests build 20241220.5 Microsoft.SourceBuild.Intermediate.scenario-tests , Microsoft.DotNet.ScenarioTests.SdkTemplateTests From Version 9.0.0-preview.24514.1 -> To Version 9.0.0-preview.24620.5 --- NuGet.config | 7 +++++++ eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7371e9a37303..935c1e9641e0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,6 +18,13 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 12607f6e6571..c27594377bc9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -631,14 +631,14 @@ https://github.com/dotnet/arcade-services 47e3672c762970073e4282bd563233da86bcca3e - + https://github.com/dotnet/scenario-tests - 1009e3b6d23e049de56b91de82fe975fe84444f8 + c63404fbef9c4f90587656d5550097de915273b9 - + https://github.com/dotnet/scenario-tests - 1009e3b6d23e049de56b91de82fe975fe84444f8 + c63404fbef9c4f90587656d5550097de915273b9 From b712eac8569c8a24e02901b11909d023683e00cb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 30 Dec 2024 05:02:14 +0000 Subject: [PATCH 07/49] Update dependencies from https://github.com/dotnet/razor build 20241229.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24574.6 -> To Version 7.0.0-preview.24629.2 --- NuGet.config | 3 +++ eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index ddf5b0a2a10f..b644a0d87e80 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,6 +27,9 @@ + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2e8df806deda..dc58065bbbaa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -293,18 +293,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore 47576478939fdd59b4400ad135f47938af486ab3 - + https://github.com/dotnet/razor - aa2c76f75e60f3f6ae500bbf0eae9eb11af0bd4f + 47a3872a73899ff683dc9593e587e539a1264233 - + https://github.com/dotnet/razor - aa2c76f75e60f3f6ae500bbf0eae9eb11af0bd4f + 47a3872a73899ff683dc9593e587e539a1264233 - + https://github.com/dotnet/razor - aa2c76f75e60f3f6ae500bbf0eae9eb11af0bd4f + 47a3872a73899ff683dc9593e587e539a1264233 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 2af4b58e59ae..d88b9a5e53a2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -179,9 +179,9 @@ - 7.0.0-preview.24574.6 - 7.0.0-preview.24574.6 - 7.0.0-preview.24574.6 + 7.0.0-preview.24629.2 + 7.0.0-preview.24629.2 + 7.0.0-preview.24629.2 From bfd72f103ee8bebc47c368af8c0f9076758b0346 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 30 Dec 2024 05:02:15 +0000 Subject: [PATCH 08/49] Update dependencies from https://github.com/dotnet/roslyn build 20241229.4 Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset , Microsoft.Net.Compilers.Toolset.Framework From Version 4.12.0-3.24574.8 -> To Version 4.12.0-3.24629.4 --- NuGet.config | 7 +++++++ eng/Version.Details.xml | 36 ++++++++++++++++++------------------ eng/Versions.props | 16 ++++++++-------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7371e9a37303..935c1e9641e0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,6 +18,13 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 12607f6e6571..62a3af0b26b7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,43 +97,43 @@ fd29258f2eb7502b09a450a8250495adb6c5caee - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 - + https://github.com/dotnet/roslyn - dfa7fc6bdea31a858a402168384192b633c811fa + 14d42fca53d486ceafbef3961aec0bad554bc6b0 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index d9f1aa94e495..d215d3f655ec 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -204,14 +204,14 @@ - 4.12.0-3.24574.8 - 4.12.0-3.24574.8 - 4.12.0-3.24574.8 - 4.12.0-3.24574.8 - 4.12.0-3.24574.8 - 4.12.0-3.24574.8 - 4.12.0-3.24574.8 - 4.12.0-3.24574.8 + 4.12.0-3.24629.4 + 4.12.0-3.24629.4 + 4.12.0-3.24629.4 + 4.12.0-3.24629.4 + 4.12.0-3.24629.4 + 4.12.0-3.24629.4 + 4.12.0-3.24629.4 + 4.12.0-3.24629.4 From da62d84b47456804f9052731ac23f3bb7208f3ca Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 30 Dec 2024 05:02:18 +0000 Subject: [PATCH 09/49] Update dependencies from https://github.com/dotnet/roslyn build 20241229.1 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24574.6 -> To Version 4.10.0-3.24629.1 --- NuGet.config | 3 +++ eng/Version.Details.xml | 14 +++++++------- eng/Versions.props | 14 +++++++------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/NuGet.config b/NuGet.config index ddf5b0a2a10f..b644a0d87e80 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,6 +27,9 @@ + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2e8df806deda..e1c0f24e610e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,32 +82,32 @@ 86f5186deeea364bd8541d51657e52a54b2a96b2 - + https://github.com/dotnet/roslyn 64e323ff5a3f88b1eae1c6d728441e73a38a9daa - + https://github.com/dotnet/roslyn 64e323ff5a3f88b1eae1c6d728441e73a38a9daa - + https://github.com/dotnet/roslyn 64e323ff5a3f88b1eae1c6d728441e73a38a9daa - + https://github.com/dotnet/roslyn 64e323ff5a3f88b1eae1c6d728441e73a38a9daa - + https://github.com/dotnet/roslyn 64e323ff5a3f88b1eae1c6d728441e73a38a9daa - + https://github.com/dotnet/roslyn 64e323ff5a3f88b1eae1c6d728441e73a38a9daa - + https://github.com/dotnet/roslyn 64e323ff5a3f88b1eae1c6d728441e73a38a9daa diff --git a/eng/Versions.props b/eng/Versions.props index 2af4b58e59ae..829355f43c44 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -158,13 +158,13 @@ - 4.10.0-3.24574.6 - 4.10.0-3.24574.6 - 4.10.0-3.24574.6 - 4.10.0-3.24574.6 - 4.10.0-3.24574.6 - 4.10.0-3.24574.6 - 4.10.0-3.24574.6 + 4.10.0-3.24629.1 + 4.10.0-3.24629.1 + 4.10.0-3.24629.1 + 4.10.0-3.24629.1 + 4.10.0-3.24629.1 + 4.10.0-3.24629.1 + 4.10.0-3.24629.1 $(MicrosoftNetCompilersToolsetPackageVersion) From 76b8c5d42b803ecc386ee8d29df0b4ae70d7a1c7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 Jan 2025 05:02:05 +0000 Subject: [PATCH 10/49] Update dependencies from https://github.com/dotnet/arcade build 20241223.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24570.5 -> To Version 8.0.0-beta.24623.2 --- NuGet.config | 3 ++ eng/Version.Details.xml | 16 ++++----- eng/Versions.props | 4 +-- eng/common/cross/toolchain.cmake | 61 ++++++++++++++++---------------- eng/common/tools.ps1 | 2 +- eng/common/tools.sh | 2 +- global.json | 4 +-- 7 files changed, 47 insertions(+), 45 deletions(-) diff --git a/NuGet.config b/NuGet.config index ddf5b0a2a10f..b644a0d87e80 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,6 +27,9 @@ + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2e8df806deda..f2c3e76c4ad7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -491,22 +491,22 @@ - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 2af4b58e59ae..97e6e3be0748 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24570.5 + 8.0.0-beta.24623.2 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -213,7 +213,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24570.5 + 8.0.0-beta.24623.2 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 0998e875e5f7..dafabdcaef00 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -95,7 +95,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -112,7 +112,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") @@ -124,26 +124,25 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() if(ANDROID) @@ -265,21 +264,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) @@ -288,10 +287,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index a2dedaa5297a..60352ede194e 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -321,7 +321,7 @@ function InstallDotNet([string] $dotnetRoot, $variations += @($installParameters) $dotnetBuilds = $installParameters.Clone() - $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public" + $dotnetbuilds.AzureFeed = "https://ci.dot.net/public" $variations += @($dotnetBuilds) if ($runtimeSourceFeed) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 3392e3a99921..b9b329ce37ff 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -234,7 +234,7 @@ function InstallDotNet { local public_location=("${installParameters[@]}") variations+=(public_location) - local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public") + local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public") variations+=(dotnetbuilds) if [[ -n "${6:-}" ]]; then diff --git a/global.json b/global.json index 6dc38f7387fd..13ffec39d571 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24570.5", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24570.5" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24623.2", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24623.2" } } From 6ee497ce5e5193bd61bf758c494c0e34ae988738 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 Jan 2025 05:02:05 +0000 Subject: [PATCH 11/49] Update dependencies from https://github.com/dotnet/arcade build 20241223.3 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions From Version 9.0.0-beta.24572.2 -> To Version 9.0.0-beta.24623.3 --- NuGet.config | 7 ++++ eng/Version.Details.xml | 28 ++++++------- eng/Versions.props | 8 ++-- eng/common/cross/toolchain.cmake | 67 +++++++++++++++----------------- eng/common/tools.ps1 | 2 +- eng/common/tools.sh | 2 +- global.json | 4 +- 7 files changed, 60 insertions(+), 58 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7371e9a37303..935c1e9641e0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,6 +18,13 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 12607f6e6571..f64b3844922e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -589,34 +589,34 @@ - + https://github.com/dotnet/arcade - b41381d5cd633471265e9cd72e933a7048e03062 + e0e05154656254a735ebf19ffa5a37a8b915039b - + https://github.com/dotnet/arcade - b41381d5cd633471265e9cd72e933a7048e03062 + e0e05154656254a735ebf19ffa5a37a8b915039b - + https://github.com/dotnet/arcade - b41381d5cd633471265e9cd72e933a7048e03062 + e0e05154656254a735ebf19ffa5a37a8b915039b - + https://github.com/dotnet/arcade - b41381d5cd633471265e9cd72e933a7048e03062 + e0e05154656254a735ebf19ffa5a37a8b915039b - + https://github.com/dotnet/arcade - b41381d5cd633471265e9cd72e933a7048e03062 + e0e05154656254a735ebf19ffa5a37a8b915039b - + https://github.com/dotnet/arcade - b41381d5cd633471265e9cd72e933a7048e03062 + e0e05154656254a735ebf19ffa5a37a8b915039b - + https://github.com/dotnet/arcade - b41381d5cd633471265e9cd72e933a7048e03062 + e0e05154656254a735ebf19ffa5a37a8b915039b diff --git a/eng/Versions.props b/eng/Versions.props index d9f1aa94e495..6e231c06b114 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -270,10 +270,10 @@ - 9.0.0-beta.24572.2 - 9.0.0-beta.24572.2 - 9.0.0-beta.24572.2 - 9.0.0-beta.24572.2 + 9.0.0-beta.24623.3 + 9.0.0-beta.24623.3 + 9.0.0-beta.24623.3 + 9.0.0-beta.24623.3 diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 9a4e285a5ae3..9a7ecfbd42c5 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -81,7 +81,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") else() set(TOOLCHAIN "riscv64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu/13.1.0") + set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu") endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") @@ -98,7 +98,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -115,7 +115,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") @@ -127,30 +127,25 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "riscv64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/riscv64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() if(ANDROID) @@ -272,21 +267,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") add_toolchain_linker_flag("--target=${TOOLCHAIN}") @@ -297,10 +292,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index aa94fb174596..a46b6deb7598 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -320,7 +320,7 @@ function InstallDotNet([string] $dotnetRoot, $variations += @($installParameters) $dotnetBuilds = $installParameters.Clone() - $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public" + $dotnetbuilds.AzureFeed = "https://ci.dot.net/public" $variations += @($dotnetBuilds) if ($runtimeSourceFeed) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 00473c9f918d..1159726a10fd 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -232,7 +232,7 @@ function InstallDotNet { local public_location=("${installParameters[@]}") variations+=(public_location) - local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public") + local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public") variations+=(dotnetbuilds) if [[ -n "${6:-}" ]]; then diff --git a/global.json b/global.json index 10b7560a80ab..ad1375e670f0 100644 --- a/global.json +++ b/global.json @@ -17,8 +17,8 @@ "cmake": "latest" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24572.2", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24572.2", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24623.3", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24623.3", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24217.1" } From 2d345cf01392b84ee7400d8e6aef6002195435a5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 Jan 2025 05:02:05 +0000 Subject: [PATCH 12/49] Update dependencies from https://github.com/dotnet/roslyn build 20241231.1 Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset , Microsoft.Net.Compilers.Toolset.Framework From Version 4.12.0-3.24574.8 -> To Version 4.12.0-3.24631.1 --- eng/Version.Details.xml | 36 ++++++++++++++++++------------------ eng/Versions.props | 16 ++++++++-------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 62a3af0b26b7..5d7d90f12325 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,43 +97,43 @@ fd29258f2eb7502b09a450a8250495adb6c5caee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee - + https://github.com/dotnet/roslyn - 14d42fca53d486ceafbef3961aec0bad554bc6b0 + da7c6c4257b2f661024b9a506773372a09023eee https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index d215d3f655ec..9fd5d4bc1bcc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -204,14 +204,14 @@ - 4.12.0-3.24629.4 - 4.12.0-3.24629.4 - 4.12.0-3.24629.4 - 4.12.0-3.24629.4 - 4.12.0-3.24629.4 - 4.12.0-3.24629.4 - 4.12.0-3.24629.4 - 4.12.0-3.24629.4 + 4.12.0-3.24631.1 + 4.12.0-3.24631.1 + 4.12.0-3.24631.1 + 4.12.0-3.24631.1 + 4.12.0-3.24631.1 + 4.12.0-3.24631.1 + 4.12.0-3.24631.1 + 4.12.0-3.24631.1 From fd378e182fdc329f1487a8eb5717910e2dd0361f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 Jan 2025 22:59:32 +0000 Subject: [PATCH 13/49] Update dependencies from https://github.com/dotnet/scenario-tests build 20250101.2 Microsoft.SourceBuild.Intermediate.scenario-tests , Microsoft.DotNet.ScenarioTests.SdkTemplateTests From Version 9.0.0-preview.24514.1 -> To Version 9.0.0-preview.25051.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c27594377bc9..01049856d75d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -631,14 +631,14 @@ https://github.com/dotnet/arcade-services 47e3672c762970073e4282bd563233da86bcca3e - + https://github.com/dotnet/scenario-tests - c63404fbef9c4f90587656d5550097de915273b9 + 6ce5a7bf0ef0c62bc0dc0140c45637a5e161823f - + https://github.com/dotnet/scenario-tests - c63404fbef9c4f90587656d5550097de915273b9 + 6ce5a7bf0ef0c62bc0dc0140c45637a5e161823f From b2149cce87c69478f5730f030e2d8f8d4a8bcf4a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 7 Jan 2025 05:02:20 +0000 Subject: [PATCH 14/49] Update dependencies from https://github.com/dotnet/roslyn build 20250106.12 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24574.6 -> To Version 4.10.0-3.25056.12 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e1c0f24e610e..bf813f5a174d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ 86f5186deeea364bd8541d51657e52a54b2a96b2 - + https://github.com/dotnet/roslyn - 64e323ff5a3f88b1eae1c6d728441e73a38a9daa + 3bdcd8b471bef9a522c16a0ada911eb9890b1a6c - + https://github.com/dotnet/roslyn - 64e323ff5a3f88b1eae1c6d728441e73a38a9daa + 3bdcd8b471bef9a522c16a0ada911eb9890b1a6c - + https://github.com/dotnet/roslyn - 64e323ff5a3f88b1eae1c6d728441e73a38a9daa + 3bdcd8b471bef9a522c16a0ada911eb9890b1a6c - + https://github.com/dotnet/roslyn - 64e323ff5a3f88b1eae1c6d728441e73a38a9daa + 3bdcd8b471bef9a522c16a0ada911eb9890b1a6c - + https://github.com/dotnet/roslyn - 64e323ff5a3f88b1eae1c6d728441e73a38a9daa + 3bdcd8b471bef9a522c16a0ada911eb9890b1a6c - + https://github.com/dotnet/roslyn - 64e323ff5a3f88b1eae1c6d728441e73a38a9daa + 3bdcd8b471bef9a522c16a0ada911eb9890b1a6c - + https://github.com/dotnet/roslyn - 64e323ff5a3f88b1eae1c6d728441e73a38a9daa + 3bdcd8b471bef9a522c16a0ada911eb9890b1a6c https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 829355f43c44..9ba6400015ca 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -158,13 +158,13 @@ - 4.10.0-3.24629.1 - 4.10.0-3.24629.1 - 4.10.0-3.24629.1 - 4.10.0-3.24629.1 - 4.10.0-3.24629.1 - 4.10.0-3.24629.1 - 4.10.0-3.24629.1 + 4.10.0-3.25056.12 + 4.10.0-3.25056.12 + 4.10.0-3.25056.12 + 4.10.0-3.25056.12 + 4.10.0-3.25056.12 + 4.10.0-3.25056.12 + 4.10.0-3.25056.12 $(MicrosoftNetCompilersToolsetPackageVersion) From 95c4909d623aac105c9a2fae00b8c791de0b0a19 Mon Sep 17 00:00:00 2001 From: Surayya Huseyn Zada Date: Tue, 7 Jan 2025 11:34:04 +0100 Subject: [PATCH 15/49] fix setting ContainerAppCommand --- .../Microsoft.NET.Build.Containers.targets | 4 +-- .../EndToEndTests.cs | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets index da20cdc0a8fc..1b6ad491c8af 100644 --- a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets +++ b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets @@ -110,8 +110,8 @@ - - + + diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index f13d96cf0120..c78cf0eb8d5b 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -688,6 +688,39 @@ public void EndToEnd_NoAPI_Console() privateNuGetAssets.Delete(true); } + [DockerAvailableFact] + public void EndToEnd_SingleArch_NoRid() + { + // Create a new console project + DirectoryInfo newProjectDir = CreateNewProject("console"); + + string imageName = NewImageName(); + string imageTag = "1.0"; + + // Run PublishContainer for multi-arch + CommandResult commandResult = new DotnetCommand( + _testOutput, + "publish", + "/t:PublishContainer", + $"/p:ContainerBaseImage={DockerRegistryManager.FullyQualifiedBaseImageAspNet}", + $"/p:ContainerRepository={imageName}", + $"/p:ContainerImageTag={imageTag}", + "/p:EnableSdkContainerSupport=true") + .WithWorkingDirectory(newProjectDir.FullName) + .Execute(); + commandResult.Should().Pass(); + + // Check that the containers can be run + CommandResult processResultX64 = ContainerCli.RunCommand( + _testOutput, + "--rm", + "--name", + $"test-container-singlearch-norid", + $"{imageName}:{imageTag}") + .Execute(); + processResultX64.Should().Pass().And.HaveStdOut("Hello, World!"); + } + [DockerSupportsArchFact("linux/arm64")] public void EndToEndMultiArch_LocalRegistry() { From 88622d9a3cdb7a0f8ba3a78b95f958535109a63d Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Tue, 7 Jan 2025 10:42:05 -0800 Subject: [PATCH 16/49] Update branding to 8.0.113 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index bdb8f07c54d1..d95851652ea7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ - 8.0.112 + 8.0.113 true release From 0313dc2697d73497546dc72e8fecee99d5463625 Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Tue, 7 Jan 2025 10:42:13 -0800 Subject: [PATCH 17/49] Update branding to 8.0.309 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 2af4b58e59ae..f04bbac957d6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ - 8.0.308 + 8.0.309 8.0.300 true From 3945c330062572fdf62f1ab3ae2f68d362346416 Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Tue, 7 Jan 2025 10:42:19 -0800 Subject: [PATCH 18/49] Update branding to 8.0.406 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 4e7ad6b011c1..e30bc79c0a5c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ - 8.0.405 + 8.0.406 8.0.400 true From 416d0fa0b3d7ab6d1757bc6d8552c927ea010054 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 8 Jan 2025 05:01:43 +0000 Subject: [PATCH 19/49] Update dependencies from https://github.com/dotnet/templating build 20250107.5 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.405-servicing.24575.2 -> To Version 8.0.406-servicing.25057.5 --- NuGet.config | 2 +- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index db35dc83e20f..909bd7ad5318 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,7 +27,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 75b4a0a733f3..2daf72006fc3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/templating - b8edc79137b4beddbee6c98794638fa0110b40df + 7d36300e8f8e564c786fd76a49c4c4e99abf1fb2 - + https://github.com/dotnet/templating - b8edc79137b4beddbee6c98794638fa0110b40df + 7d36300e8f8e564c786fd76a49c4c4e99abf1fb2 - + https://github.com/dotnet/templating - b8edc79137b4beddbee6c98794638fa0110b40df + 7d36300e8f8e564c786fd76a49c4c4e99abf1fb2 diff --git a/eng/Versions.props b/eng/Versions.props index e30bc79c0a5c..22112f8d3aa5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -141,13 +141,13 @@ - 8.0.405 + 8.0.406 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.405-servicing.24575.2 + 8.0.406-servicing.25057.5 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From f3c48f7c55a094c4223e548738b0e625a2cef817 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:28:45 -0800 Subject: [PATCH 20/49] [release/9.0.1xx] Update dependencies from dotnet/test-templates (#45358) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5b814438bbf8..272258a41033 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -379,14 +379,14 @@ https://github.com/dotnet/test-templates 49c9ad01f057b3c6352bbec12b117acc2224493c - + https://github.com/dotnet/test-templates - 22f4800ed2fe5dbca64c982aa15fd6838016328e + 8d99bca98e3fd0c8f4e10eb200aed20d9665de0e - + https://github.com/dotnet/test-templates - 22f4800ed2fe5dbca64c982aa15fd6838016328e + 8d99bca98e3fd0c8f4e10eb200aed20d9665de0e diff --git a/eng/Versions.props b/eng/Versions.props index ca002283603e..262b41169d6a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -82,7 +82,7 @@ - 1.1.0-rtm.24605.1 + 1.1.0-rtm.24606.1 From 7a28873e9053e96382178e66f69dff0f7248958f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:29:06 -0800 Subject: [PATCH 21/49] [release/9.0.1xx] Update dependencies from dotnet/xdt (#45378) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 272258a41033..72e96562ebcb 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -398,14 +398,14 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-wpf a04736acb8edb533756131d3d5fc55f15cd03d6a - + https://github.com/dotnet/xdt - 1a54480f52703fb45fac2a6b955247d33758383e + 63ae81154c50a1cf9287cc47d8351d55b4289e6d - + https://github.com/dotnet/xdt - 1a54480f52703fb45fac2a6b955247d33758383e + 63ae81154c50a1cf9287cc47d8351d55b4289e6d diff --git a/eng/Versions.props b/eng/Versions.props index 262b41169d6a..c24d6502b1e9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ https://dotnetclimsrc.blob.core.windows.net/dotnet/ - 9.0.0-preview.24522.2 + 10.0.0-preview.24609.2 1.0.0-20230414.1 2.22.0 2.0.1-servicing-26011-01 From 0d81978237d6e5ec30be14fa4423201ff28f0f0b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:31:42 -0800 Subject: [PATCH 22/49] [release/8.0.3xx] Update dependencies from dotnet/razor (#45449) Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 1 + eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index ddf5b0a2a10f..aec8808dc7c7 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,6 +27,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2e8df806deda..cf3334c9b200 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -293,18 +293,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore 47576478939fdd59b4400ad135f47938af486ab3 - + https://github.com/dotnet/razor - aa2c76f75e60f3f6ae500bbf0eae9eb11af0bd4f + 47a3872a73899ff683dc9593e587e539a1264233 - + https://github.com/dotnet/razor - aa2c76f75e60f3f6ae500bbf0eae9eb11af0bd4f + 47a3872a73899ff683dc9593e587e539a1264233 - + https://github.com/dotnet/razor - aa2c76f75e60f3f6ae500bbf0eae9eb11af0bd4f + 47a3872a73899ff683dc9593e587e539a1264233 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index f04bbac957d6..2b50dba3e1e3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -179,9 +179,9 @@ - 7.0.0-preview.24574.6 - 7.0.0-preview.24574.6 - 7.0.0-preview.24574.6 + 7.0.0-preview.24612.2 + 7.0.0-preview.24612.2 + 7.0.0-preview.24612.2 From 5a7b13708aa9774738b031c4583a981cf425229f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:32:04 -0800 Subject: [PATCH 23/49] [release/8.0.3xx] Update dependencies from dotnet/msbuild (#45466) Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 1 + eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NuGet.config b/NuGet.config index aec8808dc7c7..a021da0f6c27 100644 --- a/NuGet.config +++ b/NuGet.config @@ -20,6 +20,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cf3334c9b200..f2cb430e34b4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -55,17 +55,17 @@ https://github.com/dotnet/emsdk f6237140b33bf18c72dccfeda14be8d103c3b93e - + https://github.com/dotnet/msbuild - 10fbfbf2eeb0597fdc1f600d87d38c7f57317bdc + 7c2b92622c44c2d0ad0cc9d9f5fa2796d0c5c81c - + https://github.com/dotnet/msbuild - 10fbfbf2eeb0597fdc1f600d87d38c7f57317bdc + 7c2b92622c44c2d0ad0cc9d9f5fa2796d0c5c81c - + https://github.com/dotnet/msbuild - 10fbfbf2eeb0597fdc1f600d87d38c7f57317bdc + 7c2b92622c44c2d0ad0cc9d9f5fa2796d0c5c81c diff --git a/eng/Versions.props b/eng/Versions.props index 2b50dba3e1e3..aea0650b36eb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -124,7 +124,7 @@ - 17.10.4 + 17.10.14 $(MicrosoftBuildPackageVersion) + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 75b4a0a733f3..2e5f31f4ba60 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -491,22 +491,22 @@ - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 - + https://github.com/dotnet/arcade - 3c7e11bf80279cde53a6251c4d0fa10e613fc739 + 278b1dda181ab18a9fbed73da998e50d128eae21 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index e30bc79c0a5c..cf8ce23c57ed 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ 8.0.0 4.0.0 8.0.0 - 8.0.0-beta.24570.5 + 8.0.0-beta.24623.2 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -213,7 +213,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24570.5 + 8.0.0-beta.24623.2 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 0998e875e5f7..dafabdcaef00 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -95,7 +95,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -112,7 +112,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") @@ -124,26 +124,25 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() if(ANDROID) @@ -265,21 +264,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) @@ -288,10 +287,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index a2dedaa5297a..60352ede194e 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -321,7 +321,7 @@ function InstallDotNet([string] $dotnetRoot, $variations += @($installParameters) $dotnetBuilds = $installParameters.Clone() - $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public" + $dotnetbuilds.AzureFeed = "https://ci.dot.net/public" $variations += @($dotnetBuilds) if ($runtimeSourceFeed) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 3392e3a99921..b9b329ce37ff 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -234,7 +234,7 @@ function InstallDotNet { local public_location=("${installParameters[@]}") variations+=(public_location) - local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public") + local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public") variations+=(dotnetbuilds) if [[ -n "${6:-}" ]]; then diff --git a/global.json b/global.json index 6dc38f7387fd..13ffec39d571 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24570.5", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24570.5" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24623.2", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24623.2" } } From 146b211a1392fbe23304d77c3c3e3ebddc6979d8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:49:14 -0800 Subject: [PATCH 25/49] [release/9.0.1xx] Update dependencies from dotnet/razor (#45496) Co-authored-by: dotnet-maestro[bot] Co-authored-by: Jason Zhai --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 78e37c0f2f08..bca60f336263 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -325,22 +325,22 @@ af22effae4069a5dfb9b0735859de48820104f5b - + https://github.com/dotnet/razor - b5256abf658352440e61aa1372bbc0798e9ceb7d + e0c5e5892684a5ce8f4fa0dcc504a0af4c140ac7 - + https://github.com/dotnet/razor - b5256abf658352440e61aa1372bbc0798e9ceb7d + e0c5e5892684a5ce8f4fa0dcc504a0af4c140ac7 - + https://github.com/dotnet/razor - b5256abf658352440e61aa1372bbc0798e9ceb7d + e0c5e5892684a5ce8f4fa0dcc504a0af4c140ac7 - + https://github.com/dotnet/razor - b5256abf658352440e61aa1372bbc0798e9ceb7d + e0c5e5892684a5ce8f4fa0dcc504a0af4c140ac7 diff --git a/eng/Versions.props b/eng/Versions.props index 468755c9bef2..ec8befa5ff0d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -231,9 +231,9 @@ - 9.0.0-preview.24576.1 - 9.0.0-preview.24576.1 - 9.0.0-preview.24576.1 + 9.0.0-preview.24616.4 + 9.0.0-preview.24616.4 + 9.0.0-preview.24616.4 From 1ef4c6421207a8daf38a3088834806f4de400708 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:14:13 -0800 Subject: [PATCH 26/49] [release/8.0.3xx] Update dependencies from dotnet/templating (#45779) Co-authored-by: dotnet-maestro[bot] Co-authored-by: Jason Zhai --- NuGet.config | 1 + eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NuGet.config b/NuGet.config index dbaeb68518e2..f6eafd54eb20 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,6 +27,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dd1ed104d29d..672470149133 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/templating - 1bd9e10367ab7c8fec384f0915fdb5db046e9286 + 857c3d5e574872f4611bd24eb5a56cc95e2fef93 - + https://github.com/dotnet/templating - 1bd9e10367ab7c8fec384f0915fdb5db046e9286 + 857c3d5e574872f4611bd24eb5a56cc95e2fef93 - + https://github.com/dotnet/templating - 1bd9e10367ab7c8fec384f0915fdb5db046e9286 + 857c3d5e574872f4611bd24eb5a56cc95e2fef93 diff --git a/eng/Versions.props b/eng/Versions.props index 7143f580777f..d0573f1ef6fb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -141,13 +141,13 @@ - 8.0.308 + 8.0.309 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.308-servicing.24575.1 + 8.0.309-servicing.25057.7 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 1bc85f99d8b982b729a8f9a923cd0dc6e7bf8cfe Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:17:13 -0800 Subject: [PATCH 27/49] [release/9.0.1xx] Update dependencies from dotnet/roslyn-analyzers (#45646) Co-authored-by: dotnet-maestro[bot] Co-authored-by: Jason Zhai --- eng/Version.Details.xml | 6 +++--- eng/Versions.props | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bca60f336263..951dbfaf2033 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -408,16 +408,16 @@ 63ae81154c50a1cf9287cc47d8351d55b4289e6d - + https://github.com/dotnet/roslyn-analyzers 5bfaf6aea5cf9d1c924d9adc69916eac3be07880 - + https://github.com/dotnet/roslyn-analyzers 5bfaf6aea5cf9d1c924d9adc69916eac3be07880 - + https://github.com/dotnet/roslyn-analyzers 5bfaf6aea5cf9d1c924d9adc69916eac3be07880 diff --git a/eng/Versions.props b/eng/Versions.props index ec8befa5ff0d..20b148f91950 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -158,8 +158,8 @@ - 9.0.0-preview.24605.2 - 3.11.0-beta1.24605.2 + 9.0.0-preview.24629.2 + 3.11.0-beta1.24629.2 From 128554ca187fce4ad323548aebe23ac5f80ea289 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 23:31:40 +0000 Subject: [PATCH 28/49] [release/9.0.1xx] Update dependencies from dotnet/sourcelink (#45397) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 12 ++++++------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 951dbfaf2033..3e3f1b691ce4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -460,34 +460,34 @@ https://github.com/dotnet/deployment-tools 7871ee378dce87b64d930d4f33dca9c888f4034d - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b - + https://github.com/dotnet/sourcelink - 599ca6dd9547cef0c10c1363fade40b044fed3b7 + 4e176206614b345352885b55491aeb51bf77526b diff --git a/eng/Versions.props b/eng/Versions.props index 20b148f91950..51505dc119b6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -277,12 +277,12 @@ - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 - 9.0.0-beta.24603.2 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 + 9.0.0-beta.24617.1 From f57f6c916970ec8bfdf92bbbbc12e6638457e813 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 00:40:41 +0000 Subject: [PATCH 29/49] [release/9.0.1xx] Update dependencies from dotnet/templating (#45784) Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 11 +---------- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/NuGet.config b/NuGet.config index 388c4c6e7424..970ae0774c5e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -17,16 +17,7 @@ - - - - - - - - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3e3f1b691ce4..72edf5a6c311 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,16 +3,16 @@ https://github.com/dotnet/templating - cdb776d3a6988a56a69e9ceb669bf250f51919ee + 5f2c1e54e9c76ad0c1f65888b121a90eab1cc617 - + https://github.com/dotnet/templating - cdb776d3a6988a56a69e9ceb669bf250f51919ee + 5f2c1e54e9c76ad0c1f65888b121a90eab1cc617 - + https://github.com/dotnet/templating - cdb776d3a6988a56a69e9ceb669bf250f51919ee + 5f2c1e54e9c76ad0c1f65888b121a90eab1cc617 diff --git a/eng/Versions.props b/eng/Versions.props index 51505dc119b6..80c7dda1d9dc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -193,7 +193,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 9.0.103-servicing.25057.4 + 9.0.103-servicing.25058.2 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 91365f61af8053d2d641204db5e3ce1e69dde153 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 03:13:00 +0000 Subject: [PATCH 30/49] [release/9.0.1xx] Update dependencies from dotnet/source-build-externals (#45593) Co-authored-by: dotnet-maestro[bot] Co-authored-by: Michael Simons Co-authored-by: Jason Zhai Co-authored-by: Ella Hathaway Co-authored-by: Ella Hathaway <67609881+ellahathaway@users.noreply.github.com> --- Directory.Packages.props | 2 +- eng/Version.Details.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1d941c1212fd..2c6747b65702 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -115,7 +115,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 72edf5a6c311..20db63355572 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -445,9 +445,9 @@ - + https://github.com/dotnet/source-build-externals - ab469606a3e6b026dcac301e2dab96117c94faeb + 884764492bf2cbc8d38037d9eee84f16960daa74 From 45a608af9e52e6cdc1949b65d9f7f2aa08ef952c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 Jan 2025 05:02:07 +0000 Subject: [PATCH 31/49] Update dependencies from https://github.com/dotnet/templating build 20250108.1 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.406-servicing.25057.5 -> To Version 8.0.406-servicing.25058.1 --- NuGet.config | 6 +----- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/NuGet.config b/NuGet.config index 6f47df7f880c..bb72918aa562 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,11 +27,7 @@ - - - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 51b9aab4befc..44fa67a2aaa3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - 7d36300e8f8e564c786fd76a49c4c4e99abf1fb2 + ead9b254a3b43c2d150dfee019fec94a4dff3cdd - + https://github.com/dotnet/templating - 7d36300e8f8e564c786fd76a49c4c4e99abf1fb2 + ead9b254a3b43c2d150dfee019fec94a4dff3cdd - + https://github.com/dotnet/templating - 7d36300e8f8e564c786fd76a49c4c4e99abf1fb2 + ead9b254a3b43c2d150dfee019fec94a4dff3cdd diff --git a/eng/Versions.props b/eng/Versions.props index 0c5cbebb50a1..ca9df0d4a41f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -147,7 +147,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.406-servicing.25057.5 + 8.0.406-servicing.25058.1 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 98842bc5810509d741c5e21271603470002bc9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Thu, 9 Jan 2025 11:54:50 -0800 Subject: [PATCH 32/49] Add -e option to dotnet run (#45795) --- src/Cli/dotnet/CommonLocalizableStrings.resx | 19 +++ src/Cli/dotnet/CommonOptions.cs | 54 +++++++- src/Cli/dotnet/Properties/launchSettings.json | 6 +- src/Cli/dotnet/commands/dotnet-run/Program.cs | 6 +- .../dotnet/commands/dotnet-run/RunCommand.cs | 59 ++++++--- .../commands/dotnet-run/RunCommandParser.cs | 1 + .../dotnet-test/LocalizableStrings.resx | 16 --- .../dotnet/commands/dotnet-test/Program.cs | 36 ++---- .../commands/dotnet-test/TestCommandParser.cs | 8 +- .../dotnet-test/xlf/LocalizableStrings.cs.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.de.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.es.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.fr.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.it.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.ja.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.ko.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.pl.xlf | 30 ----- .../xlf/LocalizableStrings.pt-BR.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.ru.xlf | 30 ----- .../dotnet-test/xlf/LocalizableStrings.tr.xlf | 30 ----- .../xlf/LocalizableStrings.zh-Hans.xlf | 30 ----- .../xlf/LocalizableStrings.zh-Hant.xlf | 30 ----- .../xlf/CommonLocalizableStrings.cs.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.de.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.es.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.fr.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.it.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.ja.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.ko.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.pl.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.pt-BR.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.ru.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.tr.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.zh-Hans.xlf | 35 +++++ .../xlf/CommonLocalizableStrings.zh-Hant.xlf | 35 +++++ .../TestAppWithLaunchSettings/Program.cs | 6 +- .../Properties/launchSettings.json | 10 ++ .../GivenDotnetRunBuildsCsProj.cs | 89 +++++++++++++ .../ParserTests/CommonOptionsTests.cs | 121 ++++++++++++++++++ 39 files changed, 802 insertions(+), 474 deletions(-) create mode 100644 test/dotnet.Tests/ParserTests/CommonOptionsTests.cs diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx index 58c9371ccd01..8d5d2ead804c 100644 --- a/src/Cli/dotnet/CommonLocalizableStrings.resx +++ b/src/Cli/dotnet/CommonLocalizableStrings.resx @@ -698,6 +698,25 @@ setx PATH "%PATH%;{0}" Specifying both the `-r|--runtime` and `-os` options is not supported. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + NAME="VALUE" + + + Incorrectly formatted environment variables: {0} + Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'false.' However, when targeting .NET 7 or lower, the default is 'true' if a runtime identifier is specified. diff --git a/src/Cli/dotnet/CommonOptions.cs b/src/Cli/dotnet/CommonOptions.cs index 95a86ec9984b..f544d89cc38e 100644 --- a/src/Cli/dotnet/CommonOptions.cs +++ b/src/Cli/dotnet/CommonOptions.cs @@ -3,6 +3,7 @@ using System.CommandLine; using System.CommandLine.Completions; +using System.CommandLine.Parsing; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools; using Microsoft.DotNet.Tools.Common; @@ -174,6 +175,52 @@ internal static string ArchOptionValue(ParseResult parseResult) => // Flip the argument so that if this option is specified we get selfcontained=false .SetForwardingFunction((arg, p) => ForwardSelfContainedOptions(!arg, p)); + public static readonly CliOption> EnvOption = new("--environment", "-e") + { + Description = CommonLocalizableStrings.CmdEnvironmentVariableDescription, + HelpName = CommonLocalizableStrings.CmdEnvironmentVariableExpression, + CustomParser = ParseEnvironmentVariables, + // Can't allow multiple arguments because the separator needs to be parsed as part of the environment variable value. + AllowMultipleArgumentsPerToken = false + }; + + private static IReadOnlyDictionary ParseEnvironmentVariables(ArgumentResult argumentResult) + { + var result = new Dictionary( + RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); + + List? invalid = null; + + foreach (var token in argumentResult.Tokens) + { + var separator = token.Value.IndexOf('='); + var (name, value) = (separator >= 0) + ? (token.Value[0..separator], token.Value[(separator + 1)..]) + : (token.Value, ""); + + name = name.Trim(); + + if (name != "") + { + result[name] = value; + } + else + { + invalid ??= []; + invalid.Add(token); + } + } + + if (invalid != null) + { + argumentResult.AddError(string.Format( + CommonLocalizableStrings.IncorrectlyFormattedEnvironmentVariables, + string.Join(", ", invalid.Select(x => $"'{x.Value}'")))); + } + + return result; + } + public static readonly CliOption TestPlatformOption = new("--Platform"); public static readonly CliOption TestFrameworkOption = new("--Framework"); @@ -259,13 +306,6 @@ private static IEnumerable ForwardSelfContainedOptions(bool isSelfContai return selfContainedProperties; } - private static bool UserSpecifiedRidOption(ParseResult parseResult) => - (parseResult.GetResult(RuntimeOption) ?? - parseResult.GetResult(LongFormRuntimeOption) ?? - parseResult.GetResult(ArchitectureOption) ?? - parseResult.GetResult(LongFormArchitectureOption) ?? - parseResult.GetResult(OperatingSystemOption)) is not null; - internal static CliOption AddCompletions(this CliOption option, Func> completionSource) { option.CompletionSources.Add(completionSource); diff --git a/src/Cli/dotnet/Properties/launchSettings.json b/src/Cli/dotnet/Properties/launchSettings.json index 8d0ebf35dc6f..d3e2ca78d63b 100644 --- a/src/Cli/dotnet/Properties/launchSettings.json +++ b/src/Cli/dotnet/Properties/launchSettings.json @@ -1,7 +1,9 @@ { "profiles": { "dotnet": { - "commandName": "Project" + "commandName": "Project", + "commandLineArgs": "run -e MyCoolEnvironmentVariableKey=OverriddenEnvironmentVariableValue", + "workingDirectory": "C:\\sdk5\\artifacts\\tmp\\Debug\\EnvOptionLaun---86C8BD0D" } } -} \ No newline at end of file +} diff --git a/src/Cli/dotnet/commands/dotnet-run/Program.cs b/src/Cli/dotnet/commands/dotnet-run/Program.cs index cefc00ba84b6..1303fee09e2a 100644 --- a/src/Cli/dotnet/commands/dotnet-run/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-run/Program.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Immutable; using System.CommandLine; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.Utils; @@ -61,8 +62,9 @@ public static RunCommand FromParseResult(ParseResult parseResult) noRestore: parseResult.HasOption(RunCommandParser.NoRestoreOption) || parseResult.HasOption(RunCommandParser.NoBuildOption), interactive: parseResult.HasOption(RunCommandParser.InteractiveOption), verbosity: parseResult.HasOption(CommonOptions.VerbosityOption) ? parseResult.GetValue(CommonOptions.VerbosityOption) : null, - restoreArgs: restoreArgs.ToArray(), - args: nonBinLogArgs.ToArray() + restoreArgs: [.. restoreArgs], + args: [.. nonBinLogArgs], + environmentVariables: parseResult.GetValue(CommonOptions.EnvOption) ?? ImmutableDictionary.Empty ); return command; diff --git a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs index 9f3d8e728201..bda6db65988c 100644 --- a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs @@ -28,6 +28,11 @@ private record RunProperties(string? RunCommand, string? RunArguments, string? R public bool Interactive { get; private set; } public string[] RestoreArgs { get; private set; } + /// + /// Environment variables specified on command line via -e option. + /// + public IReadOnlyDictionary EnvironmentVariables { get; private set; } + private bool ShouldBuild => !NoBuild; public string LaunchProfile { get; private set; } @@ -43,7 +48,8 @@ public RunCommand( bool interactive, VerbosityOptions? verbosity, string[] restoreArgs, - string[] args) + string[] args, + IReadOnlyDictionary environmentVariables) { NoBuild = noBuild; ProjectFileFullPath = DiscoverProjectFilePath(projectFileOrDirectory); @@ -54,6 +60,7 @@ public RunCommand( NoRestore = noRestore; Verbosity = verbosity; RestoreArgs = GetRestoreArguments(restoreArgs); + EnvironmentVariables = environmentVariables; } public int Execute() @@ -76,10 +83,18 @@ public int Execute() try { ICommand targetCommand = GetTargetCommand(); - var launchSettingsCommand = ApplyLaunchSettingsProfileToCommand(targetCommand, launchSettings); + ApplyLaunchSettingsProfileToCommand(targetCommand, launchSettings); + + // Env variables specified on command line override those specified in launch profile: + foreach (var (name, value) in EnvironmentVariables) + { + targetCommand.EnvironmentVariable(name, value); + } + // Ignore Ctrl-C for the remainder of the command's execution Console.CancelKeyPress += (sender, e) => { e.Cancel = true; }; - return launchSettingsCommand.Execute().ExitCode; + + return targetCommand.Execute().ExitCode; } catch (InvalidProjectFileException e) { @@ -89,29 +104,31 @@ public int Execute() } } - private ICommand ApplyLaunchSettingsProfileToCommand(ICommand targetCommand, ProjectLaunchSettingsModel? launchSettings) + private void ApplyLaunchSettingsProfileToCommand(ICommand targetCommand, ProjectLaunchSettingsModel? launchSettings) { - if (launchSettings != null) + if (launchSettings == null) { - if (!string.IsNullOrEmpty(launchSettings.ApplicationUrl)) - { - targetCommand.EnvironmentVariable("ASPNETCORE_URLS", launchSettings.ApplicationUrl); - } + return; + } - targetCommand.EnvironmentVariable("DOTNET_LAUNCH_PROFILE", launchSettings.LaunchProfileName); + if (!string.IsNullOrEmpty(launchSettings.ApplicationUrl)) + { + targetCommand.EnvironmentVariable("ASPNETCORE_URLS", launchSettings.ApplicationUrl); + } - foreach (var entry in launchSettings.EnvironmentVariables) - { - string value = Environment.ExpandEnvironmentVariables(entry.Value); - //NOTE: MSBuild variables are not expanded like they are in VS - targetCommand.EnvironmentVariable(entry.Key, value); - } - if (string.IsNullOrEmpty(targetCommand.CommandArgs) && launchSettings.CommandLineArgs != null) - { - targetCommand.SetCommandArgs(launchSettings.CommandLineArgs); - } + targetCommand.EnvironmentVariable("DOTNET_LAUNCH_PROFILE", launchSettings.LaunchProfileName); + + foreach (var entry in launchSettings.EnvironmentVariables) + { + string value = Environment.ExpandEnvironmentVariables(entry.Value); + //NOTE: MSBuild variables are not expanded like they are in VS + targetCommand.EnvironmentVariable(entry.Key, value); + } + + if (string.IsNullOrEmpty(targetCommand.CommandArgs) && launchSettings.CommandLineArgs != null) + { + targetCommand.SetCommandArgs(launchSettings.CommandLineArgs); } - return targetCommand; } private bool TryGetLaunchProfileSettingsIfNeeded(out ProjectLaunchSettingsModel? launchSettingsModel) diff --git a/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs b/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs index f2fff28a7e69..2ced3abe2636 100644 --- a/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs @@ -81,6 +81,7 @@ private static CliCommand ConstructCommand() command.Options.Add(CommonOptions.OperatingSystemOption); command.Options.Add(CommonOptions.DisableBuildServersOption); command.Options.Add(CommonOptions.ArtifactsPathOption); + command.Options.Add(CommonOptions.EnvOption); command.Arguments.Add(ApplicationArguments); diff --git a/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx index d703a097fcb3..7d300ed86891 100644 --- a/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx @@ -269,22 +269,6 @@ For MSTest before 2.2.4, the timeout is used for all testcases. TIMESPAN - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - NAME="VALUE" - No serializer registered with ID '{0}' diff --git a/src/Cli/dotnet/commands/dotnet-test/Program.cs b/src/Cli/dotnet/commands/dotnet-test/Program.cs index ec586616a4e1..6714489eae66 100644 --- a/src/Cli/dotnet/commands/dotnet-test/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-test/Program.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Immutable; using System.CommandLine; using System.Runtime.Versioning; using System.Text.RegularExpressions; @@ -228,8 +229,14 @@ private static TestCommand FromParseResult(ParseResult result, string[] settings noRestore, msbuildPath); - // Apply environment variables provided by the user via --environment (-e) parameter, if present - SetEnvironmentVariablesFromParameters(testCommand, result); + // Apply environment variables provided by the user via --environment (-e) option, if present + if (result.GetValue(CommonOptions.EnvOption) is { } environmentVariables) + { + foreach (var (name, value) in environmentVariables) + { + testCommand.EnvironmentVariable(name, value); + } + } // Set DOTNET_PATH if it isn't already set in the environment as it is required // by the testhost which uses the apphost feature (Windows only). @@ -303,31 +310,6 @@ private static bool ContainsBuiltTestSources(string[] args) return false; } - private static void SetEnvironmentVariablesFromParameters(TestCommand testCommand, ParseResult parseResult) - { - CliOption> option = TestCommandParser.EnvOption; - - if (parseResult.GetResult(option) is null) - { - return; - } - - foreach (string env in parseResult.GetValue(option)) - { - string name = env; - string value = string.Empty; - - int equalsIndex = env.IndexOf('='); - if (equalsIndex > 0) - { - name = env.Substring(0, equalsIndex); - value = env.Substring(equalsIndex + 1); - } - - testCommand.EnvironmentVariable(name, value); - } - } - /// A case-insensitive dictionary of any properties passed from the user and their values. private static Dictionary GetUserSpecifiedExplicitMSBuildProperties(ParseResult parseResult) { diff --git a/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs b/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs index b6264e2582b0..c4b4bf145bf5 100644 --- a/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs @@ -32,12 +32,6 @@ internal static class TestCommandParser Description = LocalizableStrings.CmdListTestsDescription }.ForwardAs("-property:VSTestListTests=true"); - public static readonly CliOption> EnvOption = new CliOption>("--environment", "-e") - { - Description = LocalizableStrings.CmdEnvironmentVariableDescription, - HelpName = LocalizableStrings.CmdEnvironmentVariableExpression - }.AllowSingleArgPerToken(); - public static readonly CliOption FilterOption = new ForwardedOption("--filter") { Description = LocalizableStrings.CmdTestCaseFilterDescription, @@ -219,7 +213,7 @@ private static CliCommand GetVSTestCliCommand() command.Options.Add(SettingsOption); command.Options.Add(ListTestsOption); - command.Options.Add(EnvOption); + command.Options.Add(CommonOptions.EnvOption); command.Options.Add(FilterOption); command.Options.Add(AdapterOption); command.Options.Add(LoggerOption); diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf index 7786374f36d4..49fb4b7758a2 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf @@ -73,36 +73,6 @@ Při použití společně s testy řízenými daty závisí chování časového Pro MSTest před 2.2.4 se časový limit použije pro všechny testovací případy. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Nastaví hodnotu proměnné prostředí. -Pokud proměnná neexistuje, vytvoří ji, a pokud existuje, přepíše ji. -Tímto se vynutí spuštění testů v izolovaném procesu. -Tento argument je možné zadat vícekrát a určit tak více proměnných. - -Příklady: --e PROMĚNNÁ=abc --e PROMĚNNÁ="hodnota s mezerami" --e PROMĚNNÁ="hodnota;oddělená;pomocí;středníků" --e PROM1=abc -e PROM2=def -e PROM3=ghi - - - - - NAME="VALUE" - NÁZEV="HODNOTA" - - The max number of test modules that can run in parallel. Maximální počet testovacích modulů, které je možné spustit paralelně. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf index 6ff3a7f8c4c3..bd58a62eb9f4 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf @@ -73,36 +73,6 @@ Wenn dies zusammen mit datengesteuerten Tests verwendet wird, hängt das Timeout für MSTest vor 2.2.4 wird das Timeout für alle Testfälle verwendet. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Legt den Wert einer Umgebungsvariablen fest. -Erstellt die Variable, wenn Sie nicht vorhanden ist, und setzt sie andernfalls außer Kraft. -Dadurch wird die Ausführung der Tests in einem isolierten Prozess erzwungen. -Dieses Argument kann mehrmals angegeben werden, um mehrere Variablen bereitzustellen. - -Beispiele: --e VARIABLE=abc --e VARIABLE="wert mit leerzeichen" --e VARIABLE="wert;getrennt durch;semikolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="WERT" - - The max number of test modules that can run in parallel. Die maximale Anzahl von Testmodulen, die parallel ausgeführt werden können. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf index 4fd2a3f723fd..5b343fe2d1b2 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf @@ -75,36 +75,6 @@ Cuando se usa junto con pruebas controladas por datos, el comportamiento del tie Para MSTest antes de 2.2.4, el tiempo de espera se usa para todos los casos de prueba. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Establece el valor de una variable de entorno. -Crea la variable si no existe o la reemplaza en caso de que exista. -Esto forzará la ejecución de las pruebas en un proceso aislado. -Este argumento se puede especificar varias veces para proporcionar múltiples variables. - -Ejemplos: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. Número máximo de módulos de prueba que se pueden ejecutar en paralelo. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf index e466088a26a5..50c9ad4c8711 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf @@ -73,36 +73,6 @@ Lorsqu’elle est utilisée avec des tests pilotés par les données, le comport Pour MSTest avant la version 2.2.4, le délai d’expiration est utilisé pour tous les cas de test. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Définit la valeur d'une variable d'environnement. -Crée la variable si elle n'existe pas, et la remplace si elle existe. -Cela entraîne l'exécution forcée des tests dans un processus isolé. -Vous pouvez spécifier cet argument plusieurs fois pour fournir plusieurs variables. - -Exemples : --e VARIABLE=abc --e VARIABLE="valeur avec des espaces" --e VARIABLE="valeur;séparée;par;des;points;virgules" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. Nombre maximal de modules de test qui peuvent s’exécuter en parallèle. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf index b2ca5fb41c2b..68bb1efa213b 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf @@ -73,36 +73,6 @@ Se viene usato insieme a test basati sui dati, il comportamento di timeout dipen Per MSTest prima di 2.2.4, il timeout viene usato per tutti i test case. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Imposta il valore di una variabile di ambiente. -Crea la variabile se non esiste e la sostituisce se esiste. -In questo modo forza l'esecuzione dei test in un processo isolato. -È possibile specificare più volte questo argomento per fornire più variabili. - -Esempi: --e VARIABLE=abc --e VARIABLE="valore con spazi" --e VARIABLE="valore;delimitato da;punti e virgola" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALORE" - - The max number of test modules that can run in parallel. Numero massimo di moduli di test che possono essere eseguiti in parallelo. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf index 67eadb7cfc21..9a9a3dc83ec9 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf @@ -73,36 +73,6 @@ For MSTest before 2.2.4, the timeout is used for all testcases. MSTest 2.2.4 以前の場合、タイムアウトはすべてのテスト ケースに使用されます。 - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - 環境変数の値を設定します。 -変数が存在しない場合は作成され、存在する場合はオーバーライドされます。 -これにより、テストは強制的に分離プロセスで実行されます。 -この引数は、複数の変数を指定するために複数回指定できます。 - -例: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. 並列で実行できるテスト モジュールの最大数。 diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf index 1df62828ad31..91eced359afa 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf @@ -73,36 +73,6 @@ For MSTest before 2.2.4, the timeout is used for all testcases. 2.2.4 이전 MSTest의 경우 모든 테스트 사례에 시간 제한이 사용됩니다. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - 환경 변수의 값을 설정합니다. -변수가 없는 경우 변수를 만들고, 변수가 있으면 재정의합니다. -이는 테스트가 격리된 프로세스에서 강제로 실행되도록 합니다. -이 인수를 여러 번 지정하여 여러 변수를 제공할 수 있습니다. - -예: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. 병렬로 실행할 수 있는 최대 테스트 모듈 수입니다. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf index 0c49d9fc89d7..aecba6eaaaca 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf @@ -73,36 +73,6 @@ W przypadku użycia razem z testami opartymi na danych zachowanie limitu czasu z W przypadku platformy MSTest przed wersją 2.2.4 limit czasu jest używany dla wszystkich przypadków testowych. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Ustawia wartość zmiennej środowiskowej. -Jeśli zmienna nie istnieje, tworzy ją, a jeśli istnieje, przesłania. -Wymusi to uruchamianie testów w izolowanym procesie. -Ten argument można określić wiele razy w celu podania wielu wartości. - -Przykłady: --e ZMIENNA=abc --e ZMIENNA="wartość ze spacjami" --e ZMIENNA="wartości;rozdzielone;średnikami" --e ZM1=abc -e ZM2=def -e ZM3=ghi - - - - - NAME="VALUE" - NAZWA="WARTOŚĆ" - - The max number of test modules that can run in parallel. Maksymalna liczba modułów testowych, które mogą być uruchamiane równolegle. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf index af11cc446d53..0a429e0c2a4f 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf @@ -73,36 +73,6 @@ Quando usado junto com testes controlados por dados, o comportamento do tempo li Para MSTest antes de 2.2.4, o tempo limite é usado para todos os casos de teste. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Define o valor de uma variável de ambiente. -Criará a variável quando ela não existir e a substituirá quando existir. -Isso forçará a execução dos testes em um processo isolado. -Esse argumento pode ser especificado várias vezes para fornecer várias variáveis. - -Exemplos: --e VARIABLE=abc --e VARIABLE="valor com espaços" --e VARIABLE="valor;separado com;ponto e vírgula" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. O número máximo de módulos de teste que podem ser executados em paralelo. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf index 25f754990606..7a0a54f4f894 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf @@ -73,36 +73,6 @@ For MSTest before 2.2.4, the timeout is used for all testcases. Для MSTest версии ниже 2.2.4 время ожидания подсчитывается суммарно для всех тестовых случаев. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Устанавливает значение переменной среды. -Если переменной среды не существует, она создается. Если переменная среды существует, она переопределяется. -Этот аргумент подразумевает принудительное выполнение тестов в изолированном процессе. -Этот аргумент может быть указан несколько раз для нескольких переменных среды. - -Примеры: --e VARIABLE=abc --e VARIABLE="значение с пробелами" --e VARIABLE="значение;разделенное;точками;с;запятыми" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. Максимальное число тестовых модулей, которые могут выполняться параллельно. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf index 5b2d6314b6d1..c6a839e94593 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf @@ -73,36 +73,6 @@ Zaman aşımı davranışı veri tabanlı testlerle birlikte kullanıldığında 2.2.4’ten önceki MSTest sürümleri için zaman aşımı süresi tüm test çalışmalarına yönelik olarak kullanılır. - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - Bir ortam değişkeninin değerini ayarlar. -Değişken yoksa oluşturur, varsa değişkeni geçersiz kılar. -Bu, testleri yalıtılmış bir işlemde çalıştırılmaya zorlar. -Bu bağımsız değişken, birden çok değişken sağlamak için birden çok kez belirtilebilir. - -Örnek: --e DEĞİŞKEN=abc --e DEĞİŞKEN="boşluk içeren değerler" --e DEĞİŞKEN="noktalı virgülle;ayrılmış;değerler" --e DEĞ1=abc -e DEĞ2=def -e DEĞ3=ghi - - - - - NAME="VALUE" - AD="DEĞER" - - The max number of test modules that can run in parallel. Paralel olarak çalıştırılabilecek test modüllerinin maksimum sayısı. diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf index 241c4dd04575..069696f3ebe8 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf @@ -73,36 +73,6 @@ For MSTest before 2.2.4, the timeout is used for all testcases. 对于 2.2.4 之前的 MSTest,超时用于所有测试用例。 - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - 设置环境变量的值。 -如果该变量不存在,则创建它;如果它已存在,则替代它。 -这将在隔离的进程中强制运行测试。 -可多次指定此参数来提供多个变量。 - -示例: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. 可并行运行的测试模块的最大数目。 diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf index db52e9b6341f..679a2e4e40ce 100644 --- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf @@ -73,36 +73,6 @@ For MSTest before 2.2.4, the timeout is used for all testcases. 對於 MSTest 2.2.4 之前的版本,該逾時會用於所有測試案例。 - - Sets the value of an environment variable. -Creates the variable if it does not exist, overrides if it does. -This will force the tests to be run in an isolated process. -This argument can be specified multiple times to provide multiple variables. - -Examples: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - 設定環境變數的值。 -若變數不存在,則加以建立; 若有,則予以覆寫。 -這會強制在隔離流程中執行測試。 -此引數可多次指定,以提供多項變數。 - -範例: --e VARIABLE=abc --e VARIABLE="value with spaces" --e VARIABLE="value;seperated with;semicolons" --e VAR1=abc -e VAR2=def -e VAR3=ghi - - - - - NAME="VALUE" - NAME="VALUE" - - The max number of test modules that can run in parallel. 可平行執行的測試模組數目上限。 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index 8ae7960c4016..9a9f1c215322 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -37,6 +37,36 @@ Zadání možností -r|--runtime a -os zároveň se nepodporuje. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Umožňuje, aby se příkaz zastavil a počkal na vstup nebo akci uživatele (například na dokončení ověření). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Publikujte svoji aplikaci jako aplikaci závislou na architektuře. Aby bylo možné vaši aplikaci spustit, musí být na cílovém počítači nainstalovaný kompatibilní modul runtime .NET. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: Možnosti rozhraní příkazového řádku .NET: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index e8aed6ea1205..e9fad16f7e6b 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -37,6 +37,36 @@ Das gleichzeitige Angeben der Optionen „-r|--runtime“ und „-os“ wird nicht unterstützt. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Hiermit wird zugelassen, dass der Befehl anhält und auf eine Benutzereingabe oder Aktion wartet (beispielsweise auf den Abschluss der Authentifizierung). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Veröffentlichen Sie Ihre Anwendung als eine von einem Framework abhängige Anwendung. Eine kompatible .NET-Runtime muss auf dem Zielcomputer installiert sein, um Ihre Anwendung ausführen zu können. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: .NET-Cli-Optionen: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index d0456889ad38..279a91ccc44a 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -37,6 +37,36 @@ No se admite la especificación de las opciones '-r|--runtime' y '-os'. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Permite que el comando se detenga y espere la entrada o acción del usuario (por ejemplo, para autenticarse). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Publique la aplicación como una aplicación dependiente del marco de trabajo. para ejecutar la aplicación debe instalarse un entorno de ejecución de .NET compatible en el equipo de destino. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: Opciones de la CLI de .NET: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index da5f2b48c79d..36f8a6b8f18f 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -37,6 +37,36 @@ La spécification des options « -r |--Runtime » et « os » n’est pas prise en charge. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Permet à la commande de s'arrêter et d'attendre une entrée ou une action de l'utilisateur (par exemple pour effectuer une authentification). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Publiez votre application en tant qu'application dépendante du framework. Un runtime .NET compatible doit être installé sur la machine cible pour exécuter votre application. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: Options Cli .NET : diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index 84b8e63f7b0d..a80f08fdc20a 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -37,6 +37,36 @@ La specifica di entrambe le opzioni `-r|--runtime` e `-os` non è supportata. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Consente al comando di arrestare l'esecuzione e attendere l'input o l'azione dell'utente, ad esempio per completare l'autenticazione. @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Pubblicare l'applicazione come applicazione dipendente dal framework. Per eseguire l'applicazione, è necessario installare un runtime .NET compatibile nel computer di destinazione. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: Opzioni dell'interfaccia della riga di comando di .NET: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index 955e9cfc91e8..69b70f679ce9 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -37,6 +37,36 @@ `-r|--runtime` および `-os` オプションの両方を指定することはサポートされていません。 + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). コマンドを停止して、ユーザーの入力またはアクション (認証の完了など) を待機できるようにします。 @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" アプリケーションをフレームワーク依存アプリケーションとして公開します。アプリケーションを実行するには、対象のコンピューターで互換性のある .NET ランタイムをインストールする必要があります。 + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: .NET CLI オプション: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index d26185296366..abb2f8f6c9b9 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -37,6 +37,36 @@ `-r|--runtime` 및 `-os` 옵션을 모두 지정하는 것은 지원되지 않습니다. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). 명령을 중지하고 사용자 입력 또는 작업을 기다리도록 허용합니다(예: 인증 완료). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" 애플리케이션을 프레임워크 종속 애플리케이션으로 게시합니다. 애플리케이션을 실행하려면 호환되는 .NET 런타임이 대상 시스템에 설치되어 있어야 합니다. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: .NET Cli 옵션: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index 091c83288270..291db331b394 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -37,6 +37,36 @@ Określanie opcji „-r|--runtime” i „-os” nie jest obsługiwane. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Zezwala poleceniu na zatrzymanie działania i zaczekanie na wprowadzenie danych lub wykonanie akcji przez użytkownika (na przykład ukończenie uwierzytelniania). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Opublikuj aplikację jako aplikację zależną od frameworku. Aby można było uruchomić aplikację, na maszynie docelowej musi być zainstalowane zgodne środowisko uruchomieniowe platformy .NET. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: Opcje interfejsu wiersza polecenia platformy .NET: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 2a82fe3a1562..9efdb6cdf38f 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -37,6 +37,36 @@ Não há suporte para especificar as opções '-r |--runtime ' e '-a |--os '. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Permite que o comando seja interrompido e aguarde a ação ou entrada do usuário (por exemplo, para concluir a autenticação). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Publique o seu aplicativo como um aplicativo dependente de estrutura. Um runtime do .NET compatível precisa ser instalado no computador de destino para executar o aplicativo. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: Opções da CLI do .NET: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index 30524ccfe60c..ce02c20523f4 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -37,6 +37,36 @@ Указание параметров "-r|--runtime" и "-os" не поддерживается. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Позволяет остановить команду и ожидать ввода или действия пользователя (например, для проверки подлинности). @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Опубликуйте приложение как зависимое от платформы. Для запуска приложения на целевом компьютере должна быть установлена совместимая среда выполнения .NET. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: Параметры CLI .NET: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 2cd50917f9fc..7d2c4dfe4c98 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -37,6 +37,36 @@ Hem `-r|--runtime` hem de `-os` seçeneğinin belirtilmesi desteklenmiyor. + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). Komutun durup kullanıcı girişini veya eylemini (örneğin, kimlik doğrulamasının tamamlanmasını) beklemesine izin verir . @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" Uygulamanızı çerçeveye bağımlı bir uygulama olarak yayımlayın. Uygulamanızı çalıştırmak için hedef makineye uyumlu bir .NET çalışma zamanı yüklenmelidir. + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: .NET Cli Seçenekleri: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 2345a2ae6ecd..20f32c494410 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -37,6 +37,36 @@ 不支持同时指定“-r |--runtime”和“-os”选项。 + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). 允许命令停止和等待用户输入或操作(例如,用以完成身份验证)。 @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" 将应用程序发布为依赖框架的应用程序。目标计算机上必须安装兼容的 .NET 运行时才能运行该应用程序。 + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: .NET Cli 选项: diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index aff0bb272f7f..4fa145a3a438 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -37,6 +37,36 @@ 不支援同時指定 `-r|--runtime` 與 `-os` 選項。 + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + Sets the value of an environment variable. +Creates the variable if it does not exist, overrides if it does. +This will force the tests to be run in an isolated process. +This argument can be specified multiple times to provide multiple variables. + +Examples: +-e VARIABLE=abc +-e VARIABLE="value with spaces" +-e VARIABLE="value;seperated with;semicolons" +-e VAR1=abc -e VAR2=def -e VAR3=ghi + + + + + NAME="VALUE" + NAME="VALUE" + + Allows the command to stop and wait for user input or action (for example to complete authentication). 允許命令停止並等候使用者輸入或動作 (例如: 完成驗證)。 @@ -130,6 +160,11 @@ export PATH="$PATH:{0}" 將您的應用程式發佈為架構相依的應用程式。必須在目標機器上安裝相容的 .NET 執行階段,才能執行您的應用程式。 + + Incorrectly formatted environment variables: {0} + Incorrectly formatted environment variables: {0} + + .NET Cli Options: .NET CLI 選項: diff --git a/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Program.cs b/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Program.cs index 644ce5b625be..d4e4e9f13458 100644 --- a/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Program.cs +++ b/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Program.cs @@ -10,8 +10,10 @@ public class Program public static void Main(string[] args) { Console.WriteLine("Hello world"); - Console.WriteLine($"MyCoolEnvironmentVariableKey={Environment.GetEnvironmentVariable("MyCoolEnvironmentVariableKey")}"); - Console.WriteLine($"DOTNET_LAUNCH_PROFILE={Environment.GetEnvironmentVariable("DOTNET_LAUNCH_PROFILE")}"); + Console.WriteLine($"env: MyCoolEnvironmentVariableKey={Environment.GetEnvironmentVariable("MyCoolEnvironmentVariableKey")}"); + Console.WriteLine($"env: DOTNET_LAUNCH_PROFILE={Environment.GetEnvironmentVariable("DOTNET_LAUNCH_PROFILE")}"); + Console.WriteLine($"env: ASPNETCORE_URLS={Environment.GetEnvironmentVariable("ASPNETCORE_URLS")}"); + Console.WriteLine($"env: Configuration={Environment.GetEnvironmentVariable("Configuration")}"); if (args.Length > 0) { Console.WriteLine(args[0]); diff --git a/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json b/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json index 5ac0ee3cff41..3b6883ccd6c6 100644 --- a/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json +++ b/test/TestAssets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json @@ -3,10 +3,20 @@ "TestAppWithLaunchSettings": { "commandName": "Project", "dotnetRunMessages": "true", + "applicationUrl": "http://localhost:5000", "commandLineArgs": "TestAppCommandLineArguments SecondTestAppCommandLineArguments", "environmentVariables": { "MyCoolEnvironmentVariableKey": "MyCoolEnvironmentVariableValue" } + }, + "Profile2": { + "commandName": "Project", + "dotnetRunMessages": "true", + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "DOTNET_LAUNCH_PROFILE": "XYZ", + "ASPNETCORE_URLS": "XYZ" + } } } } \ No newline at end of file diff --git a/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs b/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs index d083626b91ab..8b0d11e0b98f 100644 --- a/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs +++ b/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs @@ -833,6 +833,26 @@ public void ItIncludesEnvironmentVariablesSpecifiedInLaunchSettings() .HaveStdOutContaining(expectedValue); } + [Fact] + public void EnvVariablesSpecifiedInLaunchProfileOverrideImplicitlySetVariables() + { + var testAppName = "TestAppWithLaunchSettings"; + var testInstance = _testAssetsManager.CopyTestAsset(testAppName) + .WithSource(); + + // Profile2 defines env variable DOTNET_LAUNCH_PROFILE=XYZ and ASPNETCORE_URLS=XYZ + + new DotnetCommand(Log, "run", "-lp", "Profile2") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining("env: DOTNET_LAUNCH_PROFILE=XYZ") + .And + .HaveStdOutContaining("env: ASPNETCORE_URLS=XYZ"); + } + [Fact] public void ItIncludesCommandArgumentsSpecifiedInLaunchSettings() { @@ -872,5 +892,74 @@ public void ItCLIArgsOverrideCommandArgumentsSpecifiedInLaunchSettings() .And .NotHaveStdOutContaining(secondExpectedValue); } + + [Fact] + public void ItIncludesApplicationUrlSpecifiedInLaunchSettings() + { + var testInstance = _testAssetsManager.CopyTestAsset("TestAppWithLaunchSettings") + .WithSource(); + + new DotnetCommand(Log, "run") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining("env: ASPNETCORE_URLS=http://localhost:5000"); + } + + [Theory] + [InlineData("-e")] + [InlineData("--environment")] + public void EnvOptionOverridesCommandArgumentsSpecifiedInLaunchSettings(string optionName) + { + var testInstance = _testAssetsManager.CopyTestAsset("TestAppWithLaunchSettings") + .WithSource(); + + new DotnetCommand(Log, "run", optionName, "MyCoolEnvironmentVariableKey=OverriddenEnvironmentVariableValue") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining("env: MyCoolEnvironmentVariableKey=OverriddenEnvironmentVariableValue"); + } + + [Fact] + public void EnvOptionOverridesImplicitlySetVariables() + { + var testInstance = _testAssetsManager.CopyTestAsset("TestAppWithLaunchSettings") + .WithSource(); + + // + var dotnetLaunchProfile = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) + ? "DOTNET_LAUNCH_profile" + : "DOTNET_LAUNCH_PROFILE"; + + new DotnetCommand(Log, "run", "-e", $"{dotnetLaunchProfile}=1", "-e", "ASPNETCORE_URLS=2") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining("env: DOTNET_LAUNCH_PROFILE=1") + .And + .HaveStdOutContaining("env: ASPNETCORE_URLS=2"); + } + + [Fact] + public void EnvOptionNotAppliedToBuild() + { + var testInstance = _testAssetsManager.CopyTestAsset("TestAppWithLaunchSettings") + .WithSource(); + + new DotnetCommand(Log, "run", "-e", "Configuration=XYZ") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining("env: Configuration=XYZ"); + } } } diff --git a/test/dotnet.Tests/ParserTests/CommonOptionsTests.cs b/test/dotnet.Tests/ParserTests/CommonOptionsTests.cs new file mode 100644 index 000000000000..eff7a49b0bf4 --- /dev/null +++ b/test/dotnet.Tests/ParserTests/CommonOptionsTests.cs @@ -0,0 +1,121 @@ +// 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.Cli; +using Microsoft.DotNet.Tools; + +namespace Microsoft.DotNet.Tests.ParserTests; + +public class CommonOptionsTests +{ + [Fact] + public void Duplicates() + { + var command = new CliRootCommand(); + command.Options.Add(CommonOptions.EnvOption); + + var result = command.Parse(["-e", "A=1", "-e", "A=2"]); + + result.GetValue(CommonOptions.EnvOption) + .Should() + .BeEquivalentTo(new Dictionary { ["A"] = "2" }); + + result.Errors.Should().BeEmpty(); + } + + [Fact] + public void Duplicates_CasingDifference() + { + var command = new CliRootCommand(); + command.Options.Add(CommonOptions.EnvOption); + + var result = command.Parse(["-e", "A=1", "-e", "a=2"]); + + var expected = new Dictionary(); + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + expected.Add("A", "2"); + } + else + { + expected.Add("A", "1"); + expected.Add("a", "2"); + } + + result.GetValue(CommonOptions.EnvOption) + .Should() + .BeEquivalentTo(expected); + + result.Errors.Should().BeEmpty(); + } + + [Fact] + public void MultiplePerToken() + { + var command = new CliRootCommand(); + command.Options.Add(CommonOptions.EnvOption); + + var result = command.Parse(["-e", "A=1;B=2,C=3 D=4", "-e", "B==Y=", "-e", "C;=;"]); + + result.GetValue(CommonOptions.EnvOption) + .Should() + .BeEquivalentTo(new Dictionary + { + ["A"] = "1;B=2,C=3 D=4", + ["B"] = "=Y=", + ["C;"] = ";" + }); + + result.Errors.Should().BeEmpty(); + } + + [Fact] + public void NoValue() + { + var command = new CliRootCommand(); + command.Options.Add(CommonOptions.EnvOption); + + var result = command.Parse(["-e", "A"]); + + result.GetValue(CommonOptions.EnvOption) + .Should() + .BeEquivalentTo(new Dictionary { ["A"] = "" }); + + result.Errors.Should().BeEmpty(); + } + + [Fact] + public void WhitespaceTrimming() + { + var command = new CliRootCommand(); + command.Options.Add(CommonOptions.EnvOption); + + var result = command.Parse(["-e", " A \t\n\r\u2002 = X Y \t\n\r\u2002"]); + + result.GetValue(CommonOptions.EnvOption) + .Should() + .BeEquivalentTo(new Dictionary { ["A"] = " X Y \t\n\r\u2002" }); + + result.Errors.Should().BeEmpty(); + } + + [Theory] + [InlineData("")] + [InlineData("=")] + [InlineData("= X")] + [InlineData(" \u2002 = X")] + public void Errors(string token) + { + var command = new CliRootCommand(); + command.Options.Add(CommonOptions.EnvOption); + + var result = command.Parse(["-e", token]); + + result.Errors.Select(e => e.Message).Should().BeEquivalentTo( + [ + string.Format(CommonLocalizableStrings.IncorrectlyFormattedEnvironmentVariables, $"'{token}'") + ]); + } +} From 0c58854291ceeb2266464ac4636a8c637e5bc236 Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:25:54 -0800 Subject: [PATCH 33/49] Support package@version syntax for dotnet workload search/update/install version Fixes #42367 (#45156) Fixes #42367 Using dotnet workload search version, you should now be able to provide package@version as an argument, and it will find the highest-valued workload version that has that package at that version. Sample when no such workload version was found: image When 3 were found: image (Note that the other two were 9.0.200.1 and 9.0.200, so this is the highest version number.) There are three total uses of dotnet workload search version that previously existed: Without any argument, it lists out the most recent SDKs (in the current feature band): dotnet workload search version --format json image When provided with a workload version, it lists out all the workloads in that workload version: dotnet workload search version 9.0.201 image (Note that this was a manually created 9.0.201 version, so those versions do not align with a real one.) And as mentioned earlier, when one or more workloads along with versions (concatenated with '@'), it finds a workload version that includes all of the provided workloads at the associated versions. dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 image This PR also dramatically changes the help text either when you use dotnet workload search version -? or when you mistype a command. It now looks like this: image --- src/Cli/dotnet/CommonLocalizableStrings.resx | 4 + .../NuGetPackageDownloader.cs | 3 +- src/Cli/dotnet/Parser.cs | 2 + .../commands/InstallingWorkloadCommand.cs | 52 +++++-- .../dotnet-workload/install/IInstaller.cs | 2 + .../install/LocalizableStrings.resx | 8 +- .../install/NetSdkMsiInstallerClient.cs | 5 + .../install/WorkloadInstallCommand.cs | 19 ++- .../install/xlf/LocalizableStrings.cs.xlf | 13 +- .../install/xlf/LocalizableStrings.de.xlf | 13 +- .../install/xlf/LocalizableStrings.es.xlf | 13 +- .../install/xlf/LocalizableStrings.fr.xlf | 13 +- .../install/xlf/LocalizableStrings.it.xlf | 13 +- .../install/xlf/LocalizableStrings.ja.xlf | 13 +- .../install/xlf/LocalizableStrings.ko.xlf | 13 +- .../install/xlf/LocalizableStrings.pl.xlf | 13 +- .../install/xlf/LocalizableStrings.pt-BR.xlf | 13 +- .../install/xlf/LocalizableStrings.ru.xlf | 13 +- .../install/xlf/LocalizableStrings.tr.xlf | 13 +- .../xlf/LocalizableStrings.zh-Hans.xlf | 13 +- .../xlf/LocalizableStrings.zh-Hant.xlf | 13 +- .../search/LocalizableStrings.resx | 36 ++++- .../search/WorkloadSearchVersionsCommand.cs | 132 ++++++++++++++---- .../WorkloadSearchVersionsCommandParser.cs | 8 +- .../search/xlf/LocalizableStrings.cs.xlf | 40 +++++- .../search/xlf/LocalizableStrings.de.xlf | 40 +++++- .../search/xlf/LocalizableStrings.es.xlf | 40 +++++- .../search/xlf/LocalizableStrings.fr.xlf | 40 +++++- .../search/xlf/LocalizableStrings.it.xlf | 40 +++++- .../search/xlf/LocalizableStrings.ja.xlf | 40 +++++- .../search/xlf/LocalizableStrings.ko.xlf | 40 +++++- .../search/xlf/LocalizableStrings.pl.xlf | 40 +++++- .../search/xlf/LocalizableStrings.pt-BR.xlf | 40 +++++- .../search/xlf/LocalizableStrings.ru.xlf | 40 +++++- .../search/xlf/LocalizableStrings.tr.xlf | 40 +++++- .../search/xlf/LocalizableStrings.zh-Hans.xlf | 40 +++++- .../search/xlf/LocalizableStrings.zh-Hant.xlf | 40 +++++- .../xlf/CommonLocalizableStrings.cs.xlf | 5 + .../xlf/CommonLocalizableStrings.de.xlf | 5 + .../xlf/CommonLocalizableStrings.es.xlf | 5 + .../xlf/CommonLocalizableStrings.fr.xlf | 5 + .../xlf/CommonLocalizableStrings.it.xlf | 5 + .../xlf/CommonLocalizableStrings.ja.xlf | 5 + .../xlf/CommonLocalizableStrings.ko.xlf | 5 + .../xlf/CommonLocalizableStrings.pl.xlf | 5 + .../xlf/CommonLocalizableStrings.pt-BR.xlf | 5 + .../xlf/CommonLocalizableStrings.ru.xlf | 5 + .../xlf/CommonLocalizableStrings.tr.xlf | 5 + .../xlf/CommonLocalizableStrings.zh-Hans.xlf | 5 + .../xlf/CommonLocalizableStrings.zh-Hant.xlf | 5 + src/Common/WorkloadSetVersion.cs | 5 + .../WorkloadManifest.cs | 4 +- .../MockNuGetPackageInstaller.cs | 7 +- .../MockPackWorkloadInstaller.cs | 17 ++- .../GivenDotnetWorkloadSearch.cs | 51 +++++++ .../MockWorkloadResolver.cs | 7 +- .../GivenDotnetWorkloadUpdate.cs | 70 +++++++++- 57 files changed, 1024 insertions(+), 162 deletions(-) diff --git a/src/Cli/dotnet/CommonLocalizableStrings.resx b/src/Cli/dotnet/CommonLocalizableStrings.resx index 8d5d2ead804c..9ef2b4a474f9 100644 --- a/src/Cli/dotnet/CommonLocalizableStrings.resx +++ b/src/Cli/dotnet/CommonLocalizableStrings.resx @@ -734,6 +734,10 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is Response file '{0}' does not exist. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + The solution file '{0}' is missing EndProject tags or has invalid child-parent project folder mappings around project GUID: '{1}'. Manually repair the solution or try to open and save it in Visual Studio." diff --git a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs index 808504e7fc89..87de51b002fe 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs +++ b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs @@ -567,7 +567,8 @@ await Task.WhenAll( if (stableVersions.Any()) { - return stableVersions.OrderByDescending(r => r.package.Identity.Version).Take(numberOfResults); + var results = stableVersions.OrderByDescending(r => r.package.Identity.Version); + return numberOfResults > 0 /* 0 indicates 'all' */ ? results.Take(numberOfResults) : results; } } diff --git a/src/Cli/dotnet/Parser.cs b/src/Cli/dotnet/Parser.cs index 04374a3e44ea..000f2c20a807 100644 --- a/src/Cli/dotnet/Parser.cs +++ b/src/Cli/dotnet/Parser.cs @@ -237,6 +237,8 @@ private static void SetHelpCustomizations(HelpBuilder builder) }; builder.CustomizeSymbol(option, secondColumnText: descriptionCallback); } + + builder.CustomizeSymbol(WorkloadSearchVersionsCommandParser.GetCommand(), secondColumnText: CommonLocalizableStrings.ShortWorkloadSearchVersionDescription); } public void additionalOption(HelpContext context) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index 8f8f2295333b..3da0e9887571 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.CommandLine; -using System.IO; -using System.Linq; -using System.Net.Http.Json; -using System.Runtime.CompilerServices; -using System.Text.Json; -using System.Text.Json.Nodes; using Microsoft.Deployment.DotNet.Releases; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.Commands.DotNetWorkloads; @@ -16,6 +10,7 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.History; using Microsoft.DotNet.Workloads.Workload.Install; +using Microsoft.DotNet.Workloads.Workload.Search; using Microsoft.DotNet.Workloads.Workload.Update; using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.NET.Sdk.WorkloadManifestReader; @@ -41,7 +36,7 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected readonly string _fromRollbackDefinition; protected int _fromHistorySpecified; protected bool _historyManifestOnlyOption; - protected string _workloadSetVersionFromCommandLine; + protected IEnumerable _workloadSetVersionFromCommandLine; protected string _globalJsonPath; protected string _workloadSetVersionFromGlobalJson; protected readonly PackageSourceLocation _packageSourceLocation; @@ -55,7 +50,7 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected bool UseRollback => !string.IsNullOrWhiteSpace(_fromRollbackDefinition); protected bool FromHistory => _fromHistorySpecified != 0; - protected bool SpecifiedWorkloadSetVersionOnCommandLine => !string.IsNullOrWhiteSpace(_workloadSetVersionFromCommandLine); + protected bool SpecifiedWorkloadSetVersionOnCommandLine => _workloadSetVersionFromCommandLine?.Any() == true; protected bool SpecifiedWorkloadSetVersionInGlobalJson => !string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson); protected WorkloadHistoryState _WorkloadHistoryRecord { @@ -186,7 +181,7 @@ protected void UpdateWorkloadManifests(WorkloadHistoryRecorder recorder, ITransa { // This is essentially the same as updating to a specific workload set version, and we're now past the error check, // so we can just use the same code path. - _workloadSetVersionFromCommandLine = _WorkloadHistoryRecord.WorkloadSetVersion; + _workloadSetVersionFromCommandLine = [_WorkloadHistoryRecord.WorkloadSetVersion]; } else if ((UseRollback || FromHistory) && updateToLatestWorkloadSet) { @@ -214,7 +209,39 @@ protected void UpdateWorkloadManifests(WorkloadHistoryRecorder recorder, ITransa } } - string resolvedWorkloadSetVersion = _workloadSetVersionFromGlobalJson ??_workloadSetVersionFromCommandLine; + string resolvedWorkloadSetVersion = null; + + if (_workloadSetVersionFromCommandLine?.Any(v => v.Contains('@')) == true) + { + var versions = WorkloadSearchVersionsCommand.FindBestWorkloadSetsFromComponents( + _sdkFeatureBand, + _workloadInstaller is not NetSdkMsiInstallerClient ? _workloadInstaller : null, + _sdkFeatureBand.IsPrerelease, + PackageDownloader, + _workloadSetVersionFromCommandLine, + _workloadResolver, + numberOfWorkloadSetsToTake: 1); + + if (versions is null) + { + return; + } + else if (!versions.Any()) + { + Reporter.WriteLine(Update.LocalizableStrings.NoWorkloadUpdateFound); + return; + } + else + { + resolvedWorkloadSetVersion = versions.Single(); + } + } + else if (SpecifiedWorkloadSetVersionOnCommandLine) + { + resolvedWorkloadSetVersion = _workloadSetVersionFromCommandLine.Single(); + } + + resolvedWorkloadSetVersion = _workloadSetVersionFromGlobalJson ?? resolvedWorkloadSetVersion; if (string.IsNullOrWhiteSpace(resolvedWorkloadSetVersion) && !UseRollback && !FromHistory) { _workloadManifestUpdater.UpdateAdvertisingManifestsAsync(_includePreviews, updateToLatestWorkloadSet, offlineCache).Wait(); @@ -441,9 +468,10 @@ protected IEnumerable WriteSDKInstallRecordsForVSWorkloads(IEnumerab internal static class InstallingWorkloadCommandParser { - public static readonly CliOption WorkloadSetVersionOption = new("--version") + public static readonly CliOption> WorkloadSetVersionOption = new("--version") { - Description = Strings.WorkloadSetVersionOptionDescription + Description = Strings.WorkloadSetVersionOptionDescription, + AllowMultipleArgumentsPerToken = true }; public static readonly CliOption PrintDownloadLinkOnlyOption = new("--print-download-link-only") diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs index 7267a5492bc5..8dfaa13357c7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs @@ -14,6 +14,8 @@ internal interface IInstaller : IWorkloadManifestInstaller { int ExitCode { get; } + WorkloadSet GetWorkloadSetContents(string workloadVersion); + void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext, DirectoryPath? offlineCache = null); void RepairWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, DirectoryPath? offlineCache = null); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx index cd04c02ff902..42c3799c85ee 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx @@ -327,7 +327,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + {Locked="workloadVersion"} Locked={"global.json"} Skip signature verification of workload packages and installers. @@ -348,7 +348,7 @@ Manifest MSI not found in NuGet package {0} - Update to the specified workload version. + A workload version to display or one or more workloads and their versions joined by the '@' character. Installing workload version {0}. @@ -365,4 +365,8 @@ Failed to install workload version {0}: {1} + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index a9acfa057fee..2f26860f62b0 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -1183,5 +1183,10 @@ void IInstaller.UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool? newMode) string newModeString = newMode == null ? "" : newMode.Value ? WorkloadConfigCommandParser.UpdateMode_WorkloadSet : WorkloadConfigCommandParser.UpdateMode_Manifests; Reporter.WriteLine(string.Format(LocalizableStrings.UpdatedWorkloadMode, newModeString)); } + + // This method should never be called for this kind of installer. It is challenging to get this information from an MSI + // and totally unnecessary as the information is identical from a file-based installer. It was added to IInstaller only + // to facilitate testing. As a consequence, it does not need to be implemented. + public WorkloadSet GetWorkloadSetContents(string workloadVersion) => throw new NotImplementedException(); } } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index 3f3e984d6eac..61b707bf36a3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -11,8 +11,6 @@ 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 { @@ -39,7 +37,22 @@ public WorkloadInstallCommand( tempDirPath: tempDirPath) { _skipManifestUpdate = skipWorkloadManifestUpdate ?? parseResult.GetValue(WorkloadInstallCommandParser.SkipManifestUpdateOption); - _workloadIds = workloadIds ?? parseResult.GetValue(WorkloadInstallCommandParser.WorkloadIdArgument).ToList().AsReadOnly(); + var unprocessedWorkloadIds = workloadIds ?? parseResult.GetValue(WorkloadInstallCommandParser.WorkloadIdArgument); + if (unprocessedWorkloadIds?.Any(id => id.Contains('@')) == true) + { + _workloadIds = unprocessedWorkloadIds.Select(id => id.Split('@')[0]).ToList().AsReadOnly(); + if (SpecifiedWorkloadSetVersionOnCommandLine) + { + throw new GracefulException(LocalizableStrings.CannotSpecifyVersionAndWorkloadIdsByComponent, isUserError: true); + } + + _workloadSetVersionFromCommandLine = unprocessedWorkloadIds; + } + else + { + _workloadIds = unprocessedWorkloadIds.ToList().AsReadOnly(); + } + var resolvedReporter = _printDownloadLinkOnly ? NullReporter.Instance : Reporter; _workloadInstaller = _workloadInstallerFromConstructor ?? diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index f30fd75f4019..20c3d3f6211a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -27,6 +27,11 @@ Možnosti {0} a {1} nelze použít společně. Jednu z možností odeberte. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." Na příkazovém řádku nelze pomocí možnosti --version nebo --from-history zadat konkrétní verzi úlohy, pokud je již verze zadána v souboru global.json {0}. Pokud chcete aktualizovat globálně nainstalovanou verzi úlohy, spusťte příkaz mimo cestu obsahující daný soubor global.json nebo aktualizujte verzi uvedenou v souboru global.json a spusťte příkaz dotnet workload update. @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Možnost {0} se nedá použít, pokud je v global.json zadaná verze úlohy. Odeberte možnost {0} nebo odeberte element workloadVersion z {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + Možnost {0} se nedá použít, pokud je v global.json zadaná verze úlohy. Odeberte možnost {0} nebo odeberte element workloadVersion z {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Aktualizuje verzi na zadanou verzi úlohy. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Aktualizuje verzi na zadanou verzi úlohy. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index f6fae7626734..2fd332d7d2dd 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -27,6 +27,11 @@ Die Optionen {0} und {1} können nicht zusammen verwendet werden. Entfernen Sie eine der Optionen. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." Eine bestimmte Workload-Version kann in der Befehlszeile nicht über „--version“ oder „--from-history“ angegeben werden, wenn bereits eine Version in der global.json-Datei „{0}“ angegeben ist. Um die global installierte Workload-Version zu aktualisieren, führen Sie den Befehl außerhalb des Pfads aus, der diese global.json-Datei enthält, oder aktualisieren Sie die in der global.json Datei angegebene Version, und führen Sie „dotnet workload update“ aus. @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Die Option {0} kann nicht verwendet werden, wenn die Workloadversion in global.json angegeben ist. Entfernen Sie die Option {0}, oder entfernen Sie das WorkloadVersion-Element aus {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + Die Option {0} kann nicht verwendet werden, wenn die Workloadversion in global.json angegeben ist. Entfernen Sie die Option {0}, oder entfernen Sie das WorkloadVersion-Element aus {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Aktualisieren Sie auf die angegebene Workloadversion. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Aktualisieren Sie auf die angegebene Workloadversion. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 65251c1545d6..fc76e75985a3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -27,6 +27,11 @@ No se pueden usar las opciones {0} y {1} juntas. Quite una de las opciones. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." No se puede especificar una versión de carga de trabajo determinada en la línea de comandos mediante --version o --from-history cuando ya hay una versión especificada en el archivo global.json {0}. Para actualizar la versión de carga de trabajo instalada globalmente, ejecute el comando fuera de la ruta de acceso que contiene ese archivo global.json o actualice la versión especificada en el archivo global.json y ejecute "dotnet workload update". @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - No se puede usar la opción {0} cuando se especifica la versión de la carga de trabajo en global.json. Quite la opción {0} o quite el elemento "workloadVersion" de {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + No se puede usar la opción {0} cuando se especifica la versión de la carga de trabajo en global.json. Quite la opción {0} o quite el elemento "workloadVersion" de {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Actualice a la versión de carga de trabajo especificada. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Actualice a la versión de carga de trabajo especificada. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index be7157ed7cf8..15d7fd0ab918 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -27,6 +27,11 @@ Impossible d’utiliser les options {0} et {1} ensemble. Supprimez l’une des options. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." 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 » @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Impossible d’utiliser l’option {0} lorsque la version de la charge de travail est spécifiée dans global.json. Supprimez l’option {0} ou supprimez l’élément « workloadVersion » de {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + Impossible d’utiliser l’option {0} lorsque la version de la charge de travail est spécifiée dans global.json. Supprimez l’option {0} ou supprimez l’élément « workloadVersion » de {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Mettre à jour vers la version de charge de travail spécifiée. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Mettre à jour vers la version de charge de travail spécifiée. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 037c31d480a2..255d0b05941b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -27,6 +27,11 @@ Impossibile utilizzare contemporaneamente le opzioni {0} e {1}. Rimuove una delle opzioni. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." Impossibile specificare una determinata versione del carico di lavoro nella riga di comando tramite --version o --from-history quando è già specificata una versione nel file global.json {0}. Per aggiornare la versione del carico di lavoro installata a livello globale, eseguire il comando all'esterno del percorso contenente tale file global.json o aggiornare la versione specificata nel file di global.json ed eseguire "dotnet workload update". @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Non è possibile usare l'opzione {0} quando la versione del carico di lavoro è specificata in global.json. Rimuovere l'opzione {0} o rimuovere l'elemento 'workloadVersion' da {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + Non è possibile usare l'opzione {0} quando la versione del carico di lavoro è specificata in global.json. Rimuovere l'opzione {0} o rimuovere l'elemento 'workloadVersion' da {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Eseguire l'aggiornamento alla versione del carico di lavoro specificata. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Eseguire l'aggiornamento alla versione del carico di lavoro specificata. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index a0c30d7676b7..ff0cab5f14ff 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -27,6 +27,11 @@ {0} オプションと {1} オプションを同時に使用することはできません。いずれかのオプションを削除してください。 + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." global.json ファイル {0} に既にバージョンが指定されている場合は、コマンド ラインで --version または --from-history を使用して特定のワークロード バージョンを指定することはできません。グローバルにインストールされたワークロード バージョンを更新するには、その global.json ファイルを含むパスの外部でコマンドを実行するか、global.json ファイルで指定されたバージョンを更新して、"dotnet workload update" を実行します。 @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - ワークロードのバージョンが global.json で指定されている場合、{0} オプションは使用できません。{0} オプションを削除するか、{1} から 'workloadVersion' 要素を削除してください。 - "workloadVersion" and "global.json" are literal values and should not be translated. + ワークロードのバージョンが global.json で指定されている場合、{0} オプションは使用できません。{0} オプションを削除するか、{1} から 'workloadVersion' 要素を削除してください。 + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - 指定されたワークロード バージョンに更新します。 + A workload version to display or one or more workloads and their versions joined by the '@' character. + 指定されたワークロード バージョンに更新します。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index 35c637fc89c6..f96e6ca1170a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -27,6 +27,11 @@ {0} 및 {1} 옵션을 함께 사용할 수 없습니다. 옵션 중 하나를 제거하세요. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." global.json 파일 {0}에 지정된 버전이 이미 있는 경우 --version 또는 --from-history를 통해 명령줄에서 특정 워크로드 버전을 지정할 수 없습니다. 전역으로 설치된 워크로드 버전을 업데이트하려면 해당 global.json 파일이 포함된 경로 외부에서 명령을 실행하거나 global.json 파일에 지정된 버전을 업데이트하고 "dotnet 워크로드 업데이트"를 실행합니다. @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - global.json에 워크로드 버전이 지정된 경우 {0} 옵션을 사용할 수 없습니다. {0} 옵션을 제거하거나, {1}에서 'workloadVersion' 요소를 제거하세요. - "workloadVersion" and "global.json" are literal values and should not be translated. + global.json에 워크로드 버전이 지정된 경우 {0} 옵션을 사용할 수 없습니다. {0} 옵션을 제거하거나, {1}에서 'workloadVersion' 요소를 제거하세요. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - 지정된 워크로드 버전으로 업데이트합니다. + A workload version to display or one or more workloads and their versions joined by the '@' character. + 지정된 워크로드 버전으로 업데이트합니다. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index 6c5f1cae1360..a282124becdf 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -27,6 +27,11 @@ Nie można używać opcji {0} i {1} razem. Usuń jedną z opcji. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." Nie można określić określonej wersji obciążenia w wierszu polecenia za pomocą opcji --version lub --from-history, jeśli istnieje już wersja określona w pliku global.json {0}. Aby zaktualizować wersję obciążenia zainstalowaną globalnie, uruchom polecenie poza ścieżką zawierającą ten plik global.json lub zaktualizuj wersję określoną w pliku global.json i uruchom polecenie „dotnet workload update”. @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Nie można użyć opcji {0}, jeśli wersja obciążenia jest określona w pliku global.json. Usuń opcję {0} lub usuń element „workloadVersion” z {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + Nie można użyć opcji {0}, jeśli wersja obciążenia jest określona w pliku global.json. Usuń opcję {0} lub usuń element „workloadVersion” z {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Zaktualizuj do określonej wersji obciążenia. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Zaktualizuj do określonej wersji obciążenia. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 2f0f51b1011c..8701e034bb49 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -27,6 +27,11 @@ Não é possível usar as opções {0} e {1} juntas. Escolha uma das opções. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." Não é possível especificar uma versão específica da carga de trabalho na linha de comando por meio de --version ou --from-history quando já existe uma versão especificada no arquivo global.json {0}. Para atualizar a versão da carga de trabalho instalada globalmente, execute o comando fora do caminho que contém o arquivo global.json ou atualize a versão especificada no arquivo global.json e execute "dotnet workload update". @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Não é possível usar a opção {0} quando a versão da carga de trabalho é especificada em global.json. Remova a opção {0} ou remova o elemento 'workloadVersion' de {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + Não é possível usar a opção {0} quando a versão da carga de trabalho é especificada em global.json. Remova a opção {0} ou remova o elemento 'workloadVersion' de {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Atualize para a versão de carga de trabalho especificada. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Atualize para a versão de carga de trabalho especificada. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index 86708c461815..65b740dca22a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -27,6 +27,11 @@ Невозможно использовать параметры {0} и {1} одновременно. Удалите один из параметров. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." Невозможно указать конкретную версию рабочей нагрузки в командной строке с помощью --version или --from-history, если в файле global.json уже указана версия {0}. Чтобы обновить глобально установленную версию рабочей нагрузки, выполните команду вне пути, содержащего этот файл global.json, либо измените версию в файле global.json и выполните команду "dotnet workload update". @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Невозможно использовать параметр {0}, если версия рабочей нагрузки указана в файле global.json. Удалите параметр {0} или удалите элемент "workloadVersion" из {1}. - "workloadVersion" and "global.json" are literal values and should not be translated. + Невозможно использовать параметр {0}, если версия рабочей нагрузки указана в файле global.json. Удалите параметр {0} или удалите элемент "workloadVersion" из {1}. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Обновление до указанной версии рабочей нагрузки. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Обновление до указанной версии рабочей нагрузки. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index bc36b4debfa5..3f5ea5a4fa7e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -27,6 +27,11 @@ {0} ve {1} seçenekleri birlikte kullanılamaz. Seçeneklerden birini kaldırın. + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." {0} global.json dosyasında zaten belirtilen bir sürüm varsa, “--version” veya “--from-history” aracılığıyla komut satırında belirli bir iş yükü sürümü belirtilemez. Genel olarak yüklenen iş yükü sürümünü güncelleştirmek için, komutu global.json dosyasını içeren yolun dışında çalıştırın veya global.json dosyasında belirtilen sürümü güncelleştirin ve “dotnet workload update” komutunu çalıştırın. @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Global.json'da iş yükü sürümü belirtildiğinde {0} seçeneği kullanılamaz. {0} seçeneğini kaldırın veya "workloadVersion" öğesini {1}‘den kaldırın. - "workloadVersion" and "global.json" are literal values and should not be translated. + Global.json'da iş yükü sürümü belirtildiğinde {0} seçeneği kullanılamaz. {0} seçeneğini kaldırın veya "workloadVersion" öğesini {1}‘den kaldırın. + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - Belirtilen iş yükü sürümünde güncelleştirme var. + A workload version to display or one or more workloads and their versions joined by the '@' character. + Belirtilen iş yükü sürümünde güncelleştirme var. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index deb2a9a86c41..61750778049a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -27,6 +27,11 @@ 不能同时使用 {0} 和 {1} 选项。移除其中一个选项。 + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." 当 global.json 文件 {0} 中已指定版本时,无法在命令行上通过 --version 或 --from-history 指定特定工作负载版本。若要更新全局安装的工作负载版本,请在包含该 global.json 文件的路径外部运行命令,或者更新 global.json 文件中指定的版本,然后运行 "dotnet workload update"。 @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - 在 global.json 中指定工作负载版本时,无法使用 {0} 选项。移除 {0} 选项,或从 {1} 中移除“workloadVersion”元素。 - "workloadVersion" and "global.json" are literal values and should not be translated. + 在 global.json 中指定工作负载版本时,无法使用 {0} 选项。移除 {0} 选项,或从 {1} 中移除“workloadVersion”元素。 + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - 更新到指定的工作负载版本。 + A workload version to display or one or more workloads and their versions joined by the '@' character. + 更新到指定的工作负载版本。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index a0af290f566c..432cc33a2679 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -27,6 +27,11 @@ 無法同時使用 {0} 與 {1} 選項。移除其中一個選項。 + + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + Cannot specify a workload version using the --version option while also specifying versions to install using workload@version syntax. + {Locked="--version"} + 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." 當 global.json 檔案 {0} 中已指定版本時,無法在命令列上透過 --version 或 --from-history 指定特定工作負載版本。若要更新全域安裝的工作負載版本,請在包含該 global.json 檔案的路徑外執行命令,或更新 global.json 檔案中指定的版本,然後執行 "dotnet workload update"。 @@ -34,8 +39,8 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - global.json 中指定工作負載版本時,無法使用 {0} 選項。移除 {0} 選項,或從 {1} 移除 'workloadVersion' 元素。 - "workloadVersion" and "global.json" are literal values and should not be translated. + global.json 中指定工作負載版本時,無法使用 {0} 選項。移除 {0} 選項,或從 {1} 移除 'workloadVersion' 元素。 + {Locked="workloadVersion"} Locked={"global.json"} Checking for updated workload version. @@ -393,8 +398,8 @@ - Update to the specified workload version. - 更新至指定的工作負載版本。 + A workload version to display or one or more workloads and their versions joined by the '@' character. + 更新至指定的工作負載版本。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/search/LocalizableStrings.resx index cce5241a328e..656a228086ae 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/search/LocalizableStrings.resx @@ -136,8 +136,37 @@ Platforms - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} Changes the format of outputted workload versions. Can take 'json' or 'list' @@ -163,5 +192,8 @@ Manifest feature band + + No workload version matching {0} was found. + diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs index 64e14d4fc4d1..62e4aadc4c48 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs @@ -1,7 +1,6 @@ // 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.CommandLine; using System.Text.Json; using Microsoft.Deployment.DotNet.Releases; @@ -9,11 +8,9 @@ using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Configurer; -using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install; using Microsoft.NET.Sdk.WorkloadManifestReader; using Microsoft.TemplateEngine.Cli.Commands; -using NuGet.Versioning; using InformationStrings = Microsoft.DotNet.Workloads.Workload.LocalizableStrings; @@ -24,16 +21,20 @@ internal class WorkloadSearchVersionsCommand : WorkloadCommandBase private readonly ReleaseVersion _sdkVersion; private readonly int _numberOfWorkloadSetsToTake; private readonly string _workloadSetOutputFormat; - private readonly FileBasedInstaller _installer; - private readonly string _workloadVersion; + private readonly IInstaller _installer; + private readonly IEnumerable _workloadVersion; private readonly bool _includePreviews; + private readonly IWorkloadResolver _resolver; public WorkloadSearchVersionsCommand( ParseResult result, IReporter reporter = null, - IWorkloadResolverFactory workloadResolverFactory = null) : base(result, CommonOptions.HiddenVerbosityOption, reporter) + IWorkloadResolverFactory workloadResolverFactory = null, + IInstaller installer = null, + INuGetPackageDownloader nugetPackageDownloader = null, + IWorkloadResolver resolver = null) : base(result, CommonOptions.HiddenVerbosityOption, reporter, nugetPackageDownloader: nugetPackageDownloader) { - workloadResolverFactory = workloadResolverFactory ?? new WorkloadResolverFactory(); + workloadResolverFactory ??= new WorkloadResolverFactory(); if (!string.IsNullOrEmpty(result.GetValue(WorkloadSearchCommandParser.VersionOption))) { @@ -43,55 +44,80 @@ public WorkloadSearchVersionsCommand( var creationResult = workloadResolverFactory.Create(); _sdkVersion = creationResult.SdkVersion; - var workloadResolver = creationResult.WorkloadResolver; + _resolver = resolver ?? creationResult.WorkloadResolver; _numberOfWorkloadSetsToTake = result.GetValue(WorkloadSearchVersionsCommandParser.TakeOption); _workloadSetOutputFormat = result.GetValue(WorkloadSearchVersionsCommandParser.FormatOption); // For these operations, we don't have to respect 'msi' because they're equivalent between the two workload // install types, and FileBased is much easier to work with. - _installer = new FileBasedInstaller( + _installer = installer ?? GenerateInstaller(Reporter, new SdkFeatureBand(_sdkVersion), _resolver, Verbosity, result.HasOption(SharedOptions.InteractiveOption)); + + _workloadVersion = result.GetValue(WorkloadSearchVersionsCommandParser.WorkloadVersionArgument); + + _includePreviews = result.HasOption(WorkloadSearchVersionsCommandParser.IncludePreviewsOption) ? + result.GetValue(WorkloadSearchVersionsCommandParser.IncludePreviewsOption) : + new SdkFeatureBand(_sdkVersion).IsPrerelease; + + } + + private static IInstaller GenerateInstaller(IReporter reporter, SdkFeatureBand sdkFeatureBand, IWorkloadResolver workloadResolver, VerbosityOptions verbosity, bool interactive) + { + return new FileBasedInstaller( reporter, - new SdkFeatureBand(_sdkVersion), + sdkFeatureBand, workloadResolver, CliFolderPathCalculator.DotnetUserProfileFolderPath, nugetPackageDownloader: null, dotnetDir: Path.GetDirectoryName(Environment.ProcessPath), tempDirPath: null, - verbosity: Verbosity, + verbosity: verbosity, packageSourceLocation: null, - restoreActionConfig: new RestoreActionConfig(result.HasOption(SharedOptions.InteractiveOption)), + restoreActionConfig: new RestoreActionConfig(interactive), nugetPackageDownloaderVerbosity: VerbosityOptions.quiet ); - - _workloadVersion = result.GetValue(WorkloadSearchVersionsCommandParser.WorkloadVersionArgument); - - _includePreviews = result.HasOption(WorkloadSearchVersionsCommandParser.IncludePreviewsOption) ? - result.GetValue(WorkloadSearchVersionsCommandParser.IncludePreviewsOption) : - new SdkFeatureBand(_sdkVersion).IsPrerelease; } public override int Execute() { - if (_workloadVersion is null) + if (_workloadVersion.Count() == 0) { - var featureBand = new SdkFeatureBand(_sdkVersion); - var packageId = _installer.GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), featureBand); - List versions; try { - versions = PackageDownloader.GetLatestPackageVersions(packageId, _numberOfWorkloadSetsToTake, packageSourceLocation: null, includePreview: _includePreviews) - .GetAwaiter().GetResult() - .Select(version => WorkloadSetVersion.FromWorkloadSetPackageVersion(featureBand, version.ToString())) - .ToList(); + versions = GetVersions(_numberOfWorkloadSetsToTake); } catch (NuGetPackageNotFoundException) { - Microsoft.DotNet.Cli.Utils.Reporter.Error.WriteLine(string.Format(LocalizableStrings.NoWorkloadVersionsFound, featureBand)); + Cli.Utils.Reporter.Error.WriteLine(string.Format(LocalizableStrings.NoWorkloadVersionsFound, new SdkFeatureBand(_sdkVersion))); return 0; } + if (_workloadSetOutputFormat?.Equals("json", StringComparison.OrdinalIgnoreCase) == true) + { + Reporter.WriteLine(JsonSerializer.Serialize(versions.Select(version => new Dictionary() + { + { "workloadVersion", version } + }))); + } + else + { + Reporter.WriteLine(string.Join('\n', versions)); + } + } + else if (_workloadVersion.Any(v => v.Contains('@'))) + { + var versions = FindBestWorkloadSetsFromComponents()?.Take(_numberOfWorkloadSetsToTake); + if (versions is null) + { + return 0; + } + + if (!versions.Any()) + { + Reporter.WriteLine(string.Format(LocalizableStrings.WorkloadVersionWithSpecifiedManifestNotFound, string.Join(' ', _workloadVersion))); + } + else if (_workloadSetOutputFormat?.Equals("json", StringComparison.OrdinalIgnoreCase) == true) { Reporter.WriteLine(JsonSerializer.Serialize(versions.Select(version => version.ToDictionary(_ => "workloadVersion", v => v)))); } @@ -102,7 +128,7 @@ public override int Execute() } else { - var workloadSet = _installer.GetWorkloadSetContents(_workloadVersion); + var workloadSet = _installer.GetWorkloadSetContents(_workloadVersion.Single()); if (_workloadSetOutputFormat?.Equals("json", StringComparison.OrdinalIgnoreCase) == true) { var set = new WorkloadSet() { ManifestVersions = workloadSet.ManifestVersions }; @@ -123,5 +149,55 @@ public override int Execute() return 0; } + + private List GetVersions(int numberOfWorkloadSetsToTake) + { + return GetVersions(numberOfWorkloadSetsToTake, new SdkFeatureBand(_sdkVersion), _installer, _includePreviews, PackageDownloader, _resolver); + } + + private static List GetVersions(int numberOfWorkloadSetsToTake, SdkFeatureBand featureBand, IInstaller installer, bool includePreviews, INuGetPackageDownloader packageDownloader, IWorkloadResolver resolver) + { + installer ??= GenerateInstaller(Cli.Utils.Reporter.NullReporter, featureBand, resolver, VerbosityOptions.d, interactive: false); + var packageId = installer.GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), featureBand); + + return packageDownloader.GetLatestPackageVersions(packageId, numberOfWorkloadSetsToTake, packageSourceLocation: null, includePreview: includePreviews) + .GetAwaiter().GetResult() + .Select(version => WorkloadSetVersion.FromWorkloadSetPackageVersion(featureBand, version.ToString())) + .ToList(); + } + + private IEnumerable FindBestWorkloadSetsFromComponents() + { + return FindBestWorkloadSetsFromComponents(new SdkFeatureBand(_sdkVersion), _installer, _includePreviews, PackageDownloader, _workloadVersion, _resolver, _numberOfWorkloadSetsToTake); + } + + public static IEnumerable FindBestWorkloadSetsFromComponents(SdkFeatureBand featureBand, IInstaller installer, bool includePreviews, INuGetPackageDownloader packageDownloader, IEnumerable workloadVersions, IWorkloadResolver resolver, int numberOfWorkloadSetsToTake) + { + installer ??= GenerateInstaller(Cli.Utils.Reporter.NullReporter, featureBand, resolver, VerbosityOptions.d, interactive: false); + List versions; + try + { + // 0 indicates 'give all versions'. Not all will match, so we don't know how many we will need + versions = GetVersions(0, featureBand, installer, includePreviews, packageDownloader, resolver); + } + catch (NuGetPackageNotFoundException) + { + Cli.Utils.Reporter.Error.WriteLine(string.Format(LocalizableStrings.NoWorkloadVersionsFound, featureBand)); + return null; + } + + var manifestIdsAndVersions = workloadVersions.Select(version => + { + var split = version.Split('@'); + return (new ManifestId(resolver.GetManifestFromWorkload(new WorkloadId(split[0])).Id), new ManifestVersion(split[1])); + }); + + // Since these are ordered by version (descending), the first is the highest version + return versions.Where(version => + { + var manifestVersions = installer.GetWorkloadSetContents(version).ManifestVersions; + return manifestIdsAndVersions.All(tuple => manifestVersions.ContainsKey(tuple.Item1) && manifestVersions[tuple.Item1].Version.Equals(tuple.Item2)); + }).Take(numberOfWorkloadSetsToTake); + } } } diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs index b733f0e01a93..90afc267dd85 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs @@ -10,10 +10,10 @@ namespace Microsoft.DotNet.Cli { internal static class WorkloadSearchVersionsCommandParser { - public static readonly CliArgument WorkloadVersionArgument = + public static readonly CliArgument> WorkloadVersionArgument = new(LocalizableStrings.WorkloadVersionArgument) { - Arity = ArgumentArity.ZeroOrOne, + Arity = ArgumentArity.ZeroOrMore, Description = LocalizableStrings.WorkloadVersionArgumentDescription }; @@ -60,9 +60,9 @@ private static CliCommand ConstructCommand() command.Validators.Add(result => { var versionArgument = result.GetValue(WorkloadVersionArgument); - if (versionArgument is not null && !WorkloadSetVersion.IsWorkloadSetPackageVersion(versionArgument)) + if (versionArgument is not null && !versionArgument.All(v => v.Contains('@')) && !WorkloadSetVersion.IsWorkloadSetPackageVersion(versionArgument.SingleOrDefault(defaultValue: string.Empty))) { - result.AddError(string.Format(CommandLineValidation.LocalizableStrings.UnrecognizedCommandOrArgument, versionArgument)); + result.AddError(string.Format(CommandLineValidation.LocalizableStrings.UnrecognizedCommandOrArgument, string.Join(' ', versionArgument))); } }); diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.cs.xlf index d4d0e1231331..3e4d47c2428d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.cs.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Vypsat seznam nejnovějších vydaných verzí úloh. Pomocí možnosti --take určíte, kolik jich má být poskytnuto, a pomocí --format změníte formát. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Vypsat seznam nejnovějších vydaných verzí úloh. Pomocí možnosti --take určíte, kolik jich má být poskytnuto, a pomocí --format změníte formát. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Verze manifestu výstupní úlohy přidružené k zadané verzi úlohy. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.de.xlf index ff68931ba697..5201e0e2db2e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.de.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Geben eine Liste der neuesten veröffentlichten Workloadversionen aus. Verwendet die Option „--take“, um anzugeben, wie viele angegeben werden sollen, und „--format“, um das Format zu ändern. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Geben eine Liste der neuesten veröffentlichten Workloadversionen aus. Verwendet die Option „--take“, um anzugeben, wie viele angegeben werden sollen, und „--format“, um das Format zu ändern. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Geben Workloadmanifestversionen, die der angegebenen Workloadversion zugeordnet sind, aus. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.es.xlf index f57fc3788a0e..44435e90fd9a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.es.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Genera una lista de las últimas versiones de carga de trabajo publicadas. Toma la opción --take para especificar cuántos proporcionar y --format para modificar el formato. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Genera una lista de las últimas versiones de carga de trabajo publicadas. Toma la opción --take para especificar cuántos proporcionar y --format para modificar el formato. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Versiones del manifiesto de carga de trabajo de salida asociadas a la versión de carga de trabajo proporcionada. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.fr.xlf index 929a846e473b..0159f7943741 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.fr.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Affiche la liste des dernières versions de charge de travail publiées. Prend l’option --take pour spécifier le nombre à fournir et --format pour modifier le format. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Affiche la liste des dernières versions de charge de travail publiées. Prend l’option --take pour spécifier le nombre à fournir et --format pour modifier le format. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Affiche le manifeste de charge de travail associé à la version de charge de travail fournie. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.it.xlf index 2775775318c1..b92bbdca4804 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.it.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Restituisce un elenco delle ultime versioni del carico di lavoro rilasciate. Accetta l'opzione --take per specificare quanti fornirne e --format per modificare il formato. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Restituisce un elenco delle ultime versioni del carico di lavoro rilasciate. Accetta l'opzione --take per specificare quanti fornirne e --format per modificare il formato. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Versioni del manifesto del carico di lavoro di output associate alla versione del carico di lavoro fornita. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ja.xlf index 295a1383492b..a16f3adaadab 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ja.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - リリース済みの最新のワークロード バージョンの一覧を出力します。--take オプションを指定して提供する数を指定し、--format を指定して形式を変更します。 - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + リリース済みの最新のワークロード バージョンの一覧を出力します。--take オプションを指定して提供する数を指定し、--format を指定して形式を変更します。 + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ 指定されたワークロード バージョンに関連付けられたワークロード マニフェストのバージョンを出力します。 + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ko.xlf index dcb3a7700495..61dc027f8fe2 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ko.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - 릴리스된 최신 워크로드 버전 목록을 출력합니다. --take 옵션을 사용하여 얼마나 제공할지 지정하고 --format을 사용하여 형식을 변경합니다. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + 릴리스된 최신 워크로드 버전 목록을 출력합니다. --take 옵션을 사용하여 얼마나 제공할지 지정하고 --format을 사용하여 형식을 변경합니다. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ 제공된 워크로드 버전과 연결된 워크로드 매니페스트 버전을 출력합니다. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pl.xlf index 76d0c8290c8b..3a6293eb8135 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pl.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Wyświetl listę najnowszych wydanych wersji obciążenia. Przyjmuje opcję --take, aby określić, ile elementów należy podać, i polecenie --format, aby zmienić format. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Wyświetl listę najnowszych wydanych wersji obciążenia. Przyjmuje opcję --take, aby określić, ile elementów należy podać, i polecenie --format, aby zmienić format. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Wersje manifestu obciążenia wyjściowego skojarzone z udostępnioną wersją obciążenia. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pt-BR.xlf index 89a9847f6790..eb69a3f457dd 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.pt-BR.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Gerar uma lista das versões de carga de trabalho lançadas mais recentes. Usa a opção --take para especificar quantos devem ser fornecidos e --format para alterar o formato. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Gerar uma lista das versões de carga de trabalho lançadas mais recentes. Usa a opção --take para especificar quantos devem ser fornecidos e --format para alterar o formato. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Versões de manifesto de carga de trabalho de saída associadas à versão de carga de trabalho fornecida. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ru.xlf index 909910a65e6d..66fdd776974f 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.ru.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - Вывод списка последних выпущенных версий рабочей нагрузки. Принимает параметр --take для указания количества и --format для изменения формата. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + Вывод списка последних выпущенных версий рабочей нагрузки. Принимает параметр --take для указания количества и --format для изменения формата. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Вывод версий манифеста рабочей нагрузки, связанных с указанной версией рабочей нагрузки. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.tr.xlf index 7c094b576f4d..6421f6567dff 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.tr.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - En son yayınlanan iş yükü sürümlerinin listesinin çıkışını görüntüler. Sağlanacak sayıyı belirtmek için --take seçeneğini, biçimi değiştirmek için ise --format seçeneğini alır. - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + En son yayınlanan iş yükü sürümlerinin listesinin çıkışını görüntüler. Sağlanacak sayıyı belirtmek için --take seçeneğini, biçimi değiştirmek için ise --format seçeneğini alır. + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ Sağlanan iş yükü sürümüyle ilişkili iş yükü bildirimi sürümlerinin çıkışını görüntüler. + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hans.xlf index b880ad1ffebe..5a521715def9 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hans.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - 输出最新发布的工作负载版本的列表。使用 --take 选项指定要提供多少,使用 --format 来更改格式。 - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + 输出最新发布的工作负载版本的列表。使用 --take 选项指定要提供多少,使用 --format 来更改格式。 + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ 输出与所提供的工作负载版本关联的工作负载清单版本。 + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hant.xlf index 0ba94d4aba98..02d424f410c5 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/search/xlf/LocalizableStrings.zh-Hant.xlf @@ -33,9 +33,38 @@ - Output a list of the latest released workload versions. Takes the --take option to specify how many to provide and --format to alter the format. - 輸出最新發行的工作負載版本的清單。使用 --take 選項來指定要提供多少個,以及使用 --format 來變更格式。 - Do not localize --take or --format + 'dotnet workload search version' has three functions depending on its argument: + 1. If no argument is specified, it outputs a list of the latest released workload versions from this feature band. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version --take 2 --format json + [{"workloadVersion":"9.0.201"},{"workloadVersion":"9.0.200.1"}] + 2. If a workload version is provided as an argument, it outputs a table of various workloads and their versions for the specified workload version. Takes the --format option to alter the output format. + Example: + dotnet workload search version 9.0.201 + Workload manifest ID Manifest feature band Manifest Version + ------------------------------------------------------------------------------------------------ + microsoft.net.workload.emscripten.current 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net6 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net7 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.workload.emscripten.net8 9.0.100-rc.1 9.0.0-rc.1.24430.3 + microsoft.net.sdk.android 9.0.100-rc.1 35.0.0-rc.1.80 + microsoft.net.sdk.ios 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.maccatalyst 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.sdk.macos 9.0.100-rc.1 14.5.9270-net9-rc1 + microsoft.net.sdk.maui 9.0.100-rc.1 9.0.0-rc.1.24453.9 + microsoft.net.sdk.tvos 9.0.100-rc.1 17.5.9270-net9-rc1 + microsoft.net.workload.mono.toolchain.current 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net6 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net7 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.workload.mono.toolchain.net8 9.0.100-rc.1 9.0.0-rc.1.24431.7 + microsoft.net.sdk.aspire 8.0.100 8.2.0 + 3. If one or more workloads are provided along with their versions (by joining them with the '@' character), it outputs workload versions that match the provided versions. Takes the --take option to specify how many to provide and --format to alter the format. + Example: + dotnet workload search version maui@9.0.0-rc.1.24453.9 ios@17.5.9270-net9-rc1 + 9.0.201 + + 輸出最新發行的工作負載版本的清單。使用 --take 選項來指定要提供多少個,以及使用 --format 來變更格式。 + {Locked="--take"} {Locked="--format"} {Locked="dotnet workload search version"} {Locked="workloadVersion"} The --take option must be positive. @@ -77,6 +106,11 @@ 與提供的工作負載版本相關聯的輸出工作負載資訊清單版本。 + + No workload version matching {0} was found. + No workload version matching {0} was found. + + \ No newline at end of file diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index 9a9f1c215322..c1d013569d62 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is Výchozí hodnota je false, ale pokud cílíte na .NET 7 nebo nižší a je zadán identifikátor modulu runtime, výchozí hodnota je true. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Řešení diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index e9fad16f7e6b..40be7e6bcb6a 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is Der Standardwert lautet FALSE. Wenn sie jedoch auf .NET 7 oder niedriger abzielen, lautet der Standardwert TRUE, wenn ein Laufzeitbezeichner angegeben wird. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Projektmappe diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index 279a91ccc44a..610a4843d3af 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -258,6 +258,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is El valor predeterminado es "false". Sin embargo, cuando el destino es .NET 7 o inferior, el valor predeterminado es "true" si se especifica un identificador en tiempo de ejecución. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Solución diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index 36f8a6b8f18f..cd50be1abdb7 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -258,6 +258,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is La valeur par défaut est « false ». Toutefois, lorsque vous ciblez .NET 7 ou une version antérieure, la valeur par défaut est « true » si un identificateur d’exécution est spécifié. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Solution diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index a80f08fdc20a..1ccbdeed71cf 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is Il valore predefinito è 'false'. Tuttavia, quando la destinazione è .NET 7 o una versione inferiore, il valore predefinito è 'true' se viene specificato un identificatore di runtime. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Soluzione diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index 69b70f679ce9..68d29c6c649e 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is 既定値は 'false' です。しかし、.NET 7 以前が対象の場合、ランタイム識別子が指定されていれば、既定値は 'true' です。 + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution ソリューション diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index abb2f8f6c9b9..af5589cebdca 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -258,6 +258,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is 기본값은 'false'입니다. 그러나 .NET 7 이하를 대상으로 하고 런타임 식별자를 지정하는 경우 기본값은 'true'입니다. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution 솔루션 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index 291db331b394..d3a797c91209 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is Wartość domyślna to „false”. Jednak w przypadku określania wartości docelowej platformy .NET 7 lub niższej wartość domyślna to „true”, jeśli określono identyfikator środowiska uruchomieniowego. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Rozwiązanie diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 9efdb6cdf38f..ff84a312048a 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is O padrão é falso.' No entanto, ao direcionar o .NET 7 ou inferior, o padrão é 'verdadeiro' se um identificador de tempo de execução for especificado. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Solução diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index ce02c20523f4..ddd2cfa9f42f 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is Значение по умолчанию — "false". Однако для .NET 7 или более ранней версии значение по умолчанию — "true", если указан идентификатор среды выполнения. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Решение diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 7d2c4dfe4c98..724ab5c676b3 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is Varsayılan değer 'false' olur. Ancak çalışma zamanı tanımlayıcısı belirtildiyse .NET 7 veya altı projeler hedeflenirken varsayılan değer 'true' olur. + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution Çözüm diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 20f32c494410..4f4296649ace 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is 默认值为 "false"。但目标为 .NET 7 或更低版本时,如果指定了运行时标识符,则默认值为 "true"。 + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution 解决方案 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index 4fa145a3a438..4e803c7f1c1f 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -257,6 +257,11 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is 預設值為 'false'。不過,當目標為 .NET 7 或更低版本時,如有指定執行階段識別碼,則預設值為 'true'。 + + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + Search for available workload versions or what comprises a workload version. Use 'dotnet workload search version --help' for more information. + {Locked="dotnet workload search version --help"} + Solution 解決方案 diff --git a/src/Common/WorkloadSetVersion.cs b/src/Common/WorkloadSetVersion.cs index 907b9f5b9f42..6e21cde35855 100644 --- a/src/Common/WorkloadSetVersion.cs +++ b/src/Common/WorkloadSetVersion.cs @@ -11,6 +11,11 @@ static class WorkloadSetVersion private static string[] SeparateCoreComponents(string workloadSetVersion, out string[] sections) { sections = workloadSetVersion.Split(['-', '+'], 2); + if (sections.Length < 1) + { + return []; + } + return sections[0].Split('.'); } diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadManifest.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadManifest.cs index 80f2ad7f662b..f4181dc59829 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadManifest.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadManifest.cs @@ -47,5 +47,7 @@ internal WorkloadManifest(string id, FXVersion version, string? description, str public Dictionary Workloads { get; } public Dictionary Packs { get; } - } + + public static WorkloadManifest CreateForTests(string id) => new(id, new FXVersion(7, 3, 5), null, string.Empty, [], [], []); +} } diff --git a/test/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs b/test/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs index 0a3728002e03..e26e9d963bbe 100644 --- a/test/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs +++ b/test/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs @@ -13,6 +13,7 @@ internal class MockNuGetPackageDownloader : INuGetPackageDownloader private readonly string _downloadPath; private readonly bool _manifestDownload; private NuGetVersion _lastPackageVersion = new("1.0.0"); + private IEnumerable _packageVersions; public List<(PackageId id, NuGetVersion version, DirectoryPath? downloadFolder, PackageSourceLocation packageSourceLocation)> DownloadCallParams = new(); @@ -22,7 +23,7 @@ internal class MockNuGetPackageDownloader : INuGetPackageDownloader public HashSet PackageIdsToNotFind { get; set; } = new HashSet(StringComparer.OrdinalIgnoreCase); - public MockNuGetPackageDownloader(string dotnetRoot = null, bool manifestDownload = false) + public MockNuGetPackageDownloader(string dotnetRoot = null, bool manifestDownload = false, IEnumerable packageVersions = null) { _manifestDownload = manifestDownload; _downloadPath = dotnetRoot == null ? string.Empty : Path.Combine(dotnetRoot, "metadata", "temp"); @@ -30,6 +31,8 @@ public MockNuGetPackageDownloader(string dotnetRoot = null, bool manifestDownloa { Directory.CreateDirectory(_downloadPath); } + + _packageVersions = packageVersions; } public Task DownloadPackageAsync(PackageId packageId, @@ -79,7 +82,7 @@ public Task> ExtractPackageAsync(string packagePath, Directo return Task.FromResult(new List() as IEnumerable); } - public Task> GetLatestPackageVersions(PackageId packageId, int numberOfResults, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) => Task.FromResult(Enumerable.Empty()); + public Task> GetLatestPackageVersions(PackageId packageId, int numberOfResults, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) => Task.FromResult(_packageVersions ?? Enumerable.Empty()); public Task GetLatestPackageVersion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) { diff --git a/test/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs b/test/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs index f8838a08cc12..d1c05fc24470 100644 --- a/test/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs +++ b/test/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs @@ -26,9 +26,10 @@ internal class MockPackWorkloadInstaller : IInstaller public MockInstallationRecordRepository InstallationRecordRepository; public bool FailingRollback; public bool FailingGarbageCollection; + public WorkloadSet InstalledWorkloadSet; private readonly string FailingPack; private readonly string _dotnetDir; - private string workloadSetContents; + private Dictionary workloadSetContents; List HistoryRecords = new(); public IWorkloadResolver WorkloadResolver { get; set; } @@ -36,7 +37,7 @@ internal class MockPackWorkloadInstaller : IInstaller public int ExitCode => 0; public MockPackWorkloadInstaller(string dotnetDir = null, string failingWorkload = null, string failingPack = null, bool failingRollback = false, IList installedWorkloads = null, - IList installedPacks = null, bool failingGarbageCollection = false, List records = null, string workloadSetContents = "") + IList installedPacks = null, bool failingGarbageCollection = false, List records = null, Dictionary workloadSetContents = null) { InstallationRecordRepository = new MockInstallationRecordRepository(failingWorkload, installedWorkloads?.ToHashSet()); FailingRollback = failingRollback; @@ -65,9 +66,7 @@ IEnumerable GetPacksForWorkloads(IEnumerable workloadIds) } public void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool? newMode) - { - throw new NotImplementedException(); - } + { } public void AdjustWorkloadSetInInstallState(SdkFeatureBand sdkFeatureBand, string workloadVersion) { @@ -119,14 +118,14 @@ public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand }); } - public WorkloadSet GetWorkloadSetContents(string workloadSetVersion) => WorkloadSet.FromJson(workloadSetContents, new SdkFeatureBand("6.0.100")); + public WorkloadSet GetWorkloadSetContents(string workloadSetVersion) => WorkloadSet.FromJson(workloadSetContents[workloadSetVersion], new SdkFeatureBand("6.0.100")); public WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache = null) { InstallWorkloadSetCalled = true; - var workloadSet = WorkloadSet.FromJson(workloadSetContents, new SdkFeatureBand("6.0.100")); - workloadSet.Version = workloadSetVersion; - return workloadSet; + InstalledWorkloadSet = WorkloadSet.FromJson(workloadSetContents[workloadSetVersion], new SdkFeatureBand("6.0.100")); + InstalledWorkloadSet.Version = workloadSetVersion; + return InstalledWorkloadSet; } public void WriteWorkloadHistoryRecord(WorkloadHistoryRecord workloadHistoryRecord, string sdkFeatureBand) diff --git a/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs b/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs index 9e614502f0c7..718394d28b46 100644 --- a/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs +++ b/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Workload.Install.Tests; using Microsoft.DotNet.Workloads.Workload.Search; using Microsoft.NET.Sdk.WorkloadManifestReader; +using Microsoft.TemplateEngine.Abstractions.Components; +using NuGet.Versioning; namespace Microsoft.DotNet.Cli.Workload.Search.Tests { @@ -57,6 +60,54 @@ public void GivenNoWorkloadsAreInstalledSearchIsEmpty() _reporter.Lines.Count.Should().Be(4, because: "Output should have header and no values."); } + [Fact] + public void GivenWorkloadSearchWithComponentsItFindsHighestMatchingSet() + { + string workloadSet1 = @"{ +""Microsoft.NET.Sdk.Android"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.macOS"": ""14.5.92/9.0.100"" +} +"; + string workloadSet2 = @"{ +""Microsoft.NET.Sdk.Android"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.macOS"": ""14.5.92/9.0.100"" +} +"; + string workloadSet3 = @"{ +""Microsoft.NET.Sdk.Android"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.Maui"": ""14.5.92/9.0.100"" +} +"; + string workloadSet4 = @"{ +""Microsoft.NET.Sdk.Android"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.macOS"": ""14.5.93/9.0.100"" +} +"; + Dictionary workloadSets = new() + { + { "9.0.100", workloadSet1 }, + { "9.0.101", workloadSet2 }, + { "9.0.102", workloadSet3 }, + { "9.0.103", workloadSet4 } + }; + + MockPackWorkloadInstaller installer = new(workloadSetContents: workloadSets); + MockNuGetPackageDownloader nugetPackageDownloader = new(packageVersions: [new NuGetVersion("9.103.0"), new NuGetVersion("9.102.0"), new NuGetVersion("9.101.0"), new NuGetVersion("9.100.0")]); + var parseResult = Parser.Instance.Parse("dotnet workload search version android@17.5.9 macos@14.5.92 --take 1"); + MockWorkloadResolver resolver = new( + [new WorkloadResolver.WorkloadInfo(new WorkloadId("Microsoft.NET.Sdk.Android"), null), + new WorkloadResolver.WorkloadInfo(new WorkloadId("Microsoft.NET.Sdk.macOS"), null), + new WorkloadResolver.WorkloadInfo(new WorkloadId("Microsoft.NET.Sdk.Maui"), null)], + getManifest: id => id.Equals(new WorkloadId("android")) ? WorkloadManifest.CreateForTests("Microsoft.NET.Sdk.Android") : + id.Equals(new WorkloadId("macos")) ? WorkloadManifest.CreateForTests("Microsoft.NET.Sdk.macOS") : + WorkloadManifest.CreateForTests("Microsoft.NET.Sdk.Maui")); + var command = new WorkloadSearchVersionsCommand(parseResult, _reporter, installer: installer, nugetPackageDownloader: nugetPackageDownloader, resolver: resolver); + _reporter.Clear(); + command.Execute(); + _reporter.Lines.Count.Should().Be(1); + _reporter.Lines.Single().Should().Be("9.0.101"); + } + [Fact] public void GivenNoStubIsProvidedSearchShowsAllWorkloads() { diff --git a/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs b/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs index 9ba675d348d8..5b3dfce20f83 100644 --- a/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs +++ b/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs @@ -11,17 +11,20 @@ public class MockWorkloadResolver : IWorkloadResolver private readonly IEnumerable _installedManifests; private readonly Func> _getPacksInWorkload; private readonly Func _getPackInfo; + private readonly Func _getManifest; public MockWorkloadResolver( IEnumerable availableWorkloads, IEnumerable installedManifests = null, Func> getPacks = null, - Func getPackInfo = null) + Func getPackInfo = null, + Func getManifest = null) { _availableWorkloads = availableWorkloads; _installedManifests = installedManifests; _getPacksInWorkload = getPacks; _getPackInfo = getPackInfo; + _getManifest = getManifest; } public IEnumerable GetAvailableWorkloads() => _availableWorkloads; @@ -42,7 +45,7 @@ public void RefreshWorkloadManifests() { /* noop */ } public IWorkloadManifestProvider.WorkloadVersionInfo GetWorkloadVersion() => new IWorkloadManifestProvider.WorkloadVersionInfo("8.0.100.2"); public IEnumerable GetUpdatedWorkloads(WorkloadResolver advertisingManifestResolver, IEnumerable installedWorkloads) => throw new NotImplementedException(); WorkloadResolver IWorkloadResolver.CreateOverlayResolver(IWorkloadManifestProvider overlayManifestProvider) => throw new NotImplementedException(); - WorkloadManifest IWorkloadResolver.GetManifestFromWorkload(WorkloadId workloadId) => throw new NotImplementedException(); + WorkloadManifest IWorkloadResolver.GetManifestFromWorkload(WorkloadId workloadId) => _getManifest?.Invoke(workloadId) ?? throw new NotImplementedException(); public IWorkloadManifestProvider GetWorkloadManifestProvider() => throw new NotImplementedException(); } } diff --git a/test/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs b/test/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs index 04fa7acc8446..157fd5c2ca3a 100644 --- a/test/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs +++ b/test/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs @@ -15,6 +15,8 @@ using System.Text.Json; using Microsoft.DotNet.Cli.Workload.Search.Tests; using Microsoft.DotNet.Workloads.Workload.History; +using Microsoft.VisualStudio.TestPlatform.ObjectModel; +using NuGet.Versioning; namespace Microsoft.DotNet.Cli.Workload.Update.Tests { @@ -296,19 +298,19 @@ public void UpdateViaWorkloadSet(bool upgrade) } "; var nugetPackageDownloader = new MockNuGetPackageDownloader(); - var workloadResolver = new MockWorkloadResolver(new WorkloadInfo[] { new WorkloadInfo(new WorkloadId("android"), string.Empty) }, getPacks: id => Enumerable.Empty(), installedManifests: Enumerable.Empty()); + var workloadResolver = new MockWorkloadResolver([new WorkloadInfo(new WorkloadId("android"), string.Empty)], getPacks: id => [], installedManifests: []); var workloadInstaller = new MockPackWorkloadInstaller( dotnetDir, - installedWorkloads: new List() { new WorkloadId("android")}, - workloadSetContents: workloadSetContents) + installedWorkloads: [new WorkloadId("android")], + workloadSetContents: new Dictionary() { { "8.0.302", workloadSetContents } }) { WorkloadResolver = workloadResolver }; var oldVersion = upgrade ? "2.3.2" : "2.3.6"; var workloadManifestUpdater = new MockWorkloadManifestUpdater( - manifestUpdates: new ManifestUpdateWithWorkloads[] { + manifestUpdates: [ new ManifestUpdateWithWorkloads(new ManifestVersionUpdate(new ManifestId("android"), new ManifestVersion("2.3.4"), "8.0.200"), Enumerable.Empty>().ToDictionary()) - }, + ], fromWorkloadSet: true, workloadSetVersion: workloadSetVersion); var resolverFactory = new MockWorkloadResolverFactory(dotnetDir, sdkVersion, workloadResolver, userProfileDir); var updateCommand = new WorkloadUpdateCommand(Parser.Instance.Parse("dotnet workload update"), Reporter.Output, resolverFactory, workloadInstaller, nugetPackageDownloader, workloadManifestUpdater); @@ -325,6 +327,64 @@ public void UpdateViaWorkloadSet(bool upgrade) workloadInstaller.InstalledManifests[0].manifestUpdate.NewVersion.ToString().Should().Be("2.3.4"); } + [Fact] + public void GivenWorkloadUpdateItFindsGreatestWorkloadSetWithSpecifiedComponents() + { + string workloadSet1 = @"{ +""Microsoft.NET.Sdk.iOS"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.macOS"": ""14.5.92/9.0.100"" +} +"; + string workloadSet2 = @"{ +""Microsoft.NET.Sdk.iOS"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.macOS"": ""14.5.92/9.0.100"" +} +"; + string workloadSet3 = @"{ +""Microsoft.NET.Sdk.iOS"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.Maui"": ""14.5.92/9.0.100"" +} +"; + string workloadSet4 = @"{ +""Microsoft.NET.Sdk.iOS"": ""17.5.9/9.0.100"", +""Microsoft.NET.Sdk.macOS"": ""14.5.93/9.0.100"" +} +"; + Dictionary workloadSets = new() + { + { "9.0.100", workloadSet1 }, + { "9.0.101", workloadSet2 }, + { "9.0.102", workloadSet3 }, + { "9.0.103", workloadSet4 } + }; + + var parseResult = Parser.Instance.Parse("dotnet workload update --version ios@17.5.9 macos@14.5.92"); + MockPackWorkloadInstaller installer = new(workloadSetContents: workloadSets); + var testDirectory = _testAssetsManager.CreateTestDirectory(testName: "GivenWorkloadUpdateItFindsGreatestWorkloadSetWithSpecifiedComponents").Path; + WorkloadManifest iosManifest = WorkloadManifest.CreateForTests("Microsoft.NET.Sdk.iOS"); + WorkloadManifest macosManifest = WorkloadManifest.CreateForTests("Microsoft.NET.Sdk.macOS"); + WorkloadManifest mauiManifest = WorkloadManifest.CreateForTests("Microsoft.NET.Sdk.Maui"); + MockWorkloadResolver resolver = new([new WorkloadInfo(new WorkloadId("ios"), ""), new WorkloadInfo(new WorkloadId("macos"), ""), new WorkloadInfo(new WorkloadId("maui"), "")], + installedManifests: [ + new WorkloadManifestInfo("Microsoft.NET.Sdk.iOS", "17.4.3", Path.Combine(testDirectory, "iosManifest"), "9.0.100"), + new WorkloadManifestInfo("Microsoft.NET.Sdk.macOS", "14.4.3", Path.Combine(testDirectory, "macosManifest"), "9.0.100"), + new WorkloadManifestInfo("Microsoft.NET.Sdk.Maui", "14.4.3", Path.Combine(testDirectory, "mauiManifest"), "9.0.100") + ], + getManifest: id => id.ToString().Equals("ios") ? iosManifest : id.ToString().Equals("macos") ? macosManifest : mauiManifest); + MockNuGetPackageDownloader nugetPackageDownloader = new(packageVersions: [new NuGetVersion("9.103.0"), new NuGetVersion("9.102.0"), new NuGetVersion("9.101.0"), new NuGetVersion("9.100.0")]); + WorkloadUpdateCommand command = new( + parseResult, + reporter: null, + workloadResolverFactory: new MockWorkloadResolverFactory(Path.Combine(testDirectory, "dotnet"), "9.0.100", resolver, userProfileDir: testDirectory), + workloadInstaller: installer, + nugetPackageDownloader: nugetPackageDownloader, + workloadManifestUpdater: new MockWorkloadManifestUpdater() + ); + command.Execute(); + + installer.InstalledWorkloadSet.Version.Should().Be("9.0.101"); + } + [Fact] public void GivenWorkloadUpdateItRollsBackOnFailedUpdate() { From 6319104770739a85c865b90a8275b05d9a8efb2b Mon Sep 17 00:00:00 2001 From: kasperk81 <83082615+kasperk81@users.noreply.github.com> Date: Fri, 10 Jan 2025 00:55:01 +0200 Subject: [PATCH 34/49] simplify sln-remove implementation (#45797) --- .../commands/dotnet-sln/remove/Program.cs | 69 +++++++++---------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-sln/remove/Program.cs b/src/Cli/dotnet/commands/dotnet-sln/remove/Program.cs index 766ce64d9b7c..64bca8c1fa82 100644 --- a/src/Cli/dotnet/commands/dotnet-sln/remove/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-sln/remove/Program.cs @@ -19,28 +19,6 @@ internal class RemoveProjectFromSolutionCommand : CommandBase private readonly string _fileOrDirectory; private readonly IReadOnlyCollection _projects; - private int CountNonFolderDescendants( - SolutionModel solution, - SolutionFolderModel item, - Dictionary solutionItemsGroupedByParent, - Dictionary cached) - { - if (cached.ContainsKey(item)) - { - return cached[item]; - } - int count = item.Files?.Count ?? 0; - var children = solutionItemsGroupedByParent.TryGetValue(item, out var items) ? items : Array.Empty(); - foreach (var child in children) - { - count += child is SolutionFolderModel folderModel - ? CountNonFolderDescendants(solution, folderModel, solutionItemsGroupedByParent, cached) - : 1; - } - cached.Add(item, count); - return count; - } - public RemoveProjectFromSolutionCommand(ParseResult parseResult) : base(parseResult) { _fileOrDirectory = parseResult.GetValue(SlnCommandParser.SlnArgument); @@ -91,7 +69,7 @@ private async Task RemoveProjectsAsync(string solutionFileFullPath, IEnumerable< ISolutionSerializer serializer = SlnCommandParser.GetSolutionSerializer(solutionFileFullPath); SolutionModel solution = await serializer.OpenAsync(solutionFileFullPath, cancellationToken); - // set UTF8 BOM encoding for .sln + // set UTF-8 BOM encoding for .sln if (serializer is ISolutionSerializer v12Serializer) { solution.SerializerExtension = v12Serializer.CreateModelExtension(new() @@ -114,21 +92,40 @@ private async Task RemoveProjectsAsync(string solutionFileFullPath, IEnumerable< } } - Dictionary solutionItemsGroupedByParent = solution.SolutionItems - .Where(i => i.Parent != null) - .GroupBy(i => i.Parent) - .ToDictionary(g => g.Key, g => g.ToArray()); - - Dictionary nonFolderDescendantsCount = new(); - foreach (var item in solution.SolutionFolders) + for (int i = 0; i < solution.SolutionFolders.Count; i++) { - CountNonFolderDescendants(solution, item, solutionItemsGroupedByParent, nonFolderDescendantsCount); - } + var folder = solution.SolutionFolders[i]; + int nonFolderDescendants = 0; + Stack stack = new(); + stack.Push(folder); - var emptyFolders = nonFolderDescendantsCount.Where(i => i.Value == 0).Select(i => i.Key); - foreach (var folder in emptyFolders) - { - solution.RemoveFolder(folder); + while (stack.Count > 0) + { + var current = stack.Pop(); + + nonFolderDescendants += current.Files?.Count ?? 0; + foreach (var child in solution.SolutionItems) + { + if (child is { Parent: var parent } && parent == current) + { + if (child is SolutionFolderModel childFolder) + { + stack.Push(childFolder); + } + else + { + nonFolderDescendants++; + } + } + } + } + + if (nonFolderDescendants == 0) + { + solution.RemoveFolder(folder); + // After removal, adjust index and continue to avoid skipping folders after removal + i--; + } } await serializer.SaveAsync(solutionFileFullPath, solution, cancellationToken); From fc944af8d2006e9b360359cd94b81168fdc54120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Thu, 9 Jan 2025 15:13:56 -0800 Subject: [PATCH 35/49] Implements --no-launch-profile-arguments dotnet-run option (#45841) --- .../dotnet-run/LocalizableStrings.resx | 3 ++ src/Cli/dotnet/commands/dotnet-run/Program.cs | 1 + .../dotnet/commands/dotnet-run/RunCommand.cs | 30 ++++++++++++------- .../commands/dotnet-run/RunCommandParser.cs | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.cs.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.de.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.es.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.fr.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.it.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.ja.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.ko.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.pl.xlf | 5 ++++ .../xlf/LocalizableStrings.pt-BR.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.ru.xlf | 5 ++++ .../dotnet-run/xlf/LocalizableStrings.tr.xlf | 5 ++++ .../xlf/LocalizableStrings.zh-Hans.xlf | 5 ++++ .../xlf/LocalizableStrings.zh-Hant.xlf | 5 ++++ .../GivenDotnetRunBuildsCsProj.cs | 30 +++++++++++++++---- 18 files changed, 117 insertions(+), 17 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx index ca6c5bee84ad..7835c0542477 100644 --- a/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx @@ -139,6 +139,9 @@ Do not attempt to use launchSettings.json to configure the application. + + Do not use arguments specified in launch profile to run the application. + The configuration to run for. The default for most projects is 'Debug'. diff --git a/src/Cli/dotnet/commands/dotnet-run/Program.cs b/src/Cli/dotnet/commands/dotnet-run/Program.cs index 1303fee09e2a..1dee09851a17 100644 --- a/src/Cli/dotnet/commands/dotnet-run/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-run/Program.cs @@ -59,6 +59,7 @@ public static RunCommand FromParseResult(ParseResult parseResult) projectFileOrDirectory: parseResult.GetValue(RunCommandParser.ProjectOption), launchProfile: parseResult.GetValue(RunCommandParser.LaunchProfileOption), noLaunchProfile: parseResult.HasOption(RunCommandParser.NoLaunchProfileOption), + noLaunchProfileArguments: parseResult.HasOption(RunCommandParser.NoLaunchProfileArgumentsOption), noRestore: parseResult.HasOption(RunCommandParser.NoRestoreOption) || parseResult.HasOption(RunCommandParser.NoBuildOption), interactive: parseResult.HasOption(RunCommandParser.InteractiveOption), verbosity: parseResult.HasOption(CommonOptions.VerbosityOption) ? parseResult.GetValue(CommonOptions.VerbosityOption) : null, diff --git a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs index bda6db65988c..0f084c9c4d0a 100644 --- a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs @@ -20,30 +20,36 @@ public partial class RunCommand { private record RunProperties(string? RunCommand, string? RunArguments, string? RunWorkingDirectory); - public bool NoBuild { get; private set; } - public string ProjectFileFullPath { get; private set; } + public bool NoBuild { get; } + public string? ProjectFileOrDirectory { get; } + public string ProjectFileFullPath { get; } public string[] Args { get; set; } - public bool NoRestore { get; private set; } + public bool NoRestore { get; } public VerbosityOptions? Verbosity { get; } - public bool Interactive { get; private set; } - public string[] RestoreArgs { get; private set; } + public bool Interactive { get; } + public string[] RestoreArgs { get; } /// /// Environment variables specified on command line via -e option. /// - public IReadOnlyDictionary EnvironmentVariables { get; private set; } + public IReadOnlyDictionary EnvironmentVariables { get; } private bool ShouldBuild => !NoBuild; - public string LaunchProfile { get; private set; } - public bool NoLaunchProfile { get; private set; } - private bool UseLaunchProfile => !NoLaunchProfile; + public string LaunchProfile { get; } + public bool NoLaunchProfile { get; } + + /// + /// True to ignore command line arguments specified by launch profile. + /// + public bool NoLaunchProfileArguments { get; } public RunCommand( bool noBuild, string? projectFileOrDirectory, string launchProfile, bool noLaunchProfile, + bool noLaunchProfileArguments, bool noRestore, bool interactive, VerbosityOptions? verbosity, @@ -52,9 +58,11 @@ public RunCommand( IReadOnlyDictionary environmentVariables) { NoBuild = noBuild; + ProjectFileOrDirectory = projectFileOrDirectory; ProjectFileFullPath = DiscoverProjectFilePath(projectFileOrDirectory); LaunchProfile = launchProfile; NoLaunchProfile = noLaunchProfile; + NoLaunchProfileArguments = noLaunchProfileArguments; Args = args; Interactive = interactive; NoRestore = noRestore; @@ -125,7 +133,7 @@ private void ApplyLaunchSettingsProfileToCommand(ICommand targetCommand, Project targetCommand.EnvironmentVariable(entry.Key, value); } - if (string.IsNullOrEmpty(targetCommand.CommandArgs) && launchSettings.CommandLineArgs != null) + if (!NoLaunchProfileArguments && string.IsNullOrEmpty(targetCommand.CommandArgs) && launchSettings.CommandLineArgs != null) { targetCommand.SetCommandArgs(launchSettings.CommandLineArgs); } @@ -134,7 +142,7 @@ private void ApplyLaunchSettingsProfileToCommand(ICommand targetCommand, Project private bool TryGetLaunchProfileSettingsIfNeeded(out ProjectLaunchSettingsModel? launchSettingsModel) { launchSettingsModel = default; - if (!UseLaunchProfile) + if (NoLaunchProfile) { return true; } diff --git a/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs b/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs index 2ced3abe2636..22a6e3784be3 100644 --- a/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-run/RunCommandParser.cs @@ -34,6 +34,11 @@ internal static class RunCommandParser Description = LocalizableStrings.CommandOptionNoLaunchProfileDescription }; + public static readonly CliOption NoLaunchProfileArgumentsOption = new("--no-launch-profile-arguments") + { + Description = LocalizableStrings.CommandOptionNoLaunchProfileArgumentsDescription + }; + public static readonly CliOption NoBuildOption = new("--no-build") { Description = LocalizableStrings.CommandOptionNoBuildDescription diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf index ad803e3945c6..b107331470c2 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf @@ -17,6 +17,11 @@ K sestavení a spuštění aplikace se použije určená platforma. Tato platforma musí být zadaná v souboru projektu. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Cesta ke spouštěnému souboru projektu (výchozí je aktuální adresář, pokud existuje jenom jeden projekt) diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf index 44a232687444..898be7f9ff87 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf @@ -17,6 +17,11 @@ Erstellt die App mit dem angegebenen Framework und führt sie aus. Das Framework muss in der Projektdatei angegeben werden. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Der Pfad zur auszuführenden Projektdatei (standardmäßig das aktuelle Verzeichnis, falls nur ein einzelnes Projekt vorhanden ist). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf index 7f8d692f3ddd..f274ca5e3ae4 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf @@ -17,6 +17,11 @@ Compila y ejecuta la aplicación con la plataforma especificada. La plataforma se debe especificar en el archivo de proyecto. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Ruta de acceso al archivo del proyecto que debe ejecutarse (si solo hay un proyecto, es el directorio actual de forma predeterminada). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf index 765e8c7a91eb..6e6eb604dde2 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf @@ -17,6 +17,11 @@ Générez et exécutez l'application à l'aide du framework spécifié. Le framework doit être spécifié dans le fichier projet. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Chemin du fichier projet à exécuter (la valeur par défaut est le répertoire actif s'il n'y a qu'un seul projet). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf index 64c2db2f1e9c..4195434f7abb 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf @@ -17,6 +17,11 @@ Consente di compilare ed eseguire l'app con il framework specificato. Il framework deve essere specificato nel file di progetto. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Percorso del file di progetto da eseguire. Se è presente un solo progetto, per impostazione predefinita viene usata la directory corrente. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf index c1e3dc0c821d..517856cff983 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf @@ -17,6 +17,11 @@ 指定されたフレームワークを使用して、アプリを構築して実行します。フレームワークはプロジェクト ファイルで指定する必要があります。 + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). 実行するプロジェクト ファイルへのパス (プロジェクトが 1 つのみの場合、既定は現在のディレクトリです)。 diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf index fedd253c635a..268d33314952 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf @@ -17,6 +17,11 @@ 지정된 프레임워크를 사용하여 앱을 빌드 및 실행합니다. 프로젝트 파일에서 프레임워크를 지정해야 합니다. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). 실행할 프로젝트 파일의 경로입니다(프로젝트가 하나만 있는 경우 현재 디렉터리로 기본 설정됨). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf index 36aba105fc80..a73a54114dd3 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf @@ -17,6 +17,11 @@ Skompiluj i uruchom aplikację przy użyciu określonej platformy. Platforma musi być określona w pliku projektu. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Ścieżka do pliku projektu, który ma zostać uruchomiony (w przypadku tylko jednego projektu wartością domyślną jest bieżący katalog). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf index 334e435c446c..953c3b715658 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf @@ -17,6 +17,11 @@ Compila e executa um aplicativo usando a estrutura especificada. A estrutura deve ser especificada no arquivo de projeto. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). O caminho para o arquivo de projeto a ser executado (usará como padrão o diretório atual se houver apenas um projeto). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf index 4d27d2d19ecc..d648877af6f7 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf @@ -17,6 +17,11 @@ Сборка и выполнение приложения с использованием определенной платформы. Платформа должна быть указана в файле проекта. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Путь к выполняемому файлу проекта (по умолчанию — текущий каталог, если имеется только один проект). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf index 3a96699af96c..70aabe591405 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf @@ -17,6 +17,11 @@ Uygulamayı belirtilen çerçeveyi kullanarak derleyin ve çalıştırın. Çerçevenin proje dosyasında belirtilmesi gerekir. + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). Çalıştırılacak proje dosyasının yolu (yalnızca bir proje varsa, geçerli dizin varsayılan olarak kullanılır). diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf index 995d5b6ab239..2e9ecdafef26 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf @@ -17,6 +17,11 @@ 使用指定的框架生成和运行应用。框架必须在项目文件中指定。 + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). 要运行的项目文件的路径(如果只有一个项目,则默认使用当前目录)。 diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf index a2aa993f7344..86688e07f43b 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf @@ -17,6 +17,11 @@ 使用指定的架構建置及執行應用程式。架構必須在專案檔中指定。 + + Do not use arguments specified in launch profile to run the application. + Do not use arguments specified in launch profile to run the application. + + The path to the project file to run (defaults to the current directory if there is only one project). 要執行之專案檔的路徑 (如果只有一個專案,預設為目前的目錄)。 diff --git a/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs b/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs index 8b0d11e0b98f..87604b60d47c 100644 --- a/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs +++ b/test/dotnet-run.Tests/GivenDotnetRunBuildsCsProj.cs @@ -856,21 +856,39 @@ public void EnvVariablesSpecifiedInLaunchProfileOverrideImplicitlySetVariables() [Fact] public void ItIncludesCommandArgumentsSpecifiedInLaunchSettings() { - var expectedValue = "TestAppCommandLineArguments"; - var secondExpectedValue = "SecondTestAppCommandLineArguments"; - var testAppName = "TestAppWithLaunchSettings"; - var testInstance = _testAssetsManager.CopyTestAsset(testAppName) + var testInstance = _testAssetsManager.CopyTestAsset("TestAppWithLaunchSettings") .WithSource(); + // launchSettings.json specifies commandLineArgs="TestAppCommandLineArguments SecondTestAppCommandLineArguments" + new DotnetCommand(Log, "run") .WithWorkingDirectory(testInstance.Path) .Execute() .Should() .Pass() .And - .HaveStdOutContaining(expectedValue) + .HaveStdOutContaining("TestAppCommandLineArguments") + .And + .HaveStdOutContaining("SecondTestAppCommandLineArguments"); + } + + [Fact] + public void ItIgnoresCommandArgumentsSpecifiedInLaunchSettings() + { + var testInstance = _testAssetsManager.CopyTestAsset("TestAppWithLaunchSettings") + .WithSource(); + + // launchSettings.json specifies commandLineArgs="TestAppCommandLineArguments SecondTestAppCommandLineArguments" + + new DotnetCommand(Log, "run", "--no-launch-profile-arguments") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .NotHaveStdOutContaining("TestAppCommandLineArguments") .And - .HaveStdOutContaining(secondExpectedValue); + .NotHaveStdOutContaining("SecondTestAppCommandLineArguments"); } [Fact] From 569c39b5447e96f97909d1f1e8ad453b5b018849 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:14:00 -0800 Subject: [PATCH 36/49] [release/9.0.2xx] Update dependencies from dotnet/templating (#45839) Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 1 + eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NuGet.config b/NuGet.config index be98952e6a7f..7162bb8f5e13 100644 --- a/NuGet.config +++ b/NuGet.config @@ -16,6 +16,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 320d2cc0ad87..4a02d68e3f5e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,16 +3,16 @@ https://github.com/dotnet/templating - 44a0b49cb0ae4d3c5400360b5124d451a9c5362e + c612cb7362b5394a41ab2cf280fae3e473e60724 - + https://github.com/dotnet/templating - 44a0b49cb0ae4d3c5400360b5124d451a9c5362e + c612cb7362b5394a41ab2cf280fae3e473e60724 - + https://github.com/dotnet/templating - 44a0b49cb0ae4d3c5400360b5124d451a9c5362e + c612cb7362b5394a41ab2cf280fae3e473e60724 diff --git a/eng/Versions.props b/eng/Versions.props index 8c7b37d671f5..b6070933ef0f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -191,7 +191,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 9.0.200-rtm.24523.1 + 9.0.200-rtm.25059.2 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From d14bfab9a994a854c737c0d241cc4853894a43b8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 10 Jan 2025 05:01:38 +0000 Subject: [PATCH 37/49] Update dependencies from https://github.com/dotnet/templating build 20250109.3 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.406-servicing.25058.1 -> To Version 8.0.406-servicing.25059.3 --- NuGet.config | 2 +- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NuGet.config b/NuGet.config index bb72918aa562..b0ce037d2a1c 100644 --- a/NuGet.config +++ b/NuGet.config @@ -27,7 +27,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 44fa67a2aaa3..6a5addc34a6a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - ead9b254a3b43c2d150dfee019fec94a4dff3cdd + 8316f1a2eea1fcb164b622c3a863a16e67c342f5 - + https://github.com/dotnet/templating - ead9b254a3b43c2d150dfee019fec94a4dff3cdd + 8316f1a2eea1fcb164b622c3a863a16e67c342f5 - + https://github.com/dotnet/templating - ead9b254a3b43c2d150dfee019fec94a4dff3cdd + 8316f1a2eea1fcb164b622c3a863a16e67c342f5 diff --git a/eng/Versions.props b/eng/Versions.props index ca9df0d4a41f..c78e404e9865 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -147,7 +147,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.406-servicing.25058.1 + 8.0.406-servicing.25059.3 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 30ab3e191436466847f4768167bd3884bbec1dd5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 10 Jan 2025 11:31:17 +0000 Subject: [PATCH 38/49] Update dependencies from https://github.com/dotnet/arcade build 20250108.5 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions From Version 9.0.0-beta.24623.3 -> To Version 9.0.0-beta.25058.5 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 8 ++++---- global.json | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4a02d68e3f5e..73d1d58e04b6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -555,34 +555,34 @@ - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 - + https://github.com/dotnet/arcade - e0e05154656254a735ebf19ffa5a37a8b915039b + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 diff --git a/eng/Versions.props b/eng/Versions.props index b6070933ef0f..3ec019ba0a4a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -268,10 +268,10 @@ - 9.0.0-beta.24623.3 - 9.0.0-beta.24623.3 - 9.0.0-beta.24623.3 - 9.0.0-beta.24623.3 + 9.0.0-beta.25058.5 + 9.0.0-beta.25058.5 + 9.0.0-beta.25058.5 + 9.0.0-beta.25058.5 diff --git a/global.json b/global.json index ad1375e670f0..941956b31be0 100644 --- a/global.json +++ b/global.json @@ -17,8 +17,8 @@ "cmake": "latest" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24623.3", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24623.3", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25058.5", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25058.5", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24217.1" } From 128790feffd6e1348e96d9355d2730ca4bbc9f90 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 18 Dec 2024 17:01:06 +0100 Subject: [PATCH 39/49] Remove 'NETSDK1219' warning --- src/Tasks/Common/Resources/Strings.resx | 5 +---- .../targets/Microsoft.NET.Windows.targets | 12 ------------ .../GivenThatWeWantToBuildAWindowsDesktopProject.cs | 5 +++-- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 7ae9eba34ad6..fca5779c595c 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -957,10 +957,7 @@ You may need to build the project on another operating system or architecture, o NETSDK1218: This project has a transitive dependency on the full Windows SDK projections (including Windows.UI.Xaml.* types), but does not specify the UseUwp property. That must be enabled to ensure that .NET types are projected and marshalled correctly for interop scenarios with these XAML types. {StrBegin="NETSDK1218: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - {StrBegin="NETSDK1219: "} - + NETSDK1220: UseUwp and all associated functionality require using a TFM of 'net8.0-windows' or greater. {StrBegin="NETSDK1220: "} diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets index 1f28407c1793..644d0faa4658 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets @@ -167,16 +167,4 @@ Copyright (c) .NET Foundation. All rights reserved. and '$(UseUwp)' == 'true' "> - - - - - diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs index 46f9c2a07fa5..40778c5a3215 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs @@ -453,8 +453,9 @@ public void ItUsesTheHighestMatchingWindowsSdkPackageVersion(string targetFramew } + // We used to emit NETSDK1219 while UWP support on .NET 9 was not GA yet, make sure it's gone now [WindowsOnlyFact] - public void ItWarnsWhenBuildingAProjectWithUseUwpProperty() + public void ItDoesNotWarnAnymoreWhenBuildingAProjectWithUseUwpProperty() { TestProject testProject = new() { @@ -472,7 +473,7 @@ public void ItWarnsWhenBuildingAProjectWithUseUwpProperty() .Should() .Pass() .And - .HaveStdOutContaining("NETSDK1219"); + .NotHaveStdOutContaining("NETSDK1219"); } [WindowsOnlyFact] From 863c60dd0d7ab3957d05ecfac04a88c104b7ee88 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 7 Jan 2025 18:57:17 +0100 Subject: [PATCH 40/49] Update .xlf files --- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 5 ----- src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 5 ----- 13 files changed, 65 deletions(-) diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index e43b90dadcca..076520848385 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: Používáte verzi Preview rozhraní .NET. Viz: https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp a všechny související funkce jsou v současné době experimentální a nejsou oficiálně podporovány. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: Vytvoření spravované komponenty Metadata Windows s WinMDExp se při cílení na {0} nepodporuje. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 7b39baa177f7..2825e4f9dc49 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: Sie verwenden eine Vorschauversion von .NET. Weitere Informationen: https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp und alle zugehörigen Funktionen sind derzeit experimentell und werden nicht offiziell unterstützt. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: Das Erstellen einer verwalteten Windows-Metadatenkomponente mit WinMDExp wird mit dem Ziel "{0}" nicht unterstützt. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index b3c53c7036f1..2f4f0cf75660 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: Está usando una versión preliminar de .NET. Visite: https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp y toda la funcionalidad asociada son experimentales actualmente y no se admiten oficialmente. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: No se admite la generación de un componente administrado de metadatos de Windows con WinMDExp cuando el destino es {0}. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index d7bd73780193..237a2e923a8b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: vous utilisez une version d'aperçu de .NET. Voir : https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp et toutes les fonctionnalités associées sont actuellement expérimentales et ne sont pas officiellement prises en charge. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: la production d'un composant de métadonnées Windows managé avec WinMDExp n'est pas prise en charge pour le ciblage de {0}. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 66b3d2c57d30..71603b7b89bc 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: si sta usando una versione in anteprima di .NET. Vedere https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp e tutte le funzionalità associate sono attualmente sperimentali e non sono ufficialmente supportate. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: la produzione di un componente Metadati Windows gestito con WinMDExp non è supportata quando la destinazione è {0}. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 9bd079f5a95f..ddd667863768 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: プレビュー版の .NET を使用しています。https://aka.ms/dotnet-support-policy をご覧ください {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp および関連するすべての機能は現在試験段階であり、正式にはサポートされていません。 - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: {0} をターゲットにする場合、WinMDExp を使用したマネージド Windows メタデータ コンポーネント生成はサポートされていません。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index f15e0756566c..ceb0bbc31fc5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: .NET의 미리 보기 버전을 사용하고 있습니다. 참조: https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp와 관련된 모든 기능은 현재 실험 상태이며 공식적으로 지원되지 않습니다. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: {0}을(를) 대상으로 지정하는 경우 WinMDExp로 관리형 Windows 메타데이터 구성 요소를 생성하는 것은 지원되지 않습니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index c9aa5a6709cd..1abab6892ec0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: Korzystasz z wersji zapoznawczej platformy .NET. Zobacz: ttps://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: protokół UseUwp i wszystkie skojarzone funkcje są obecnie eksperymentalne i nie są oficjalnie obsługiwane. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: Generowanie zarządzanego składnika metadanych systemu Windows za pomocą narzędzia WinMDExp nie jest obsługiwane, gdy używany jest element docelowy {0}. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 8f17d1e078c9..7ae2b04dedf6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: Você está usando uma versão de visualização do .NET. Veja: https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp e todas as funcionalidades associadas atualmente são experimentais e não têm suporte oficial. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: não há suporte para a produção de um componente de Metadados do Windows gerenciado com o WinMDExp ao direcionar ao {0}. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 6b38f53ed323..76917b996ed7 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: Вы используете предварительную версию .NET. Дополнительные сведения см. на странице https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp и все связанные функции на данный момент являются экспериментальными и официально не поддерживаются. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: создание управляемого компонента метаданных Windows с WinMDExp не поддерживается при нацеливании на {0}. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 16e411678844..7405a9746616 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: Bir .NET önizleme sürümü kullanıyorsunuz. Bkz. https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp ve ilişkili tüm işlevler şu anda deneyseldir ve resmi olarak desteklenmez. - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: {0} hedeflenirken, WinMDExp ile yönetilen bir Windows Meta Veri bileşeninin üretilmesi desteklenmiyor. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 80062bef664e..27db73ac5248 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: 你正在使用 .NET 的预览版。请参阅 https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp 和所有关联的功能目前都是试验性的,并且不受官方支持。 - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: 当目标为 {0} 时,不支持使用 WinMDExp 生成托管 Windows 元数据组件。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 587bdf837d0f..900ba1467250 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -1023,11 +1023,6 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: 您目前使用的是 .NET 預覽版。請參閱: https://aka.ms/dotnet-support-policy {StrBegin="NETSDK1057: "} - - NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported. - NETSDK1219: UseUwp 和所有相關聯的功能目前為實驗性功能,並未正式支援。 - {StrBegin="NETSDK1219: "} - NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. NETSDK1131: 當目標為 {0} 時,無法使用 WinMDExp 產生受控 Windows 中繼資料元件。 From 96fa393b3abf3a16e14f93a0e2f133aac934554c Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 9 Jan 2025 11:36:41 +0100 Subject: [PATCH 41/49] Add 'NETSDK1219' to deleted errors list --- .../GivenThatWeHaveErrorCodes.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs index f20ca1ba0ea4..8c60539e385c 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeHaveErrorCodes.cs @@ -37,7 +37,8 @@ public class GivenThatWeHaveErrorCodes 1190, 1192, 1213, - 1214 + 1214, + 1219 }; //ILLink lives in other repos and violated the _info requirement for no error code From bb0a6e5ac5cda33e025d8f3e8d5ad46416819112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20Br=C3=A4nnlund?= Date: Fri, 20 Dec 2024 17:15:25 +0100 Subject: [PATCH 42/49] Add support for using a pinned Digest for Container base images (#44461) Co-authored-by: Chet Husk --- .../ContainerBuilder.cs | 7 +++-- .../KnownStrings.cs | 1 + .../PublicAPI/net472/PublicAPI.Unshipped.txt | 5 +++- .../PublicAPI/net9.0/PublicAPI.Unshipped.txt | 5 +++- .../SourceImageReference.cs | 27 ++++++++++++------ .../Tasks/CreateNewImage.Interface.cs | 8 +++++- .../Tasks/CreateNewImage.cs | 6 ++-- .../Tasks/CreateNewImageToolTask.cs | 4 +++ .../Tasks/ParseContainerProperties.cs | 8 +++++- .../containerize/ContainerizeCommand.cs | 9 ++++++ .../Microsoft.NET.Build.Containers.targets | 2 ++ .../CreateNewImageTests.cs | 2 +- .../DockerRegistryManager.cs | 4 ++- .../DockerRegistryTests.cs | 2 +- .../EndToEndTests.cs | 28 ++++++++++--------- .../ContainerHelpersTests.cs | 28 +++++++++++-------- 16 files changed, 100 insertions(+), 46 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs index 48867a93de6b..751c697e6caf 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs @@ -14,6 +14,7 @@ internal static async Task ContainerizeAsync( string baseRegistry, string baseImageName, string baseImageTag, + string? baseImageDigest, string[] entrypoint, string[] entrypointArgs, string[] defaultArgs, @@ -47,7 +48,7 @@ internal static async Task ContainerizeAsync( bool isLocalPull = string.IsNullOrEmpty(baseRegistry); RegistryMode sourceRegistryMode = baseRegistry.Equals(outputRegistry, StringComparison.InvariantCultureIgnoreCase) ? RegistryMode.PullFromOutput : RegistryMode.Pull; Registry? sourceRegistry = isLocalPull ? null : new Registry(baseRegistry, logger, sourceRegistryMode); - SourceImageReference sourceImageReference = new(sourceRegistry, baseImageName, baseImageTag); + SourceImageReference sourceImageReference = new(sourceRegistry, baseImageName, baseImageTag, baseImageDigest); DestinationImageReference destinationImageReference = DestinationImageReference.CreateFromSettings( imageName, @@ -65,14 +66,14 @@ internal static async Task ContainerizeAsync( var ridGraphPicker = new RidGraphManifestPicker(ridGraphPath); imageBuilder = await registry.GetImageManifestAsync( baseImageName, - baseImageTag, + sourceImageReference.Reference, containerRuntimeIdentifier, ridGraphPicker, cancellationToken).ConfigureAwait(false); } catch (RepositoryNotFoundException) { - logger.LogError(Resource.FormatString(nameof(Strings.RepositoryNotFound), baseImageName, baseImageTag, registry.RegistryName)); + logger.LogError(Resource.FormatString(nameof(Strings.RepositoryNotFound), baseImageName, baseImageTag, baseImageDigest, registry.RegistryName)); return 1; } catch (UnableToAccessRepositoryException) diff --git a/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs b/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs index 371edab873a6..7a6ddc08c7c4 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs @@ -31,6 +31,7 @@ public static class Properties public static readonly string ContainerBaseRegistry = nameof(ContainerBaseRegistry); public static readonly string ContainerBaseName = nameof(ContainerBaseName); public static readonly string ContainerBaseTag = nameof(ContainerBaseTag); + public static readonly string ContainerBaseDigest = nameof(ContainerBaseDigest); public static readonly string ContainerGenerateLabels = nameof(ContainerGenerateLabels); diff --git a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net472/PublicAPI.Unshipped.txt b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net472/PublicAPI.Unshipped.txt index 43526e9c3ab4..5289498137e7 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net472/PublicAPI.Unshipped.txt +++ b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net472/PublicAPI.Unshipped.txt @@ -29,6 +29,8 @@ Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.get -> string! Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.set -> void Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageTag.get -> string! Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageTag.set -> void +Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageDigest.get -> string! +Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageDigest.set -> void Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseRegistry.get -> string! Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseRegistry.set -> void Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerEnvironmentVariables.get -> Microsoft.Build.Framework.ITaskItem![]! @@ -113,6 +115,7 @@ Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParseContainerProp Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerImage.get -> string! Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerRegistry.get -> string! Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerTag.get -> string! +Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerDigest.get -> string! override Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.Execute() -> bool static Microsoft.NET.Build.Containers.ContainerHelpers.TryParsePort(string! input, out Microsoft.NET.Build.Containers.Port? port, out Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError? error) -> bool static Microsoft.NET.Build.Containers.ContainerHelpers.TryParsePort(string? portNumber, string? portType, out Microsoft.NET.Build.Containers.Port? port, out Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError? error) -> bool @@ -136,4 +139,4 @@ Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.SdkVersion.get Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.SdkVersion.set -> void Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.TargetFrameworkVersion.get -> string! Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.TargetFrameworkVersion.set -> void -override Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.Execute() -> bool \ No newline at end of file +override Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.Execute() -> bool diff --git a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Unshipped.txt b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Unshipped.txt index b19e4fa81718..f11ef4cc85f9 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Unshipped.txt +++ b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Unshipped.txt @@ -176,6 +176,8 @@ Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.get -> string! Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.set -> void Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageTag.get -> string! Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageTag.set -> void +Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageDigest.get -> string! +Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageDigest.set -> void Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseRegistry.get -> string! Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseRegistry.set -> void Microsoft.NET.Build.Containers.Tasks.CreateNewImage.Cancel() -> void @@ -262,6 +264,7 @@ Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParseContainerProp Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerImage.get -> string! Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerRegistry.get -> string! Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerTag.get -> string! +Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerDigest.get -> string! override Microsoft.NET.Build.Containers.Tasks.CreateNewImage.Execute() -> bool override Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.Execute() -> bool static Microsoft.NET.Build.Containers.ContainerHelpers.TryParsePort(string! input, out Microsoft.NET.Build.Containers.Port? port, out Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError? error) -> bool @@ -321,4 +324,4 @@ static Microsoft.NET.Build.Containers.ImageIndexV1.operator ==(Microsoft.NET.Bui override Microsoft.NET.Build.Containers.ImageIndexV1.GetHashCode() -> int ~override Microsoft.NET.Build.Containers.ImageIndexV1.Equals(object obj) -> bool Microsoft.NET.Build.Containers.ImageIndexV1.Equals(Microsoft.NET.Build.Containers.ImageIndexV1 other) -> bool -Microsoft.NET.Build.Containers.ImageIndexV1.Deconstruct(out int schemaVersion, out string! mediaType, out Microsoft.NET.Build.Containers.PlatformSpecificOciManifest[]! manifests) -> void \ No newline at end of file +Microsoft.NET.Build.Containers.ImageIndexV1.Deconstruct(out int schemaVersion, out string! mediaType, out Microsoft.NET.Build.Containers.PlatformSpecificOciManifest[]! manifests) -> void diff --git a/src/Containers/Microsoft.NET.Build.Containers/SourceImageReference.cs b/src/Containers/Microsoft.NET.Build.Containers/SourceImageReference.cs index 0775f853dad1..12fb19b82f07 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/SourceImageReference.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/SourceImageReference.cs @@ -4,24 +4,35 @@ namespace Microsoft.NET.Build.Containers; /// -/// Represents a reference to a Docker image. A reference is made of a registry, a repository (aka the image name) and a tag. +/// Represents a reference to a Docker image. A reference is made of a registry, a repository (aka the image name) and a tag or digest. /// -internal readonly record struct SourceImageReference(Registry? Registry, string Repository, string Tag) +internal readonly record struct SourceImageReference(Registry? Registry, string Repository, string? Tag, string? Digest) { public override string ToString() { - if (Registry is { } reg) + string sourceImageReference = Repository; + + if (Registry is { } reg) { - return $"{reg.RegistryName}/{Repository}:{Tag}"; - } - else + sourceImageReference = $"{reg.RegistryName}/{sourceImageReference}"; + } + + if (!string.IsNullOrEmpty(Tag)) { - return RepositoryAndTag; + sourceImageReference = $"{sourceImageReference}:{Tag}"; } + + if (!string.IsNullOrEmpty(Digest)) + { + sourceImageReference = $"{sourceImageReference}@{Digest}"; + } + + return sourceImageReference; } /// /// Returns the repository and tag as a formatted string. Used in cases /// - public readonly string RepositoryAndTag => $"{Repository}:{Tag}"; + public string Reference + => !string.IsNullOrEmpty(Digest) ? Digest : !string.IsNullOrEmpty(Tag) ? Tag : "latest"; } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.Interface.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.Interface.cs index 3da5135b9b07..461ba622ccfc 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.Interface.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.Interface.cs @@ -34,9 +34,14 @@ partial class CreateNewImage /// The base image tag. /// Ex: 6.0 /// - [Required] public string BaseImageTag { get; set; } + /// + /// The base image digest. + /// Ex: sha256:12345... + /// + public string BaseImageDigest { get; set; } + /// /// The registry to push to. /// @@ -187,6 +192,7 @@ public CreateNewImage() BaseRegistry = ""; BaseImageName = ""; BaseImageTag = ""; + BaseImageDigest = ""; OutputRegistry = ""; ArchiveOutputPath = ""; Repository = ""; diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs index 34c4984ae0bb..4d81b963f4a7 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs @@ -62,7 +62,7 @@ internal async Task ExecuteAsync(CancellationToken cancellationToken) RegistryMode sourceRegistryMode = BaseRegistry.Equals(OutputRegistry, StringComparison.InvariantCultureIgnoreCase) ? RegistryMode.PullFromOutput : RegistryMode.Pull; Registry? sourceRegistry = IsLocalPull ? null : new Registry(BaseRegistry, logger, sourceRegistryMode); - SourceImageReference sourceImageReference = new(sourceRegistry, BaseImageName, BaseImageTag); + SourceImageReference sourceImageReference = new(sourceRegistry, BaseImageName, BaseImageTag, BaseImageDigest); DestinationImageReference destinationImageReference = DestinationImageReference.CreateFromSettings( Repository, @@ -82,7 +82,7 @@ internal async Task ExecuteAsync(CancellationToken cancellationToken) var picker = new RidGraphManifestPicker(RuntimeIdentifierGraphPath); imageBuilder = await registry.GetImageManifestAsync( BaseImageName, - BaseImageTag, + sourceImageReference.Reference, ContainerRuntimeIdentifier, picker, cancellationToken).ConfigureAwait(false); @@ -90,7 +90,7 @@ internal async Task ExecuteAsync(CancellationToken cancellationToken) catch (RepositoryNotFoundException) { telemetry.LogUnknownRepository(); - Log.LogErrorWithCodeFromResources(nameof(Strings.RepositoryNotFound), BaseImageName, BaseImageTag, registry.RegistryName); + Log.LogErrorWithCodeFromResources(nameof(Strings.RepositoryNotFound), BaseImageName, BaseImageTag, BaseImageDigest, registry.RegistryName); return !Log.HasLoggedErrors; } catch (UnableToAccessRepositoryException) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs index 698cea555c10..c1bc8fc24af8 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs @@ -107,6 +107,10 @@ internal string GenerateCommandLineCommandsInt() { builder.AppendSwitchIfNotNull("--baseimagetag ", BaseImageTag); } + if (!string.IsNullOrWhiteSpace(BaseImageDigest)) + { + builder.AppendSwitchIfNotNull("--baseimagedigest ", BaseImageDigest); + } if (!string.IsNullOrWhiteSpace(OutputRegistry)) { builder.AppendSwitchIfNotNull("--outputregistry ", OutputRegistry); diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/ParseContainerProperties.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/ParseContainerProperties.cs index 0efe65781c85..bab45e1c1ce1 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/ParseContainerProperties.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/ParseContainerProperties.cs @@ -48,6 +48,9 @@ public sealed class ParseContainerProperties : Microsoft.Build.Utilities.Task [Output] public string ParsedContainerTag { get; private set; } + [Output] + public string ParsedContainerDigest { get; private set; } + [Output] public string NewContainerRegistry { get; private set; } @@ -71,6 +74,7 @@ public ParseContainerProperties() ParsedContainerRegistry = ""; ParsedContainerImage = ""; ParsedContainerTag = ""; + ParsedContainerDigest = ""; NewContainerRegistry = ""; NewContainerRepository = ""; NewContainerTags = Array.Empty(); @@ -132,7 +136,7 @@ public override bool Execute() out string? outputReg, out string? outputImage, out string? outputTag, - out string? _outputDigest, + out string? outputDigest, out bool isRegistrySpecified)) { Log.LogErrorWithCodeFromResources(nameof(Strings.BaseImageNameParsingFailed), nameof(FullyQualifiedBaseImageName), FullyQualifiedBaseImageName); @@ -163,6 +167,7 @@ public override bool Execute() ParsedContainerRegistry = outputReg ?? ""; ParsedContainerImage = outputImage ?? ""; ParsedContainerTag = outputTag ?? ""; + ParsedContainerDigest = outputDigest ?? ""; NewContainerRegistry = ContainerRegistry; NewContainerTags = validTags; @@ -172,6 +177,7 @@ public override bool Execute() Log.LogMessage(MessageImportance.Low, "Host: {0}", ParsedContainerRegistry); Log.LogMessage(MessageImportance.Low, "Image: {0}", ParsedContainerImage); Log.LogMessage(MessageImportance.Low, "Tag: {0}", ParsedContainerTag); + Log.LogMessage(MessageImportance.Low, "Digest: {0}", ParsedContainerDigest); Log.LogMessage(MessageImportance.Low, "Image Name: {0}", NewContainerRepository); Log.LogMessage(MessageImportance.Low, "Image Tags: {0}", string.Join(", ", NewContainerTags)); } diff --git a/src/Containers/containerize/ContainerizeCommand.cs b/src/Containers/containerize/ContainerizeCommand.cs index cba5b0a012b7..fd47e728142c 100644 --- a/src/Containers/containerize/ContainerizeCommand.cs +++ b/src/Containers/containerize/ContainerizeCommand.cs @@ -35,6 +35,12 @@ internal class ContainerizeCommand : CliRootCommand DefaultValueFactory = (_) => "latest" }; + internal CliOption BaseImageDigestOption { get; } = new("--baseimagedigest") + { + Description = "The base image digest. Ex: sha256:6cec3641...", + Required = false + }; + internal CliOption OutputRegistryOption { get; } = new("--outputregistry") { Description = "The registry to push to.", @@ -204,6 +210,7 @@ internal ContainerizeCommand() : base("Containerize an application without Docke Options.Add(BaseRegistryOption); Options.Add(BaseImageNameOption); Options.Add(BaseImageTagOption); + Options.Add(BaseImageDigestOption); Options.Add(OutputRegistryOption); Options.Add(ArchiveOutputPathOption); Options.Add(RepositoryOption); @@ -232,6 +239,7 @@ internal ContainerizeCommand() : base("Containerize an application without Docke string _baseReg = parseResult.GetValue(BaseRegistryOption)!; string _baseName = parseResult.GetValue(BaseImageNameOption)!; string _baseTag = parseResult.GetValue(BaseImageTagOption)!; + string? _baseDigest = parseResult.GetValue(BaseImageDigestOption); string? _outputReg = parseResult.GetValue(OutputRegistryOption); string? _archiveOutputPath = parseResult.GetValue(ArchiveOutputPathOption); string _name = parseResult.GetValue(RepositoryOption)!; @@ -264,6 +272,7 @@ await ContainerBuilder.ContainerizeAsync( _baseReg, _baseName, _baseTag, + _baseDigest, _entrypoint, _entrypointArgs, _defaultArgs, diff --git a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets index e9e52d5dfece..50458adc2a37 100644 --- a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets +++ b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets @@ -130,6 +130,7 @@ + @@ -254,6 +255,7 @@ BaseRegistry="$(ContainerBaseRegistry)" BaseImageName="$(ContainerBaseName)" BaseImageTag="$(ContainerBaseTag)" + BaseImageDigest="$(ContainerBaseDigest)" LocalRegistry="$(LocalRegistry)" OutputRegistry="$(ContainerRegistry)" ArchiveOutputPath="$(ContainerArchiveOutputPath)" diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs index 0161ee485886..75ae14f635a3 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs @@ -240,7 +240,7 @@ public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage() BuiltImage builtImage = imageBuilder.Build(); - var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net8ImageTag); + var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net8ImageTag, null); var destinationReference = new DestinationImageReference(registry, RootlessBase, new[] { "latest" }); await registry.PushAsync(builtImage, sourceReference, destinationReference, cancellationToken: default).ConfigureAwait(false); diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs index 7c460b5aad66..bf9ae3ff2478 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs @@ -16,10 +16,12 @@ public class DockerRegistryManager public const string Net7ImageTag = "7.0"; public const string Net8ImageTag = "8.0"; public const string Net9ImageTag = "9.0"; + public const string Net9ImageDigest = "sha256:d8f01f752bf9bd3ff630319181a2ccfbeecea4080a1912095a34002f61bfa345"; public const string Net8PreviewWindowsSpecificImageTag = $"{Net8ImageTag}-nanoserver-ltsc2022"; public const string LocalRegistry = "localhost:5010"; public const string FullyQualifiedBaseImageDefault = $"{BaseImageSource}/{RuntimeBaseImage}:{Net9ImageTag}"; public const string FullyQualifiedBaseImageAspNet = $"{BaseImageSource}/{AspNetBaseImage}:{Net9ImageTag}"; + public const string FullyQualifiedBaseImageAspNetDigest = $"{BaseImageSource}/{AspNetBaseImage}@{Net9ImageDigest}"; private static string? s_registryContainerId; internal class SameArchManifestPicker : IManifestPicker @@ -78,7 +80,7 @@ public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOu var ridjson = Path.Combine(Path.GetDirectoryName(dotnetdll)!, "RuntimeIdentifierGraph.json"); var image = await pullRegistry.GetImageManifestAsync(RuntimeBaseImage, tag, "linux-x64", new SameArchManifestPicker(), CancellationToken.None); - var source = new SourceImageReference(pullRegistry, RuntimeBaseImage, tag); + var source = new SourceImageReference(pullRegistry, RuntimeBaseImage, tag, null); var dest = new DestinationImageReference(pushRegistry, RuntimeBaseImage, [tag]); logger.LogInformation($"Pushing image for {BaseImageSource}/{RuntimeBaseImage}:{tag}"); await pushRegistry.PushAsync(image.Build(), source, dest, CancellationToken.None); diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs index a992e06b4e8c..64404c07fed8 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs @@ -79,7 +79,7 @@ public async Task WriteToPrivateBasicRegistry() var ridgraphfile = ToolsetUtils.GetRuntimeGraphFilePath(); Registry mcr = new(DockerRegistryManager.BaseImageSource, logger, RegistryMode.Pull); - var sourceImage = new SourceImageReference(mcr, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net6ImageTag); + var sourceImage = new SourceImageReference(mcr, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net6ImageTag, null); var destinationImage = new DestinationImageReference(localAuthed, DockerRegistryManager.RuntimeBaseImage, new[] { DockerRegistryManager.Net6ImageTag }); ImageBuilder? downloadedImage = await mcr.GetImageManifestAsync( DockerRegistryManager.RuntimeBaseImage, diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 1ea047f9f2d8..ba73e4bd84be 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -69,7 +69,7 @@ public async Task ApiEndToEndWithRegistryPushAndPull() BuiltImage builtImage = imageBuilder.Build(); // Push the image back to the local registry - var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag); + var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag, null); var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { "latest", "1.0" }); await registry.PushAsync(builtImage, sourceReference, destinationReference, cancellationToken: default).ConfigureAwait(false); @@ -115,7 +115,7 @@ public async Task ApiEndToEndWithLocalLoad() BuiltImage builtImage = imageBuilder.Build(); // Load the image into the local registry - var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag); + var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag, null); var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { "latest", "1.0" }); await new DockerCli(_loggerFactory).LoadAsync(builtImage, sourceReference, destinationReference, default).ConfigureAwait(false); @@ -158,7 +158,7 @@ public async Task ApiEndToEndWithArchiveWritingAndLoad() // Write the image to disk var archiveFile = Path.Combine(TestSettings.TestArtifactsDirectory, nameof(ApiEndToEndWithArchiveWritingAndLoad), "app.tar.gz"); - var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag); + var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag, null); var destinationReference = new DestinationImageReference(new ArchiveFileRegistry(archiveFile), NewImageName(), new[] { "latest", "1.0" }); await destinationReference.LocalRegistry!.LoadAsync(builtImage, sourceReference, destinationReference, default).ConfigureAwait(false); @@ -181,7 +181,7 @@ public async Task ApiEndToEndWithArchiveWritingAndLoad() [DockerAvailableFact] public async Task TarballsHaveCorrectStructure() - { + { var archiveFile = Path.Combine(TestSettings.TestArtifactsDirectory, nameof(TarballsHaveCorrectStructure), "app.tar.gz"); @@ -190,7 +190,7 @@ public async Task TarballsHaveCorrectStructure() await BuildDockerImageWithArciveDestinationAsync(archiveFile, ["latest"], nameof(TarballsHaveCorrectStructure)); await destinationReference.LocalRegistry!.LoadAsync(dockerImage, sourceReference, destinationReference, default).ConfigureAwait(false); - + Assert.True(File.Exists(archiveFile), $"File.Exists({archiveFile})"); CheckDockerTarballStructure(archiveFile); @@ -221,7 +221,7 @@ public async Task TarballsHaveCorrectStructure() BuiltImage builtImage = imageBuilder.Build(); // Write the image to disk - var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net7ImageTag); + var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net7ImageTag, null); var destinationReference = new DestinationImageReference(new ArchiveFileRegistry(archiveFile), NewImageName(), tags); return (builtImage, sourceReference, destinationReference); @@ -607,8 +607,10 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage privateNuGetAssets.Delete(true); } - [DockerAvailableFact()] - public void EndToEnd_NoAPI_Console() + [DockerAvailableTheory()] + [InlineData(DockerRegistryManager.FullyQualifiedBaseImageAspNet)] + [InlineData(DockerRegistryManager.FullyQualifiedBaseImageAspNetDigest)] + public void EndToEnd_NoAPI_Console(string baseImage) { DirectoryInfo newProjectDir = new(Path.Combine(TestSettings.TestArtifactsDirectory, "CreateNewImageTest")); DirectoryInfo privateNuGetAssets = new(Path.Combine(TestSettings.TestArtifactsDirectory, "ContainerNuGet")); @@ -660,7 +662,7 @@ public void EndToEnd_NoAPI_Console() "publish", "/t:PublishContainer", "/p:runtimeidentifier=linux-x64", - $"/p:ContainerBaseImage={DockerRegistryManager.FullyQualifiedBaseImageAspNet}", + $"/p:ContainerBaseImage={baseImage}", $"/p:ContainerRegistry={DockerRegistryManager.LocalRegistry}", $"/p:ContainerRepository={imageName}", $"/p:ContainerImageTag={imageTag}", @@ -806,8 +808,8 @@ public void EndToEndMultiArch_ArchivePublishing() .And.HaveStdOutContaining($"Pushed image '{imageArm64}' to local archive at '{imageArm64Tarball}'") .And.NotHaveStdOutContaining("Pushed image index"); - // Check that tarballs were created - File.Exists(imageX64Tarball).Should().BeTrue(); + // Check that tarballs were created + File.Exists(imageX64Tarball).Should().BeTrue(); File.Exists(imageArm64Tarball).Should().BeTrue(); // Load the images from the tarballs @@ -853,7 +855,7 @@ public void EndToEndMultiArch_RemoteRegistry() // Create a new console project DirectoryInfo newProjectDir = CreateNewProject("console"); - + // Run PublishContainer for multi-arch with ContainerRegistry CommandResult commandResult = new DotnetCommand( _testOutput, @@ -1200,7 +1202,7 @@ public async Task CanPackageForAllSupportedContainerRIDs(string dockerPlatform, BuiltImage builtImage = imageBuilder.Build(); // Load the image into the local registry - var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag); + var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net9ImageTag, null); var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid }); await new DockerCli(_loggerFactory).LoadAsync(builtImage, sourceReference, destinationReference, default).ConfigureAwait(false); diff --git a/test/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs index 9bec92972e33..27d2b7441bf4 100644 --- a/test/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs +++ b/test/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs @@ -23,29 +23,33 @@ public void IsValidRegistry(string registry, bool expectedReturn) } [Theory] - [InlineData("mcr.microsoft.com/dotnet/runtime:6.0", true, "mcr.microsoft.com", "dotnet/runtime", "6.0", true)] - [InlineData("mcr.microsoft.com/dotnet/runtime", true, "mcr.microsoft.com", "dotnet/runtime", null, true)] - [InlineData("mcr.microsoft.com/", false, null, null, null, false)] // no image = nothing resolves + [InlineData("mcr.microsoft.com/dotnet/runtime@sha256:6cec36412a215aad2a033cfe259890482be0a1dcb680e81fccc393b2d4069455", true, "mcr.microsoft.com", "dotnet/runtime", null, "sha256:6cec36412a215aad2a033cfe259890482be0a1dcb680e81fccc393b2d4069455", true)] + // Handle both tag and digest + [InlineData("mcr.microsoft.com/dotnet/runtime:6.0@sha256:6cec36412a215aad2a033cfe259890482be0a1dcb680e81fccc393b2d4069455", true, "mcr.microsoft.com", "dotnet/runtime", "6.0", "sha256:6cec36412a215aad2a033cfe259890482be0a1dcb680e81fccc393b2d4069455", true)] + [InlineData("mcr.microsoft.com/dotnet/runtime:6.0", true, "mcr.microsoft.com", "dotnet/runtime", "6.0", null, true)] + [InlineData("mcr.microsoft.com/dotnet/runtime", true, "mcr.microsoft.com", "dotnet/runtime", null, null, true)] + [InlineData("mcr.microsoft.com/", false, null, null, null, null, false)] // no image = nothing resolves // Ports tag along - [InlineData("mcr.microsoft.com:54/dotnet/runtime", true, "mcr.microsoft.com:54", "dotnet/runtime", null, true)] + [InlineData("mcr.microsoft.com:54/dotnet/runtime", true, "mcr.microsoft.com:54", "dotnet/runtime", null, null, true)] // Even if nonsensical - [InlineData("mcr.microsoft.com:0/dotnet/runtime", true, "mcr.microsoft.com:0", "dotnet/runtime", null, true)] + [InlineData("mcr.microsoft.com:0/dotnet/runtime", true, "mcr.microsoft.com:0", "dotnet/runtime", null, null, true)] // We don't allow hosts with missing ports when a port is anticipated - [InlineData("mcr.microsoft.com:/dotnet/runtime", false, null, null, null, false)] + [InlineData("mcr.microsoft.com:/dotnet/runtime", false, null, null, null, null, false)] // Use default registry when no registry specified. - [InlineData("ubuntu:jammy", true, DefaultRegistry, "library/ubuntu", "jammy", false)] - [InlineData("ubuntu/runtime:jammy", true, DefaultRegistry, "ubuntu/runtime", "jammy", false)] + [InlineData("ubuntu:jammy", true, DefaultRegistry, "library/ubuntu", "jammy", null, false)] + [InlineData("ubuntu/runtime:jammy", true, DefaultRegistry, "ubuntu/runtime", "jammy", null, false)] // Alias 'docker.io' to Docker registry. - [InlineData("docker.io/ubuntu:jammy", true, DefaultRegistry, "library/ubuntu", "jammy", true)] - [InlineData("docker.io/ubuntu/runtime:jammy", true, DefaultRegistry, "ubuntu/runtime", "jammy", true)] + [InlineData("docker.io/ubuntu:jammy", true, DefaultRegistry, "library/ubuntu", "jammy", null, true)] + [InlineData("docker.io/ubuntu/runtime:jammy", true, DefaultRegistry, "ubuntu/runtime", "jammy", null, true)] // 'localhost' registry. - [InlineData("localhost/ubuntu:jammy", true, "localhost", "ubuntu", "jammy", true)] - public void TryParseFullyQualifiedContainerName(string fullyQualifiedName, bool expectedReturn, string? expectedRegistry, string? expectedImage, string? expectedTag, bool expectedIsRegistrySpecified) + [InlineData("localhost/ubuntu:jammy", true, "localhost", "ubuntu", "jammy", null, true)] + public void TryParseFullyQualifiedContainerName(string fullyQualifiedName, bool expectedReturn, string? expectedRegistry, string? expectedImage, string? expectedTag, string? expectedDigest, bool expectedIsRegistrySpecified) { Assert.Equal(expectedReturn, ContainerHelpers.TryParseFullyQualifiedContainerName(fullyQualifiedName, out string? containerReg, out string? containerName, out string? containerTag, out string? containerDigest, out bool isRegistrySpecified)); Assert.Equal(expectedRegistry, containerReg); Assert.Equal(expectedImage, containerName); Assert.Equal(expectedTag, containerTag); + Assert.Equal(expectedDigest, containerDigest); Assert.Equal(expectedIsRegistrySpecified, isRegistrySpecified); } From 4ab59c978023d048e6928bcc0bf3743341bb7534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Fri, 10 Jan 2025 11:54:16 -0800 Subject: [PATCH 43/49] Use -e to set env variables (#45844) --- .../DotNetDeltaApplier/StartupHook.cs | 11 -- .../Aspire/AspireServiceFactory.cs | 84 ++++++---- .../dotnet-watch/DotNetWatcher.cs | 2 +- .../EnvironmentVariablesBuilder.cs | 51 ++---- .../EnvironmentVariables_StartupHook.cs | 6 - .../IRuntimeProcessLauncherFactory.cs | 2 +- .../dotnet-watch/HotReload/ProjectLauncher.cs | 48 +++--- .../dotnet-watch/HotReloadDotNetWatcher.cs | 2 +- .../Aspire/AspireServiceFactoryTests.cs | 152 ++++++++++++++++++ ...cs => EnvironmentVariablesBuilderTests.cs} | 22 +-- .../Utilities/TestRuntimeProcessLauncher.cs | 2 +- 11 files changed, 259 insertions(+), 123 deletions(-) create mode 100644 test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs rename test/dotnet-watch.Tests/Internal/{EnvironmentVariablesBuilderTest.cs => EnvironmentVariablesBuilderTests.cs} (53%) diff --git a/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs b/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs index 34e11d46f42c..33d13ed999cf 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs +++ b/src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs @@ -12,7 +12,6 @@ internal sealed class StartupHook { private static readonly bool s_logToStandardOutput = Environment.GetEnvironmentVariable(EnvironmentVariables.Names.HotReloadDeltaClientLogMessages) == "1"; private static readonly string s_namedPipeName = Environment.GetEnvironmentVariable(EnvironmentVariables.Names.DotnetWatchHotReloadNamedPipeName); - private static readonly string s_targetProcessPath = Environment.GetEnvironmentVariable(EnvironmentVariables.Names.DotnetWatchHotReloadTargetProcessPath); /// /// Invoked by the runtime when the containing assembly is listed in DOTNET_STARTUP_HOOKS. @@ -21,16 +20,6 @@ public static void Initialize() { var processPath = Environment.GetCommandLineArgs().FirstOrDefault(); - // Workaround for https://github.com/dotnet/sdk/issues/40484 - // When launching the application process dotnet-watch sets Hot Reload environment variables via CLI environment directives (dotnet [env:X=Y] run). - // Currently, the CLI parser sets the env variables to the dotnet.exe process itself, rather then to the target process. - // This may cause the dotnet.exe process to connect to the named pipe and break it for the target process. - if (!IsMatchingProcess(processPath, s_targetProcessPath)) - { - Log($"Ignoring process '{processPath}', expecting '{s_targetProcessPath}'"); - return; - } - Log($"Loaded into process: {processPath}"); ClearHotReloadEnvironmentVariables(); diff --git a/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs b/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs index d806dd11ba45..158a49274bf6 100644 --- a/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs @@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Watch; internal class AspireServiceFactory : IRuntimeProcessLauncherFactory { - private sealed class SessionManager : IAspireServerEvents, IRuntimeProcessLauncher + internal sealed class SessionManager : IAspireServerEvents, IRuntimeProcessLauncher { private readonly struct Session(string dcpId, string sessionId, RunningProject runningProject, Task outputReader) { @@ -30,7 +30,7 @@ private readonly struct Session(string dcpId, string sessionId, RunningProject r private readonly ProjectLauncher _projectLauncher; private readonly AspireServerService _service; - private readonly IReadOnlyList _buildArguments; + private readonly ProjectOptions _hostProjectOptions; /// /// Lock to access: @@ -43,10 +43,10 @@ private readonly struct Session(string dcpId, string sessionId, RunningProject r private int _sessionIdDispenser; private volatile bool _isDisposed; - public SessionManager(ProjectLauncher projectLauncher, IReadOnlyList buildArguments) + public SessionManager(ProjectLauncher projectLauncher, ProjectOptions hostProjectOptions) { _projectLauncher = projectLauncher; - _buildArguments = buildArguments; + _hostProjectOptions = hostProjectOptions; _service = new AspireServerService( this, @@ -204,44 +204,64 @@ private async ValueTask TerminateSessionAsync(Session session, CancellationToken } private ProjectOptions GetProjectOptions(ProjectLaunchRequest projectLaunchInfo) + { + var hostLaunchProfile = _hostProjectOptions.NoLaunchProfile ? null : _hostProjectOptions.LaunchProfileName; + + return new() + { + IsRootProject = false, + ProjectPath = projectLaunchInfo.ProjectPath, + WorkingDirectory = _projectLauncher.EnvironmentOptions.WorkingDirectory, + BuildArguments = _hostProjectOptions.BuildArguments, + Command = "run", + CommandArguments = GetRunCommandArguments(projectLaunchInfo, hostLaunchProfile), + LaunchEnvironmentVariables = projectLaunchInfo.Environment?.Select(e => (e.Key, e.Value))?.ToArray() ?? [], + LaunchProfileName = projectLaunchInfo.LaunchProfile, + NoLaunchProfile = projectLaunchInfo.DisableLaunchProfile, + TargetFramework = _hostProjectOptions.TargetFramework, + }; + } + + // internal for testing + internal static IReadOnlyList GetRunCommandArguments(ProjectLaunchRequest projectLaunchInfo, string? hostLaunchProfile) { var arguments = new List { "--project", projectLaunchInfo.ProjectPath, - // TODO: https://github.com/dotnet/sdk/issues/43946 - // Need to suppress launch profile for now, otherwise it would override the port set via env variable. - "--no-launch-profile", }; - //if (projectLaunchInfo.DisableLaunchProfile) - //{ - // arguments.Add("--no-launch-profile"); - //} - //else if (!string.IsNullOrEmpty(projectLaunchInfo.LaunchProfile)) - //{ - // arguments.Add("--launch-profile"); - // arguments.Add(projectLaunchInfo.LaunchProfile); - //} + // Implements https://github.com/dotnet/aspire/blob/main/docs/specs/IDE-execution.md#launch-profile-processing-project-launch-configuration - if (projectLaunchInfo.Arguments != null) + if (projectLaunchInfo.DisableLaunchProfile) + { + arguments.Add("--no-launch-profile"); + } + else if (!string.IsNullOrEmpty(projectLaunchInfo.LaunchProfile)) { - arguments.AddRange(projectLaunchInfo.Arguments); + arguments.Add("--launch-profile"); + arguments.Add(projectLaunchInfo.LaunchProfile); + } + else if (hostLaunchProfile != null) + { + arguments.Add("--launch-profile"); + arguments.Add(hostLaunchProfile); } - return new() + if (projectLaunchInfo.Arguments != null) { - IsRootProject = false, - ProjectPath = projectLaunchInfo.ProjectPath, - WorkingDirectory = _projectLauncher.EnvironmentOptions.WorkingDirectory, // TODO: Should DCP protocol specify? - BuildArguments = _buildArguments, // TODO: Should DCP protocol specify? - Command = "run", - CommandArguments = arguments, - LaunchEnvironmentVariables = projectLaunchInfo.Environment?.Select(kvp => (kvp.Key, kvp.Value)).ToArray() ?? [], - LaunchProfileName = projectLaunchInfo.LaunchProfile, - NoLaunchProfile = projectLaunchInfo.DisableLaunchProfile, - TargetFramework = null, // TODO: Should DCP protocol specify? - }; + if (projectLaunchInfo.Arguments.Any()) + { + arguments.AddRange(projectLaunchInfo.Arguments); + } + else + { + // indicate that no arguments should be used even if launch profile specifies some: + arguments.Add("--no-launch-profile-arguments"); + } + } + + return arguments; } } @@ -250,8 +270,8 @@ private ProjectOptions GetProjectOptions(ProjectLaunchRequest projectLaunchInfo) public static readonly AspireServiceFactory Instance = new(); public const string AppHostProjectCapability = "Aspire"; - public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList buildArguments) + public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, ProjectOptions hostProjectOptions) => projectNode.GetCapabilities().Contains(AppHostProjectCapability) - ? new SessionManager(projectLauncher, buildArguments) + ? new SessionManager(projectLauncher, hostProjectOptions) : null; } diff --git a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs index 321ad2924813..8977641435c9 100644 --- a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs @@ -65,7 +65,7 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke ? await browserConnector.LaunchOrRefreshBrowserAsync(projectRootNode, processSpec, environmentBuilder, Context.RootProjectOptions, shutdownCancellationToken) : null; - environmentBuilder.ConfigureProcess(processSpec); + environmentBuilder.SetProcessEnvironmentVariables(processSpec); // Reset for next run buildEvaluator.RequiresRevaluation = false; diff --git a/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs b/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs index aec5634a4acf..987e9910ab31 100644 --- a/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs +++ b/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs @@ -18,13 +18,6 @@ internal sealed class EnvironmentVariablesBuilder /// private readonly Dictionary _variables = []; - /// - /// Environment variables passed as directives on command line (dotnet [env:name=value] run). - /// Currently, the effect is the same as setting due to - /// https://github.com/dotnet/sdk/issues/40484 - /// - private readonly Dictionary _directives = []; - public static EnvironmentVariablesBuilder FromCurrentEnvironment() { var builder = new EnvironmentVariablesBuilder(); @@ -42,57 +35,39 @@ public static EnvironmentVariablesBuilder FromCurrentEnvironment() return builder; } - public void SetDirective(string name, string value) - { - // should use DotNetStartupHookDirective - Debug.Assert(!name.Equals(EnvironmentVariables.Names.DotnetStartupHooks, StringComparison.OrdinalIgnoreCase)); - - _directives[name] = value; - } - public void SetVariable(string name, string value) { - // should use AspNetCoreHostingStartupAssembliesVariable + // should use AspNetCoreHostingStartupAssembliesVariable/DotNetStartupHookDirective Debug.Assert(!name.Equals(EnvironmentVariables.Names.AspNetCoreHostingStartupAssemblies, StringComparison.OrdinalIgnoreCase)); + Debug.Assert(!name.Equals(EnvironmentVariables.Names.DotnetStartupHooks, StringComparison.OrdinalIgnoreCase)); _variables[name] = value; } - public void ConfigureProcess(ProcessSpec processSpec) + public void SetProcessEnvironmentVariables(ProcessSpec processSpec) { - processSpec.Arguments = [.. GetCommandLineDirectives(), .. processSpec.Arguments ?? []]; - AddToEnvironment(processSpec.EnvironmentVariables); - } - - // for testing - internal void AddToEnvironment(Dictionary variables) - { - foreach (var (name, value) in _variables) - { - variables.Add(name, value); - } - - if (AspNetCoreHostingStartupAssembliesVariable is not []) + foreach (var (name, value) in GetEnvironment()) { - variables.Add(EnvironmentVariables.Names.AspNetCoreHostingStartupAssemblies, string.Join(AssembliesSeparator, AspNetCoreHostingStartupAssembliesVariable)); + processSpec.EnvironmentVariables.Add(name, value); } } - // for testing - internal IEnumerable GetCommandLineDirectives() + public IEnumerable<(string name, string value)> GetEnvironment() { - foreach (var (name, value) in _directives) + foreach (var (name, value) in _variables) { - yield return MakeDirective(name, value); + yield return (name, value); } if (DotNetStartupHookDirective is not []) { - yield return MakeDirective(EnvironmentVariables.Names.DotnetStartupHooks, string.Join(s_startupHooksSeparator, DotNetStartupHookDirective)); + yield return (EnvironmentVariables.Names.DotnetStartupHooks, string.Join(s_startupHooksSeparator, DotNetStartupHookDirective)); } - static string MakeDirective(string name, string value) - => $"[env:{name}={value}]"; + if (AspNetCoreHostingStartupAssembliesVariable is not []) + { + yield return (EnvironmentVariables.Names.AspNetCoreHostingStartupAssemblies, string.Join(AssembliesSeparator, AspNetCoreHostingStartupAssembliesVariable)); + } } } } diff --git a/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs b/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs index 6a9191c1dab7..7804e4b358fb 100644 --- a/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs +++ b/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs @@ -13,12 +13,6 @@ public static partial class Names /// public const string DotnetWatchHotReloadNamedPipeName = "DOTNET_WATCH_HOTRELOAD_NAMEDPIPE_NAME"; - /// - /// The full path to the process being launched by dotnet run. - /// Workaround for https://github.com/dotnet/sdk/issues/40484 - /// - public const string DotnetWatchHotReloadTargetProcessPath = "DOTNET_WATCH_HOTRELOAD_TARGET_PROCESS_PATH"; - /// /// Enables logging from the client delta applier agent. /// diff --git a/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs b/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs index 431e79830ae3..93d69f69db59 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs @@ -12,5 +12,5 @@ namespace Microsoft.DotNet.Watch; /// internal interface IRuntimeProcessLauncherFactory { - public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList buildArguments); + public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, ProjectOptions hostProjectOptions); } diff --git a/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs b/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs index 46a33b2b301d..4befce53dc52 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.Globalization; using Microsoft.Build.Graph; @@ -53,17 +54,12 @@ public EnvironmentOptions EnvironmentOptions { Executable = EnvironmentOptions.MuxerPath, WorkingDirectory = projectOptions.WorkingDirectory, - OnOutput = onOutput, - Arguments = [projectOptions.Command, "--no-build", .. projectOptions.CommandArguments] + OnOutput = onOutput }; var environmentBuilder = EnvironmentVariablesBuilder.FromCurrentEnvironment(); var namedPipeName = Guid.NewGuid().ToString(); - // Directives: - - // Variables: - foreach (var (name, value) in projectOptions.LaunchEnvironmentVariables) { // ignore dotnet-watch reserved variables -- these shouldn't be set by the project @@ -85,30 +81,36 @@ public EnvironmentOptions EnvironmentOptions // expect DOTNET_MODIFIABLE_ASSEMBLIES to be set in the blazor-devserver process, even though we are not performing Hot Reload in this process. // The value is converted to DOTNET-MODIFIABLE-ASSEMBLIES header, which is in turn converted back to environment variable in Mono browser runtime loader: // https://github.com/dotnet/runtime/blob/342936c5a88653f0f622e9d6cb727a0e59279b31/src/mono/browser/runtime/loader/config.ts#L330 - environmentBuilder.SetDirective(EnvironmentVariables.Names.DotnetModifiableAssemblies, "debug"); + environmentBuilder.SetVariable(EnvironmentVariables.Names.DotnetModifiableAssemblies, "debug"); if (injectDeltaApplier) { environmentBuilder.DotNetStartupHookDirective.Add(DeltaApplier.StartupHookPath); - environmentBuilder.SetDirective(EnvironmentVariables.Names.DotnetWatchHotReloadNamedPipeName, namedPipeName); - - // Do not ask agent to log to stdout until https://github.com/dotnet/sdk/issues/40484 is fixed. - // For now we need to set the env variable explicitly when we need to diagnose issue with the agent. - // Build targets might launch a process and read it's stdout. If the agent is loaded into such process and starts logging - // to stdout it might interfere with the expected output. - //if (context.Options.Verbose) - //{ - // environmentBuilder.SetVariable(EnvironmentVariables.Names.HotReloadDeltaClientLogMessages, "1"); - //} - - // TODO: workaround for https://github.com/dotnet/sdk/issues/40484 - var targetPath = projectNode.ProjectInstance.GetPropertyValue("RunCommand"); - environmentBuilder.SetVariable(EnvironmentVariables.Names.DotnetWatchHotReloadTargetProcessPath, targetPath); - Reporter.Verbose($"Target process is '{targetPath}'"); + environmentBuilder.SetVariable(EnvironmentVariables.Names.DotnetWatchHotReloadNamedPipeName, namedPipeName); + + if (context.Options.Verbose) + { + environmentBuilder.SetVariable(EnvironmentVariables.Names.HotReloadDeltaClientLogMessages, "1"); + } } var browserRefreshServer = await browserConnector.LaunchOrRefreshBrowserAsync(projectNode, processSpec, environmentBuilder, projectOptions, cancellationToken); - environmentBuilder.ConfigureProcess(processSpec); + + var arguments = new List() + { + projectOptions.Command, + "--no-build" + }; + + foreach (var (name, value) in environmentBuilder.GetEnvironment()) + { + arguments.Add("-e"); + arguments.Add($"{name}={value}"); + } + + arguments.AddRange(projectOptions.CommandArguments); + + processSpec.Arguments = arguments; var processReporter = new ProjectSpecificReporter(projectNode, Reporter); diff --git a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs index 4402c1fbf742..563fb89fc7f8 100644 --- a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs @@ -111,7 +111,7 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke var rootProjectNode = evaluationResult.ProjectGraph.GraphRoots.Single(); - runtimeProcessLauncher = runtimeProcessLauncherFactory?.TryCreate(rootProjectNode, projectLauncher, rootProjectOptions.BuildArguments); + runtimeProcessLauncher = runtimeProcessLauncherFactory?.TryCreate(rootProjectNode, projectLauncher, rootProjectOptions); if (runtimeProcessLauncher != null) { var launcherEnvironment = runtimeProcessLauncher.GetEnvironmentVariables(); diff --git a/test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs b/test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs new file mode 100644 index 000000000000..084fcf8844a3 --- /dev/null +++ b/test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs @@ -0,0 +1,152 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#nullable enable + +using Aspire.Tools.Service; + +namespace Microsoft.DotNet.Watch.UnitTests; + +public class AspireServiceFactoryTests +{ + [Fact] + public void GetRunCommandArguments_Empty() + { + var request = new ProjectLaunchRequest() + { + Arguments = null, + DisableLaunchProfile = false, + LaunchProfile = null, + Environment = null, + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: null); + + AssertEx.SequenceEqual(["--project", "a.csproj"], args); + } + + [Fact] + public void GetRunCommandArguments_DisableLaunchProfile() + { + var request = new ProjectLaunchRequest() + { + Arguments = null, + DisableLaunchProfile = true, + LaunchProfile = "P", + Environment = [], + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: "H"); + + AssertEx.SequenceEqual(["--project", "a.csproj", "--no-launch-profile" ], args); + } + + [Theory] + [InlineData("")] + [InlineData(null)] + public void GetRunCommandArguments_NoLaunchProfile_HostProfile(string? launchProfile) + { + var request = new ProjectLaunchRequest() + { + Arguments = null, + DisableLaunchProfile = false, + LaunchProfile = launchProfile, + Environment = [], + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: "H"); + + AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "H"], args); + } + + [Theory] + [InlineData("")] + [InlineData(null)] + public void GetRunCommandArguments_DisableLaunchProfile_HostProfile(string? launchProfile) + { + var request = new ProjectLaunchRequest() + { + Arguments = null, + DisableLaunchProfile = true, + LaunchProfile = launchProfile, + Environment = [], + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: "H"); + + AssertEx.SequenceEqual(["--project", "a.csproj", "--no-launch-profile"], args); + } + + [Theory] + [InlineData("")] + [InlineData(null)] + public void GetRunCommandArguments_NoLaunchProfile_NoHostProfile(string? launchProfile) + { + var request = new ProjectLaunchRequest() + { + Arguments = null, + DisableLaunchProfile = false, + LaunchProfile = launchProfile, + Environment = [], + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: null); + + AssertEx.SequenceEqual(["--project", "a.csproj"], args); + } + [Fact] + public void GetRunCommandArguments_LaunchProfile_NoArgs() + { + var request = new ProjectLaunchRequest() + { + Arguments = null, + DisableLaunchProfile = false, + LaunchProfile = "P", + Environment = [], + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: "H"); + + AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "P"], args); + } + + [Fact] + public void GetRunCommandArguments_LaunchProfile_EmptyArgs() + { + var request = new ProjectLaunchRequest() + { + Arguments = [], + DisableLaunchProfile = false, + LaunchProfile = "P", + Environment = [], + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: "H"); + + AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "P", "--no-launch-profile-arguments"], args); + } + + [Fact] + public void GetRunCommandArguments_LaunchProfile_NonEmptyArgs() + { + var request = new ProjectLaunchRequest() + { + Arguments = ["a", "b"], + DisableLaunchProfile = false, + LaunchProfile = "P", + Environment = [], + ProjectPath = "a.csproj" + }; + + var args = AspireServiceFactory.SessionManager.GetRunCommandArguments(request, hostLaunchProfile: "H"); + + AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "P", "a", "b"], args); + } +} diff --git a/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTest.cs b/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTests.cs similarity index 53% rename from test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTest.cs rename to test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTests.cs index 75941f6762a6..b9b4b29ccce1 100644 --- a/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTest.cs +++ b/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTests.cs @@ -3,7 +3,7 @@ namespace Microsoft.DotNet.Watch.UnitTests { - public class EnvironmentVariablesBuilderTest + public class EnvironmentVariablesBuilderTests { [Fact] public void Value() @@ -12,10 +12,12 @@ public void Value() builder.DotNetStartupHookDirective.Add("a"); builder.AspNetCoreHostingStartupAssembliesVariable.Add("b"); - var values = new Dictionary(); - builder.AddToEnvironment(values); - AssertEx.SequenceEqual(["[env:DOTNET_STARTUP_HOOKS=a]"], builder.GetCommandLineDirectives()); - AssertEx.SequenceEqual([("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", "b")], values.Select(e => (e.Key, e.Value))); + var env = builder.GetEnvironment(); + AssertEx.SequenceEqual( + [ + ("DOTNET_STARTUP_HOOKS", "a"), + ("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", "b") + ], env); } [Fact] @@ -27,10 +29,12 @@ public void MultipleValues() builder.AspNetCoreHostingStartupAssembliesVariable.Add("b1"); builder.AspNetCoreHostingStartupAssembliesVariable.Add("b2"); - var values = new Dictionary(); - builder.AddToEnvironment(values); - AssertEx.SequenceEqual([$"[env:DOTNET_STARTUP_HOOKS=a1{Path.PathSeparator}a2]"], builder.GetCommandLineDirectives()); - AssertEx.SequenceEqual([("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", "b1;b2")], values.Select(e => (e.Key, e.Value))); + var env = builder.GetEnvironment(); + AssertEx.SequenceEqual( + [ + ("DOTNET_STARTUP_HOOKS", $"a1{Path.PathSeparator}a2"), + ("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", "b1;b2") + ], env); } } } diff --git a/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs b/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs index b4714791cc86..c10d2291f512 100644 --- a/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs +++ b/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs @@ -11,7 +11,7 @@ internal class TestRuntimeProcessLauncher(ProjectLauncher projectLauncher) : IRu { public class Factory(Action? initialize = null) : IRuntimeProcessLauncherFactory { - public IRuntimeProcessLauncher TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList buildArguments) + public IRuntimeProcessLauncher TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, ProjectOptions hostProjectOptions) { var service = new TestRuntimeProcessLauncher(projectLauncher); initialize?.Invoke(service); From fd19bf8ffeb2184ff327db155d460679df8ac1ec Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:02:29 -0800 Subject: [PATCH 44/49] Make assembly version logic more robust Fixes #44042 (#45518) Fixes #44042 Replaces the way we look for assembly version. --- .../DependencyContextBuilder.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs b/src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs index 1f1c4c4a14d8..055ff35383d8 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs @@ -537,12 +537,10 @@ private RuntimeLibrary GetRuntimeLibrary(DependencyLibrary library, string[] use { var fileName = Path.GetFileNameWithoutExtension(library.Path); var assemblyPath = userRuntimeAssemblies?.FirstOrDefault(p => Path.GetFileNameWithoutExtension(p).Equals(fileName)); - runtimeAssemblyGroups.Add(new RuntimeAssetGroup(string.Empty, - [ new RuntimeFile( - referenceProjectInfo.OutputName, - library.Version.ToString(), - assemblyPath is null || !File.Exists(assemblyPath) ? string.Empty : FileVersionInfo.GetVersionInfo(assemblyPath).FileVersion) - ])); + var runtimeFile = !string.IsNullOrWhiteSpace(assemblyPath) && File.Exists(assemblyPath) ? CreateRuntimeFile(referenceProjectInfo.OutputName, assemblyPath) : + !string.IsNullOrWhiteSpace(library.Path) && File.Exists(library.Path) ? CreateRuntimeFile(referenceProjectInfo.OutputName, library.Path) : + new RuntimeFile(referenceProjectInfo.OutputName, string.Empty, string.Empty); + runtimeAssemblyGroups.Add(new RuntimeAssetGroup(string.Empty, [runtimeFile])); resourceAssemblies.AddRange(referenceProjectInfo.ResourceAssemblies .Select(r => new ResourceAssembly(r.RelativePath, r.Culture))); From ad31c6178cc1c179334f92eb9c3f4b2e81fbdda5 Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:03:11 -0800 Subject: [PATCH 45/49] Skip experimental in recommending workloads (#45767) We've had issues around (heuristically) finding the appropriate workloads to recommend that the user install if they're missing packs. This should help in that it will avoid recommending experimental workloads if there are any other options. I don't feel too attached to this PR. --- .../WorkloadSuggestionFinder.cs | 3 +++ test/Microsoft.NET.Build.Tests/WorkloadTests.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSuggestionFinder.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSuggestionFinder.cs index 85ed48aacda5..46b7a7ac96b2 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSuggestionFinder.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSuggestionFinder.cs @@ -187,6 +187,7 @@ private static T FindBest(IEnumerable values, params Comparison[] compa internal static WorkloadSuggestion GetBestSuggestion(ICollection suggestions) => FindBest( suggestions, + (x, y) => ContainsExperimental(y.Workloads) - ContainsExperimental(x.Workloads), (x, y) => y.ExtraPacks - x.ExtraPacks, (x, y) => y.Workloads.Count - x.Workloads.Count); @@ -195,6 +196,8 @@ internal static WorkloadSuggestion GetBestSuggestion(ICollection public WorkloadSuggestion GetBestSuggestion() => GetBestSuggestion(UnsortedSuggestions); + private static int ContainsExperimental(HashSet set) => set.Any(w => w.ToString().Contains("experimental")) ? 1 : 0; + /// /// A partial or complete suggestion for workloads to install, annotated with which requested packs it does not satisfy /// diff --git a/test/Microsoft.NET.Build.Tests/WorkloadTests.cs b/test/Microsoft.NET.Build.Tests/WorkloadTests.cs index 7526c08d0353..e578885d1e59 100644 --- a/test/Microsoft.NET.Build.Tests/WorkloadTests.cs +++ b/test/Microsoft.NET.Build.Tests/WorkloadTests.cs @@ -315,7 +315,7 @@ public void Given_multi_target_It_should_get_suggested_workload_by_GetRequiredWo // Conditionally check the OS and modify the expected workloads on Linux if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { - expected = "android;wasi-experimental"; + expected = "android;wasm-tools"; } getValuesCommand.GetValues() From a84f7d8b5dd282d38c7b4161a5454c453c7405e9 Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:21:58 -0800 Subject: [PATCH 46/49] Support package@version syntax in dotnet new install, partial fix for #45422 (#45545) Progress towards #45422 This adds support for package@version syntax without removing support for package::version syntax. I'll add a follow-up PR in main to add a warning, and then we can remove support for package::version syntax in .NET 11. --- .../TemplatePackageCoordinator.cs | 6 +++--- test/dotnet-new.Tests/DotnetNewInstallTests.cs | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs index b4dda2fd7a46..07235e262599 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs @@ -208,9 +208,9 @@ internal async Task EnterInstallFlowAsync(InstallCommandArgs a foreach (string installArg in args.TemplatePackages) { - string[] splitByColons = installArg.Split(new[] { "::" }, StringSplitOptions.RemoveEmptyEntries); - string identifier = splitByColons[0]; - string? version = splitByColons.Length > 1 ? splitByColons[1] : null; + string[] split = installArg.Split(["::"], StringSplitOptions.RemoveEmptyEntries).SelectMany(arg => arg.Split('@', StringSplitOptions.RemoveEmptyEntries)).ToArray(); + string identifier = split[0]; + string? version = split.Length > 1 ? split[1] : null; foreach (string expandedIdentifier in InstallRequestPathResolution.ExpandMaskedPath(identifier, _engineEnvironmentSettings)) { installRequests.Add(new InstallRequest(expandedIdentifier, version, details: details, force: args.Force)); diff --git a/test/dotnet-new.Tests/DotnetNewInstallTests.cs b/test/dotnet-new.Tests/DotnetNewInstallTests.cs index 2ebcaff0bb44..9f515bfffb10 100644 --- a/test/dotnet-new.Tests/DotnetNewInstallTests.cs +++ b/test/dotnet-new.Tests/DotnetNewInstallTests.cs @@ -42,21 +42,22 @@ public void CanInstallRemoteNuGetPackage(string commandName) } [Theory] - [InlineData("-i")] - [InlineData("install")] - public void CanInstallRemoteNuGetPackage_LatestVariations(string commandName) + [InlineData("::")] + [InlineData("@")] + public void CanInstallRemoteNuGetPackage_LatestVariations(string separator) { + var commandName = "install"; CommandResult command1 = new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0") .WithCustomHive(CreateTemporaryFolder(folderName: "Home")) .WithWorkingDirectory(CreateTemporaryFolder()) .Execute(); - CommandResult command2 = new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0::") + CommandResult command2 = new DotnetNewCommand(_log, commandName, $"Microsoft.DotNet.Common.ProjectTemplates.5.0{separator}") .WithCustomHive(CreateTemporaryFolder(folderName: "Home")) .WithWorkingDirectory(CreateTemporaryFolder()) .Execute(); - CommandResult command3 = new DotnetNewCommand(_log, commandName, "Microsoft.DotNet.Common.ProjectTemplates.5.0::*") + CommandResult command3 = new DotnetNewCommand(_log, commandName, $"Microsoft.DotNet.Common.ProjectTemplates.5.0{separator}*") .WithCustomHive(CreateTemporaryFolder(folderName: "Home")) .WithWorkingDirectory(CreateTemporaryFolder()) .Execute(); From 700232104117b6225b6d73edc56a7b87af4fc324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Fri, 10 Jan 2025 16:17:58 -0800 Subject: [PATCH 47/49] [dotnet-watch] Microsoft.DotNet.HotReload.Agent.PipeRpc source package (#45603) --- Directory.Packages.props | 3 + eng/Versions.props | 14 + sdk.sln | 13 + ...osoft.Extensions.DotNetDeltaApplier.csproj | 4 +- .../DotNetDeltaApplier/StartupHook.cs | 28 +- ...Net.HotReload.Agent.PipeRpc.Package.csproj | 42 ++ ...t.DotNet.HotReload.Agent.PipeRpc.projitems | 14 + ...soft.DotNet.HotReload.Agent.PipeRpc.shproj | 13 + .../NamedPipeContract.cs | 189 ++++++++ .../StreamExtensions.cs | 274 +++++++++++ .../HotReloadAgent/HotReloadAgent.cs | 5 +- .../HotReloadAgent/UpdateDelta.cs | 2 +- src/BuiltInTools/dotnet-watch.slnf | 2 + .../HotReload/DefaultDeltaApplier.cs | 54 +-- .../HotReload/NamedPipeContract.cs | 431 ------------------ .../dotnet-watch/dotnet-watch.csproj | 33 +- ...ts.cs => ManagedCodeUpdateRequestTests.cs} | 12 +- ...ts.cs => StaticAssetUpdateRequestTests.cs} | 8 +- .../StreamExtensionsTests.cs | 2 + 19 files changed, 623 insertions(+), 520 deletions(-) create mode 100644 src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.Package.csproj create mode 100644 src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.projitems create mode 100644 src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.shproj create mode 100644 src/BuiltInTools/HotReloadAgent.PipeRpc/NamedPipeContract.cs create mode 100644 src/BuiltInTools/HotReloadAgent.PipeRpc/StreamExtensions.cs delete mode 100644 src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs rename test/Microsoft.Extensions.DotNetDeltaApplier.Tests/{UpdatePayloadTests.cs => ManagedCodeUpdateRequestTests.cs} (83%) rename test/Microsoft.Extensions.DotNetDeltaApplier.Tests/{StaticAssetPayloadTests.cs => StaticAssetUpdateRequestTests.cs} (75%) diff --git a/Directory.Packages.props b/Directory.Packages.props index 56a142d50169..b260580f27b4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -91,6 +91,9 @@ + + + diff --git a/eng/Versions.props b/eng/Versions.props index 3ec019ba0a4a..c4747b15ad47 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -282,6 +282,20 @@ 9.0.0-beta.24617.1 9.0.0-beta.24617.1 + + + 4.6.0 + 4.6.0 + 4.6.0 + + + 4.5.1 + 4.5.5 + 4.5.4 + true diff --git a/sdk.sln b/sdk.sln index 52840d8fce54..f28d6d6437ef 100644 --- a/sdk.sln +++ b/sdk.sln @@ -516,6 +516,10 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.DotNet.HotReload. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.HotReload.Agent.Package", "src\BuiltInTools\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.Package.csproj", "{2FF79F82-60C1-349A-4726-7783D5A6D5DF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.HotReload.Agent.PipeRpc.Package", "src\BuiltInTools\HotReloadAgent.PipeRpc\Microsoft.DotNet.HotReload.Agent.PipeRpc.Package.csproj", "{692B71D8-9C31-D1EE-6C1B-570A12B18E39}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.DotNet.HotReload.Agent.PipeRpc", "src\BuiltInTools\HotReloadAgent.PipeRpc\Microsoft.DotNet.HotReload.Agent.PipeRpc.shproj", "{FA3C7F91-42A2-45AD-897C-F646B081016C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -982,6 +986,10 @@ Global {2FF79F82-60C1-349A-4726-7783D5A6D5DF}.Debug|Any CPU.Build.0 = Debug|Any CPU {2FF79F82-60C1-349A-4726-7783D5A6D5DF}.Release|Any CPU.ActiveCfg = Release|Any CPU {2FF79F82-60C1-349A-4726-7783D5A6D5DF}.Release|Any CPU.Build.0 = Release|Any CPU + {692B71D8-9C31-D1EE-6C1B-570A12B18E39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {692B71D8-9C31-D1EE-6C1B-570A12B18E39}.Debug|Any CPU.Build.0 = Debug|Any CPU + {692B71D8-9C31-D1EE-6C1B-570A12B18E39}.Release|Any CPU.ActiveCfg = Release|Any CPU + {692B71D8-9C31-D1EE-6C1B-570A12B18E39}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1163,6 +1171,8 @@ Global {1F0B4B3C-DC88-4740-B04F-1707102E9930} = {580D1AE7-AA8F-4912-8B76-105594E00B3B} {418B10BD-CA42-49F3-8F4A-D8CC90C8A17D} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} {2FF79F82-60C1-349A-4726-7783D5A6D5DF} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} + {692B71D8-9C31-D1EE-6C1B-570A12B18E39} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} + {FA3C7F91-42A2-45AD-897C-F646B081016C} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FB8F26CE-4DE6-433F-B32A-79183020BBD6} @@ -1170,12 +1180,15 @@ Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.projitems*{03c5a84a-982b-4f38-ac73-ab832c645c4a}*SharedItemsImports = 5 src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.projitems*{0a3c9afd-f6e6-4a5d-83fb-93bf66732696}*SharedItemsImports = 5 + src\BuiltInTools\HotReloadAgent.PipeRpc\Microsoft.DotNet.HotReload.Agent.PipeRpc.projitems*{1bbfa19c-03f0-4d27-9d0d-0f8172642107}*SharedItemsImports = 5 src\BuiltInTools\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.projitems*{1bbfa19c-03f0-4d27-9d0d-0f8172642107}*SharedItemsImports = 5 src\BuiltInTools\AspireService\Microsoft.WebTools.AspireService.projitems*{1f0b4b3c-dc88-4740-b04f-1707102e9930}*SharedItemsImports = 5 src\BuiltInTools\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.projitems*{418b10bd-ca42-49f3-8f4a-d8cc90c8a17d}*SharedItemsImports = 13 src\BuiltInTools\AspireService\Microsoft.WebTools.AspireService.projitems*{445efbd5-6730-4f09-943d-278e77501ffd}*SharedItemsImports = 5 + src\BuiltInTools\HotReloadAgent.PipeRpc\Microsoft.DotNet.HotReload.Agent.PipeRpc.projitems*{445efbd5-6730-4f09-943d-278e77501ffd}*SharedItemsImports = 5 src\BuiltInTools\AspireService\Microsoft.WebTools.AspireService.projitems*{94c8526e-dcc2-442f-9868-3dd0ba2688be}*SharedItemsImports = 13 src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.projitems*{9d36039f-d0a1-462f-85b4-81763c6b02cb}*SharedItemsImports = 13 src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.projitems*{a9103b98-d888-4260-8a05-fa36f640698a}*SharedItemsImports = 5 + src\BuiltInTools\HotReloadAgent.PipeRpc\Microsoft.DotNet.HotReload.Agent.PipeRpc.projitems*{fa3c7f91-42a2-45ad-897c-f646b081016c}*SharedItemsImports = 13 EndGlobalSection EndGlobal diff --git a/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj b/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj index c59a80a6e1c1..4066a9794d98 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj +++ b/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj @@ -1,5 +1,6 @@  + + netstandard2.0 + false + none + false + enable + preview + + + true + true + Microsoft.DotNet.HotReload.Agent.PipeRpc + false + + Package containing sources of Hot Reload agent pipe RPC. + + + $(NoWarn);NU5128 + + + + + + + + + + + + + + + + + + + + diff --git a/src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.projitems b/src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.projitems new file mode 100644 index 000000000000..f1969e528c57 --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.projitems @@ -0,0 +1,14 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + {FA3C7F91-42A2-45AD-897C-F646B081016C} + + + Microsoft.DotNet.HotReload + + + + + \ No newline at end of file diff --git a/src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.shproj b/src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.shproj new file mode 100644 index 000000000000..cf55004689ca --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent.PipeRpc/Microsoft.DotNet.HotReload.Agent.PipeRpc.shproj @@ -0,0 +1,13 @@ + + + + FA3C7F91-42A2-45AD-897C-F646B081016C + 14.0 + + + + + + + + \ No newline at end of file diff --git a/src/BuiltInTools/HotReloadAgent.PipeRpc/NamedPipeContract.cs b/src/BuiltInTools/HotReloadAgent.PipeRpc/NamedPipeContract.cs new file mode 100644 index 000000000000..a0ff1ccc7def --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent.PipeRpc/NamedPipeContract.cs @@ -0,0 +1,189 @@ +// 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.IO; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.HotReload; + +internal interface IRequest +{ + ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken); +} + +internal enum RequestType +{ + ManagedCodeUpdate = 1, + StaticAssetUpdate = 2, + InitialUpdatesCompleted = 3, +} + +internal readonly struct ManagedCodeUpdateRequest(IReadOnlyList deltas, ResponseLoggingLevel responseLoggingLevel) : IRequest +{ + private const byte Version = 4; + + public IReadOnlyList Deltas { get; } = deltas; + public ResponseLoggingLevel ResponseLoggingLevel { get; } = responseLoggingLevel; + + /// + /// Called by the dotnet-watch. + /// + public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) + { + await stream.WriteAsync(Version, cancellationToken); + await stream.WriteAsync(Deltas.Count, cancellationToken); + + foreach (var delta in Deltas) + { + await stream.WriteAsync(delta.ModuleId, cancellationToken); + await stream.WriteByteArrayAsync(delta.MetadataDelta, cancellationToken); + await stream.WriteByteArrayAsync(delta.ILDelta, cancellationToken); + await stream.WriteByteArrayAsync(delta.PdbDelta, cancellationToken); + await stream.WriteAsync(delta.UpdatedTypes, cancellationToken); + } + + await stream.WriteAsync((byte)ResponseLoggingLevel, cancellationToken); + } + + /// + /// Called by delta applier. + /// + public static async ValueTask ReadAsync(Stream stream, CancellationToken cancellationToken) + { + var version = await stream.ReadByteAsync(cancellationToken); + if (version != Version) + { + throw new NotSupportedException($"Unsupported version {version}."); + } + + var count = await stream.ReadInt32Async(cancellationToken); + + var deltas = new UpdateDelta[count]; + for (var i = 0; i < count; i++) + { + var moduleId = await stream.ReadGuidAsync(cancellationToken); + var metadataDelta = await stream.ReadByteArrayAsync(cancellationToken); + var ilDelta = await stream.ReadByteArrayAsync(cancellationToken); + var pdbDelta = await stream.ReadByteArrayAsync(cancellationToken); + var updatedTypes = await stream.ReadIntArrayAsync(cancellationToken); + + deltas[i] = new UpdateDelta(moduleId, metadataDelta: metadataDelta, ilDelta: ilDelta, pdbDelta: pdbDelta, updatedTypes); + } + + var responseLoggingLevel = (ResponseLoggingLevel)await stream.ReadByteAsync(cancellationToken); + return new ManagedCodeUpdateRequest(deltas, responseLoggingLevel: responseLoggingLevel); + } +} + +internal readonly struct UpdateResponse(IReadOnlyCollection<(string message, AgentMessageSeverity severity)> log, bool success) +{ + public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) + { + await stream.WriteAsync(success, cancellationToken); + await stream.WriteAsync(log.Count, cancellationToken); + + foreach (var (message, severity) in log) + { + await stream.WriteAsync(message, cancellationToken); + await stream.WriteAsync((byte)severity, cancellationToken); + } + } + + public static async ValueTask<(bool success, IAsyncEnumerable<(string message, AgentMessageSeverity severity)>)> ReadAsync( + Stream stream, CancellationToken cancellationToken) + { + var success = await stream.ReadBooleanAsync(cancellationToken); + var log = ReadLogAsync(cancellationToken); + return (success, log); + + async IAsyncEnumerable<(string message, AgentMessageSeverity severity)> ReadLogAsync([EnumeratorCancellation] CancellationToken cancellationToken) + { + var entryCount = await stream.ReadInt32Async(cancellationToken); + + for (var i = 0; i < entryCount; i++) + { + var message = await stream.ReadStringAsync(cancellationToken); + var severity = (AgentMessageSeverity)await stream.ReadByteAsync(cancellationToken); + yield return (message, severity); + } + } + } +} + +internal readonly struct ClientInitializationRequest(string capabilities) : IRequest +{ + private const byte Version = 0; + + public string Capabilities { get; } = capabilities; + + /// + /// Called by delta applier. + /// + public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) + { + await stream.WriteAsync(Version, cancellationToken); + await stream.WriteAsync(Capabilities, cancellationToken); + } + + /// + /// Called by dotnet-watch. + /// + public static async ValueTask ReadAsync(Stream stream, CancellationToken cancellationToken) + { + var version = await stream.ReadByteAsync(cancellationToken); + if (version != Version) + { + throw new NotSupportedException($"Unsupported version {version}."); + } + + var capabilities = await stream.ReadStringAsync(cancellationToken); + return new ClientInitializationRequest(capabilities); + } +} + +internal readonly struct StaticAssetUpdateRequest( + string assemblyName, + string relativePath, + byte[] contents, + bool isApplicationProject) : IRequest +{ + private const byte Version = 1; + + public string AssemblyName { get; } = assemblyName; + public bool IsApplicationProject { get; } = isApplicationProject; + public string RelativePath { get; } = relativePath; + public byte[] Contents { get; } = contents; + + public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) + { + await stream.WriteAsync(Version, cancellationToken); + await stream.WriteAsync(AssemblyName, cancellationToken); + await stream.WriteAsync(IsApplicationProject, cancellationToken); + await stream.WriteAsync(RelativePath, cancellationToken); + await stream.WriteByteArrayAsync(Contents, cancellationToken); + } + + public static async ValueTask ReadAsync(Stream stream, CancellationToken cancellationToken) + { + var version = await stream.ReadByteAsync(cancellationToken); + if (version != Version) + { + throw new NotSupportedException($"Unsupported version {version}."); + } + + var assemblyName = await stream.ReadStringAsync(cancellationToken); + var isAppProject = await stream.ReadBooleanAsync(cancellationToken); + var relativePath = await stream.ReadStringAsync(cancellationToken); + var contents = await stream.ReadByteArrayAsync(cancellationToken); + + return new StaticAssetUpdateRequest( + assemblyName: assemblyName, + relativePath: relativePath, + contents: contents, + isApplicationProject: isAppProject); + } +} diff --git a/src/BuiltInTools/HotReloadAgent.PipeRpc/StreamExtensions.cs b/src/BuiltInTools/HotReloadAgent.PipeRpc/StreamExtensions.cs new file mode 100644 index 000000000000..4169cae79e38 --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent.PipeRpc/StreamExtensions.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System; +using System.Buffers; +using System.Buffers.Binary; +using System.IO; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.HotReload; + +/// +/// Implements async read/write helpers that provide functionality of and . +/// See https://github.com/dotnet/runtime/issues/17229 +/// +internal static class StreamExtesions +{ + public static ValueTask WriteAsync(this Stream stream, bool value, CancellationToken cancellationToken) + => WriteAsync(stream, (byte)(value ? 1 : 0), cancellationToken); + + public static async ValueTask WriteAsync(this Stream stream, byte value, CancellationToken cancellationToken) + { + var size = sizeof(byte); + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + try + { + buffer[0] = value; + await stream.WriteAsync(buffer, offset: 0, count: size, cancellationToken); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + + public static async ValueTask WriteAsync(this Stream stream, int value, CancellationToken cancellationToken) + { + var size = sizeof(int); + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + try + { + BinaryPrimitives.WriteInt32LittleEndian(buffer, value); + await stream.WriteAsync(buffer, offset: 0, count: size, cancellationToken); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + + public static ValueTask WriteAsync(this Stream stream, Guid value, CancellationToken cancellationToken) + => stream.WriteAsync(value.ToByteArray(), cancellationToken); + + public static async ValueTask WriteByteArrayAsync(this Stream stream, byte[] value, CancellationToken cancellationToken) + { + await stream.WriteAsync(value.Length, cancellationToken); + await stream.WriteAsync(value, cancellationToken); + } + + public static async ValueTask WriteAsync(this Stream stream, int[] value, CancellationToken cancellationToken) + { + var size = sizeof(int) * (value.Length + 1); + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + try + { + BinaryPrimitives.WriteInt32LittleEndian(buffer, value.Length); + for (int i = 0; i < value.Length; i++) + { + BinaryPrimitives.WriteInt32LittleEndian(buffer.AsSpan((i + 1) * sizeof(int), sizeof(int)), value[i]); + } + + await stream.WriteAsync(buffer, offset: 0, count: size, cancellationToken); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + + public static async ValueTask WriteAsync(this Stream stream, string value, CancellationToken cancellationToken) + { + var bytes = Encoding.UTF8.GetBytes(value); + await stream.Write7BitEncodedIntAsync(bytes.Length, cancellationToken); + await stream.WriteAsync(bytes, cancellationToken); + } + +#if !NET + public static async ValueTask WriteAsync(this Stream stream, byte[] value, CancellationToken cancellationToken) + => await stream.WriteAsync(value, offset: 0, count: value.Length, cancellationToken); +#endif + public static async ValueTask Write7BitEncodedIntAsync(this Stream stream, int value, CancellationToken cancellationToken) + { + uint uValue = (uint)value; + + while (uValue > 0x7Fu) + { + await stream.WriteAsync((byte)(uValue | ~0x7Fu), cancellationToken); + uValue >>= 7; + } + + await stream.WriteAsync((byte)uValue, cancellationToken); + } + + public static async ValueTask ReadBooleanAsync(this Stream stream, CancellationToken cancellationToken) + => await stream.ReadByteAsync(cancellationToken) != 0; + + public static async ValueTask ReadByteAsync(this Stream stream, CancellationToken cancellationToken) + { + int size = sizeof(byte); + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + try + { + await ReadExactlyAsync(stream, buffer, size, cancellationToken); + return buffer[0]; + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + + public static async ValueTask ReadInt32Async(this Stream stream, CancellationToken cancellationToken) + { + int size = sizeof(int); + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + try + { + await ReadExactlyAsync(stream, buffer, size, cancellationToken); + return BinaryPrimitives.ReadInt32LittleEndian(buffer); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + + public static async ValueTask ReadGuidAsync(this Stream stream, CancellationToken cancellationToken) + { + const int size = 16; +#if NET + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + + try + { + await ReadExactlyAsync(stream, buffer, size, cancellationToken); + return new Guid(buffer.AsSpan(0, size)); + } + finally + { + ArrayPool.Shared.Return(buffer); + } +#else + var buffer = new byte[size]; + await ReadExactlyAsync(stream, buffer, size, cancellationToken); + return new Guid(buffer); +#endif + } + + public static async ValueTask ReadByteArrayAsync(this Stream stream, CancellationToken cancellationToken) + { + var count = await stream.ReadInt32Async(cancellationToken); + if (count == 0) + { + return []; + } + + var bytes = new byte[count]; + await ReadExactlyAsync(stream, bytes, count, cancellationToken); + return bytes; + } + + public static async ValueTask ReadIntArrayAsync(this Stream stream, CancellationToken cancellationToken) + { + var count = await stream.ReadInt32Async(cancellationToken); + if (count == 0) + { + return []; + } + + var result = new int[count]; + int size = count * sizeof(int); + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + try + { + await ReadExactlyAsync(stream, buffer, size, cancellationToken); + + for (var i = 0; i < count; i++) + { + result[i] = BinaryPrimitives.ReadInt32LittleEndian(buffer.AsSpan(i * sizeof(int))); + } + } + finally + { + ArrayPool.Shared.Return(buffer); + } + + return result; + } + + public static async ValueTask ReadStringAsync(this Stream stream, CancellationToken cancellationToken) + { + int size = await stream.Read7BitEncodedIntAsync(cancellationToken); + if (size < 0) + { + throw new InvalidDataException(); + } + + if (size == 0) + { + return string.Empty; + } + + var buffer = ArrayPool.Shared.Rent(minimumLength: size); + try + { + await ReadExactlyAsync(stream, buffer, size, cancellationToken); + return Encoding.UTF8.GetString(buffer, 0, size); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + + public static async ValueTask Read7BitEncodedIntAsync(this Stream stream, CancellationToken cancellationToken) + { + const int MaxBytesWithoutOverflow = 4; + + uint result = 0; + byte b; + + for (int shift = 0; shift < MaxBytesWithoutOverflow * 7; shift += 7) + { + b = await stream.ReadByteAsync(cancellationToken); + result |= (b & 0x7Fu) << shift; + + if (b <= 0x7Fu) + { + return (int)result; + } + } + + // Read the 5th byte. Since we already read 28 bits, + // the value of this byte must fit within 4 bits (32 - 28), + // and it must not have the high bit set. + + b = await stream.ReadByteAsync(cancellationToken); + if (b > 0b_1111u) + { + throw new InvalidDataException(); + } + + result |= (uint)b << (MaxBytesWithoutOverflow * 7); + return (int)result; + } + + private static async ValueTask ReadExactlyAsync(this Stream stream, byte[] buffer, int size, CancellationToken cancellationToken) + { + int totalRead = 0; + while (totalRead < size) + { + int read = await stream.ReadAsync(buffer, offset: totalRead, count: size - totalRead, cancellationToken).ConfigureAwait(false); + if (read == 0) + { + throw new EndOfStreamException(); + } + + totalRead += read; + } + + return totalRead; + } +} diff --git a/src/BuiltInTools/HotReloadAgent/HotReloadAgent.cs b/src/BuiltInTools/HotReloadAgent/HotReloadAgent.cs index 7e1f026d8faa..c94b55e0e766 100644 --- a/src/BuiltInTools/HotReloadAgent/HotReloadAgent.cs +++ b/src/BuiltInTools/HotReloadAgent/HotReloadAgent.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Linq; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Reflection; -using Microsoft.DotNet.Watch; namespace Microsoft.DotNet.HotReload; diff --git a/src/BuiltInTools/HotReloadAgent/UpdateDelta.cs b/src/BuiltInTools/HotReloadAgent/UpdateDelta.cs index 3277755dea56..757e46c28ee4 100644 --- a/src/BuiltInTools/HotReloadAgent/UpdateDelta.cs +++ b/src/BuiltInTools/HotReloadAgent/UpdateDelta.cs @@ -3,7 +3,7 @@ using System; -namespace Microsoft.DotNet.Watch; +namespace Microsoft.DotNet.HotReload; internal readonly struct UpdateDelta(Guid moduleId, byte[] metadataDelta, byte[] ilDelta, byte[] pdbDelta, int[] updatedTypes) { diff --git a/src/BuiltInTools/dotnet-watch.slnf b/src/BuiltInTools/dotnet-watch.slnf index 2484e98c2da7..b0e0ee2dcafc 100644 --- a/src/BuiltInTools/dotnet-watch.slnf +++ b/src/BuiltInTools/dotnet-watch.slnf @@ -9,6 +9,8 @@ "src\\BuiltInTools\\DotNetWatchTasks\\DotNetWatchTasks.csproj", "src\\BuiltInTools\\HotReloadAgent\\Microsoft.DotNet.HotReload.Agent.Package.csproj", "src\\BuiltInTools\\HotReloadAgent\\Microsoft.DotNet.HotReload.Agent.shproj", + "src\\BuiltInTools\\HotReloadAgent.PipeRpc\\Microsoft.DotNet.HotReload.Agent.PipeRpc.Package.csproj", + "src\\BuiltInTools\\HotReloadAgent.PipeRpc\\Microsoft.DotNet.HotReload.Agent.PipeRpc.shproj", "src\\BuiltInTools\\dotnet-watch\\dotnet-watch.csproj", "test\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj", "test\\Microsoft.Extensions.DotNetDeltaApplier.Tests\\Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj", diff --git a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs index a3228802a53e..1353a53f0d47 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs @@ -36,7 +36,7 @@ async Task> ConnectAsync() // When the client connects, the first payload it sends is the initialization payload which includes the apply capabilities. - var capabilities = (await ClientInitializationPayload.ReadAsync(_pipe, cancellationToken)).Capabilities; + var capabilities = (await ClientInitializationRequest.ReadAsync(_pipe, cancellationToken)).Capabilities; Reporter.Verbose($"Capabilities: '{capabilities}'"); return [.. capabilities.Split(' ')]; } @@ -87,28 +87,36 @@ public override async Task Apply(ImmutableArray new UpdateDelta( + var request = new ManagedCodeUpdateRequest( + deltas: [.. applicableUpdates.Select(update => new UpdateDelta( update.ModuleId, - metadataDelta: update.MetadataDelta.ToArray(), - ilDelta: update.ILDelta.ToArray(), - pdbDelta: update.PdbDelta.ToArray(), - update.UpdatedTypes.ToArray())).ToArray(), + metadataDelta: [.. update.MetadataDelta], + ilDelta: [.. update.ILDelta], + pdbDelta: [.. update.PdbDelta], + updatedTypes: [.. update.UpdatedTypes]))], responseLoggingLevel: Reporter.IsVerbose ? ResponseLoggingLevel.Verbose : ResponseLoggingLevel.WarningsAndErrors); var success = false; var canceled = false; try { - await payload.WriteAsync(_pipe, cancellationToken); + await request.WriteAsync(_pipe, cancellationToken); await _pipe.FlushAsync(cancellationToken); - success = await ReceiveApplyUpdateResult(cancellationToken); + + (success, var log) = await UpdateResponse.ReadAsync(_pipe, cancellationToken); + + await foreach (var (message, severity) in log) + { + ReportLogEntry(Reporter, message, severity); + } } catch (OperationCanceledException) when (!(canceled = true)) { + // unreachable } catch (Exception e) when (e is not OperationCanceledException) { + success = false; Reporter.Error($"Change failed to apply (error: '{e.Message}'). Further changes won't be applied to this process."); Reporter.Verbose($"Exception stack trace: {e.StackTrace}", "❌"); } @@ -134,34 +142,6 @@ public override async Task Apply(ImmutableArray ReceiveApplyUpdateResult(CancellationToken cancellationToken) - { - Debug.Assert(_pipe != null); - - var status = ArrayPool.Shared.Rent(1); - try - { - var statusBytesRead = await _pipe.ReadAsync(status, offset: 0, count: 1, cancellationToken); - if (statusBytesRead != 1 || status[0] != UpdatePayload.ApplySuccessValue) - { - var message = (statusBytesRead == 0) ? "received no data" : $"received status 0x{status[0]:x2}"; - Reporter.Error($"Change failed to apply ({message}). Further changes won't be applied to this process."); - return false; - } - - await foreach (var (message, severity) in UpdatePayload.ReadLogAsync(_pipe, cancellationToken)) - { - ReportLogEntry(Reporter, message, severity); - } - - return true; - } - finally - { - ArrayPool.Shared.Return(status); - } - } - private void DisposePipe() { Reporter.Verbose("Disposing agent communication pipe"); diff --git a/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs b/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs deleted file mode 100644 index d95c3e8e5128..000000000000 --- a/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs +++ /dev/null @@ -1,431 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Buffers; -using System.Buffers.Binary; -using System.Runtime.CompilerServices; -using Microsoft.DotNet.HotReload; - -namespace Microsoft.DotNet.Watch -{ - internal enum PayloadType - { - ManagedCodeUpdate = 1, - StaticAssetUpdate = 2, - InitialUpdatesCompleted = 3, - } - - internal readonly struct UpdatePayload(IReadOnlyList deltas, ResponseLoggingLevel responseLoggingLevel) - { - public const byte ApplySuccessValue = 0; - - private const byte Version = 4; - - public IReadOnlyList Deltas { get; } = deltas; - public ResponseLoggingLevel ResponseLoggingLevel { get; } = responseLoggingLevel; - - /// - /// Called by the dotnet-watch. - /// - public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) - { - await stream.WriteAsync(Version, cancellationToken); - await stream.WriteAsync(Deltas.Count, cancellationToken); - - foreach (var delta in Deltas) - { - await stream.WriteAsync(delta.ModuleId, cancellationToken); - await stream.WriteByteArrayAsync(delta.MetadataDelta, cancellationToken); - await stream.WriteByteArrayAsync(delta.ILDelta, cancellationToken); - await stream.WriteByteArrayAsync(delta.PdbDelta, cancellationToken); - await stream.WriteAsync(delta.UpdatedTypes, cancellationToken); - } - - await stream.WriteAsync((byte)ResponseLoggingLevel, cancellationToken); - } - - /// - /// Called by the dotnet-watch. - /// - public static async ValueTask WriteLogAsync(Stream stream, IReadOnlyCollection<(string message, AgentMessageSeverity severity)> log, CancellationToken cancellationToken) - { - await stream.WriteAsync(log.Count, cancellationToken); - - foreach (var (message, severity) in log) - { - await stream.WriteAsync(message, cancellationToken); - await stream.WriteAsync((byte)severity, cancellationToken); - } - } - - /// - /// Called by delta applier. - /// - public static async ValueTask ReadAsync(Stream stream, CancellationToken cancellationToken) - { - var version = await stream.ReadByteAsync(cancellationToken); - if (version != Version) - { - throw new NotSupportedException($"Unsupported version {version}."); - } - - var count = await stream.ReadInt32Async(cancellationToken); - - var deltas = new UpdateDelta[count]; - for (var i = 0; i < count; i++) - { - var moduleId = await stream.ReadGuidAsync(cancellationToken); - var metadataDelta = await stream.ReadByteArrayAsync(cancellationToken); - var ilDelta = await stream.ReadByteArrayAsync(cancellationToken); - var pdbDelta = await stream.ReadByteArrayAsync(cancellationToken); - var updatedTypes = await stream.ReadIntArrayAsync(cancellationToken); - - deltas[i] = new UpdateDelta(moduleId, metadataDelta: metadataDelta, ilDelta: ilDelta, pdbDelta: pdbDelta, updatedTypes); - } - - var responseLoggingLevel = (ResponseLoggingLevel)await stream.ReadByteAsync(cancellationToken); - return new UpdatePayload(deltas, responseLoggingLevel: responseLoggingLevel); - } - - /// - /// Called by delta applier. - /// - public static async IAsyncEnumerable<(string message, AgentMessageSeverity severity)> ReadLogAsync(Stream stream, [EnumeratorCancellation] CancellationToken cancellationToken) - { - var entryCount = await stream.ReadInt32Async(cancellationToken); - - for (var i = 0; i < entryCount; i++) - { - var message = await stream.ReadStringAsync(cancellationToken); - var severity = (AgentMessageSeverity)await stream.ReadByteAsync(cancellationToken); - yield return (message, severity); - } - } - } - - internal readonly struct ClientInitializationPayload(string capabilities) - { - private const byte Version = 0; - - public string Capabilities { get; } = capabilities; - - /// - /// Called by delta applier. - /// - public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) - { - await stream.WriteAsync(Version, cancellationToken); - await stream.WriteAsync(Capabilities, cancellationToken); - } - - /// - /// Called by dotnet-watch. - /// - public static async ValueTask ReadAsync(Stream stream, CancellationToken cancellationToken) - { - var version = await stream.ReadByteAsync(cancellationToken); - if (version != Version) - { - throw new NotSupportedException($"Unsupported version {version}."); - } - - var capabilities = await stream.ReadStringAsync(cancellationToken); - return new ClientInitializationPayload(capabilities); - } - } - - internal readonly struct StaticAssetPayload( - string assemblyName, - string relativePath, - byte[] contents, - bool isApplicationProject) - { - private const byte Version = 1; - - public string AssemblyName { get; } = assemblyName; - public bool IsApplicationProject { get; } = isApplicationProject; - public string RelativePath { get; } = relativePath; - public byte[] Contents { get; } = contents; - - public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationToken) - { - await stream.WriteAsync(Version, cancellationToken); - await stream.WriteAsync(AssemblyName, cancellationToken); - await stream.WriteAsync(IsApplicationProject, cancellationToken); - await stream.WriteAsync(RelativePath, cancellationToken); - await stream.WriteByteArrayAsync(Contents, cancellationToken); - } - - public static async ValueTask ReadAsync(Stream stream, CancellationToken cancellationToken) - { - var version = await stream.ReadByteAsync(cancellationToken); - if (version != Version) - { - throw new NotSupportedException($"Unsupported version {version}."); - } - - var assemblyName = await stream.ReadStringAsync(cancellationToken); - var isAppProject = await stream.ReadBooleanAsync(cancellationToken); - var relativePath = await stream.ReadStringAsync(cancellationToken); - var contents = await stream.ReadByteArrayAsync(cancellationToken); - - return new StaticAssetPayload( - assemblyName: assemblyName, - relativePath: relativePath, - contents: contents, - isApplicationProject: isAppProject); - } - } - - /// - /// Implements async read/write helpers that provide functionality of and . - /// See https://github.com/dotnet/runtime/issues/17229 - /// - internal static class StreamExtesions - { - public static ValueTask WriteAsync(this Stream stream, bool value, CancellationToken cancellationToken) - => WriteAsync(stream, (byte)(value ? 1 : 0), cancellationToken); - - public static async ValueTask WriteAsync(this Stream stream, byte value, CancellationToken cancellationToken) - { - var size = sizeof(byte); - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - buffer[0] = value; - await stream.WriteAsync(buffer, offset: 0, count: size, cancellationToken); - } - finally - { - ArrayPool.Shared.Return(buffer); - } - } - - public static async ValueTask WriteAsync(this Stream stream, int value, CancellationToken cancellationToken) - { - var size = sizeof(int); - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - BinaryPrimitives.WriteInt32LittleEndian(buffer, value); - await stream.WriteAsync(buffer, offset: 0, count: size, cancellationToken); - } - finally - { - ArrayPool.Shared.Return(buffer); - } - } - - public static ValueTask WriteAsync(this Stream stream, Guid value, CancellationToken cancellationToken) - => stream.WriteAsync(value.ToByteArray(), cancellationToken); - - public static async ValueTask WriteByteArrayAsync(this Stream stream, byte[] value, CancellationToken cancellationToken) - { - await stream.WriteAsync(value.Length, cancellationToken); - await stream.WriteAsync(value, cancellationToken); - } - - public static async ValueTask WriteAsync(this Stream stream, int[] value, CancellationToken cancellationToken) - { - var size = sizeof(int) * (value.Length + 1); - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - BinaryPrimitives.WriteInt32LittleEndian(buffer, value.Length); - for (int i = 0; i < value.Length; i++) - { - BinaryPrimitives.WriteInt32LittleEndian(buffer.AsSpan((i + 1) * sizeof(int), sizeof(int)), value[i]); - } - - await stream.WriteAsync(buffer, offset: 0, count: size, cancellationToken); - } - finally - { - ArrayPool.Shared.Return(buffer); - } - } - - public static async ValueTask WriteAsync(this Stream stream, string value, CancellationToken cancellationToken) - { - var bytes = Encoding.UTF8.GetBytes(value); - await stream.Write7BitEncodedIntAsync(bytes.Length, cancellationToken); - await stream.WriteAsync(bytes, cancellationToken); - } - - public static async ValueTask Write7BitEncodedIntAsync(this Stream stream, int value, CancellationToken cancellationToken) - { - uint uValue = (uint)value; - - while (uValue > 0x7Fu) - { - await stream.WriteAsync((byte)(uValue | ~0x7Fu), cancellationToken); - uValue >>= 7; - } - - await stream.WriteAsync((byte)uValue, cancellationToken); - } - - public static async ValueTask ReadBooleanAsync(this Stream stream, CancellationToken cancellationToken) - => await stream.ReadByteAsync(cancellationToken) != 0; - - public static async ValueTask ReadByteAsync(this Stream stream, CancellationToken cancellationToken) - { - int size = sizeof(byte); - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - await ReadExactlyAsync(stream, buffer.AsMemory(0, size), cancellationToken); - return buffer[0]; - } - finally - { - ArrayPool.Shared.Return(buffer); - } - } - - public static async ValueTask ReadInt32Async(this Stream stream, CancellationToken cancellationToken) - { - int size = sizeof(int); - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - await ReadExactlyAsync(stream, buffer.AsMemory(0, size), cancellationToken); - return BinaryPrimitives.ReadInt32LittleEndian(buffer); - } - finally - { - ArrayPool.Shared.Return(buffer); - } - } - - public static async ValueTask ReadGuidAsync(this Stream stream, CancellationToken cancellationToken) - { - const int size = 16; - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - await ReadExactlyAsync(stream, buffer.AsMemory(0, size), cancellationToken); - return new Guid(buffer.AsSpan(0, size)); - } - finally - { - ArrayPool.Shared.Return(buffer); - } - } - - public static async ValueTask ReadByteArrayAsync(this Stream stream, CancellationToken cancellationToken) - { - var count = await stream.ReadInt32Async(cancellationToken); - if (count == 0) - { - return []; - } - - var bytes = new byte[count]; - await ReadExactlyAsync(stream, bytes, cancellationToken); - return bytes; - } - - public static async ValueTask ReadIntArrayAsync(this Stream stream, CancellationToken cancellationToken) - { - var count = await stream.ReadInt32Async(cancellationToken); - if (count == 0) - { - return []; - } - - var result = new int[count]; - int size = count * sizeof(int); - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - await ReadExactlyAsync(stream, buffer.AsMemory(0, size), cancellationToken); - - for (var i = 0; i < count; i++) - { - result[i] = BinaryPrimitives.ReadInt32LittleEndian(buffer.AsSpan(i * sizeof(int))); - } - } - finally - { - ArrayPool.Shared.Return(buffer); - } - - return result; - } - - public static async ValueTask ReadStringAsync(this Stream stream, CancellationToken cancellationToken) - { - int size = await stream.Read7BitEncodedIntAsync(cancellationToken); - if (size < 0) - { - throw new InvalidDataException(); - } - - if (size == 0) - { - return string.Empty; - } - - var buffer = ArrayPool.Shared.Rent(minimumLength: size); - try - { - await ReadExactlyAsync(stream, buffer.AsMemory(0, size), cancellationToken); - return Encoding.UTF8.GetString(buffer.AsSpan(0, size)); - } - finally - { - ArrayPool.Shared.Return(buffer); - } - } - - public static async ValueTask Read7BitEncodedIntAsync(this Stream stream, CancellationToken cancellationToken) - { - const int MaxBytesWithoutOverflow = 4; - - uint result = 0; - byte b; - - for (int shift = 0; shift < MaxBytesWithoutOverflow * 7; shift += 7) - { - b = await stream.ReadByteAsync(cancellationToken); - result |= (b & 0x7Fu) << shift; - - if (b <= 0x7Fu) - { - return (int)result; - } - } - - // Read the 5th byte. Since we already read 28 bits, - // the value of this byte must fit within 4 bits (32 - 28), - // and it must not have the high bit set. - - b = await stream.ReadByteAsync(cancellationToken); - if (b > 0b_1111u) - { - throw new InvalidDataException(); - } - - result |= (uint)b << (MaxBytesWithoutOverflow * 7); - return (int)result; - } - - private static async ValueTask ReadExactlyAsync(this Stream stream, Memory buffer, CancellationToken cancellationToken) - { - int totalRead = 0; - while (totalRead < buffer.Length) - { - int read = await stream.ReadAsync(buffer.Slice(totalRead), cancellationToken).ConfigureAwait(false); - if (read == 0) - { - throw new EndOfStreamException(); - } - - totalRead += read; - } - - return totalRead; - } - } -} diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj index ee602dbfc053..b602aab0a0ca 100644 --- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj +++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj @@ -1,5 +1,6 @@  + @@ -45,33 +46,13 @@ - + - + - + - + - + diff --git a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/UpdatePayloadTests.cs b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/ManagedCodeUpdateRequestTests.cs similarity index 83% rename from test/Microsoft.Extensions.DotNetDeltaApplier.Tests/UpdatePayloadTests.cs rename to test/Microsoft.Extensions.DotNetDeltaApplier.Tests/ManagedCodeUpdateRequestTests.cs index 79b2240033c9..f053a48ac90f 100644 --- a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/UpdatePayloadTests.cs +++ b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/ManagedCodeUpdateRequestTests.cs @@ -5,12 +5,12 @@ namespace Microsoft.DotNet.Watch.UnitTests; -public class UpdatePayloadTests +public class ManagedCodeUpdateRequestTests { [Fact] public async Task Roundtrip() { - var initial = new UpdatePayload( + var initial = new ManagedCodeUpdateRequest( [ new UpdateDelta( moduleId: Guid.NewGuid(), @@ -31,7 +31,7 @@ public async Task Roundtrip() await initial.WriteAsync(stream, CancellationToken.None); stream.Position = 0; - var read = await UpdatePayload.ReadAsync(stream, CancellationToken.None); + var read = await ManagedCodeUpdateRequest.ReadAsync(stream, CancellationToken.None); AssertEqual(initial, read); } @@ -39,7 +39,7 @@ public async Task Roundtrip() [Fact] public async Task WithLargeDeltas() { - var initial = new UpdatePayload( + var initial = new ManagedCodeUpdateRequest( [ new UpdateDelta( moduleId: Guid.NewGuid(), @@ -54,12 +54,12 @@ public async Task WithLargeDeltas() await initial.WriteAsync(stream, CancellationToken.None); stream.Position = 0; - var read = await UpdatePayload.ReadAsync(stream, CancellationToken.None); + var read = await ManagedCodeUpdateRequest.ReadAsync(stream, CancellationToken.None); AssertEqual(initial, read); } - private static void AssertEqual(UpdatePayload initial, UpdatePayload read) + private static void AssertEqual(ManagedCodeUpdateRequest initial, ManagedCodeUpdateRequest read) { Assert.Equal(initial.Deltas.Count, read.Deltas.Count); diff --git a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StaticAssetPayloadTests.cs b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StaticAssetUpdateRequestTests.cs similarity index 75% rename from test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StaticAssetPayloadTests.cs rename to test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StaticAssetUpdateRequestTests.cs index 1240d15b7fb0..7d271e167ed4 100644 --- a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StaticAssetPayloadTests.cs +++ b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StaticAssetUpdateRequestTests.cs @@ -5,12 +5,12 @@ namespace Microsoft.DotNet.Watch.UnitTests; -public class StaticAssetPayloadTests +public class StaticAssetUpdateRequestTests { [Fact] public async Task Roundtrip() { - var initial = new StaticAssetPayload( + var initial = new StaticAssetUpdateRequest( assemblyName: "assembly name", relativePath: "some path", [1, 2, 3], @@ -20,12 +20,12 @@ public async Task Roundtrip() await initial.WriteAsync(stream, CancellationToken.None); stream.Position = 0; - var read = await StaticAssetPayload.ReadAsync(stream, CancellationToken.None); + var read = await StaticAssetUpdateRequest.ReadAsync(stream, CancellationToken.None); AssertEqual(initial, read); } - private static void AssertEqual(StaticAssetPayload initial, StaticAssetPayload read) + private static void AssertEqual(StaticAssetUpdateRequest initial, StaticAssetUpdateRequest read) { Assert.Equal(initial.AssemblyName, read.AssemblyName); Assert.Equal(initial.RelativePath, read.RelativePath); diff --git a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StreamExtensionsTests.cs b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StreamExtensionsTests.cs index 2da1c3b4252d..73996d5019f0 100644 --- a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StreamExtensionsTests.cs +++ b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StreamExtensionsTests.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.DotNet.HotReload; + namespace Microsoft.DotNet.Watch.UnitTests; public class StreamExtensionsTests From 7e378e28dc05eb6a774ae4116387269101d5570b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 11 Jan 2025 14:55:12 +0000 Subject: [PATCH 48/49] Update dependencies from https://github.com/dotnet/scenario-tests build 20250111.2 Microsoft.SourceBuild.Intermediate.scenario-tests , Microsoft.DotNet.ScenarioTests.SdkTemplateTests From Version 9.0.0-preview.25051.2 -> To Version 9.0.0-preview.25061.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 73d1d58e04b6..7dbfd8d793c5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -597,14 +597,14 @@ https://github.com/dotnet/arcade-services 47e3672c762970073e4282bd563233da86bcca3e - + https://github.com/dotnet/scenario-tests - 6ce5a7bf0ef0c62bc0dc0140c45637a5e161823f + 1512fd86b0eb245fe6d8efd7e833c37f5e290803 - + https://github.com/dotnet/scenario-tests - 6ce5a7bf0ef0c62bc0dc0140c45637a5e161823f + 1512fd86b0eb245fe6d8efd7e833c37f5e290803 From 443a40a2d6917d918de7f668be3c31f2ab436f76 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 Jan 2025 03:43:16 +0000 Subject: [PATCH 49/49] Update dependencies from https://github.com/dotnet/templating build 20250112.7 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 9.0.200-rtm.25059.2 -> To Version 9.0.200-rtm.25062.7 --- NuGet.config | 2 +- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7162bb8f5e13..79372cf87eba 100644 --- a/NuGet.config +++ b/NuGet.config @@ -16,7 +16,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7dbfd8d793c5..0759cc192f6b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,16 +3,16 @@ https://github.com/dotnet/templating - c612cb7362b5394a41ab2cf280fae3e473e60724 + aaebde792d2641f49f42e5acc2f92cbac49d2cbc - + https://github.com/dotnet/templating - c612cb7362b5394a41ab2cf280fae3e473e60724 + aaebde792d2641f49f42e5acc2f92cbac49d2cbc - + https://github.com/dotnet/templating - c612cb7362b5394a41ab2cf280fae3e473e60724 + aaebde792d2641f49f42e5acc2f92cbac49d2cbc diff --git a/eng/Versions.props b/eng/Versions.props index 3a6ba1c52e0e..bc71927e57c6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -191,7 +191,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 9.0.200-rtm.25059.2 + 9.0.200-rtm.25062.7 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion)