diff --git a/.editorconfig b/.editorconfig
index 6fcc40e49ad8..14e1cc0c01ca 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -280,7 +280,7 @@ dotnet_diagnostic.IDE0200.severity = none
dotnet_diagnostic.IDE0240.severity = warning
# Additional rules for template engine source code
-[src/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs]
+[{src,test}/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs]
# Default analyzed API surface = 'public' (public APIs)
dotnet_code_quality.api_surface = public
# Provide ObsoleteAttribute message
@@ -445,7 +445,7 @@ dotnet_diagnostic.SA1642.severity = none
dotnet_diagnostic.SA1649.severity = none
# Disable some StyleCop rules for test common Program.cs that is linked to test project of template engine
-[src/Tests/Common/Program.cs]
+[test/Common/Program.cs]
# Declare types in namespaces
dotnet_diagnostic.CA1050.severity = none
# Elements should be documented
@@ -456,7 +456,7 @@ dotnet_diagnostic.SA1601.severity = none
dotnet_diagnostic.SA1633.severity = none
# Additional rules for test source code for template engine
-[src/Tests/{Microsoft.TemplateEngine.*,dotnet-new.Tests}/**.cs]
+[test/{Microsoft.TemplateEngine.*,dotnet-new.Tests}/**.cs]
# Test methods should not be skipped
dotnet_diagnostic.xUnit1004.severity = warning
# Elements should appear in the correct order
@@ -506,5 +506,5 @@ dotnet_diagnostic.IDE0040.severity = warning
[*.txt]
insert_final_newline = false
-[src/Tests/dotnet-new.Tests/**/Approvals/**]
+[test/dotnet-new.Tests/**/Approvals/**]
trim_trailing_whitespace = false
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 11f02b122f11..632858164761 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -7,12 +7,9 @@ contact_links:
- name: Issue with .NET runtime or core .NET libraries
url: https://github.com/dotnet/runtime/issues/new/choose
about: Please open issues relating to the .NET runtime or core .NET libraries in dotnet/runtime.
- - name: Issue with .NET SDK
- url: https://github.com/dotnet/sdk/issues/new/choose
- about: Please open issues relating to the .NET SDK itself in dotnet/sdk.
- name: Issue with Entity Framework Core
url: https://github.com/dotnet/efcore/issues/new/choose
about: Please open issues relating to Entity Framework Core in dotnet/efcore.
- name: Issue with Roslyn compiler
url: https://github.com/dotnet/roslyn/issues/new/choose
- about: Please open issues relating to the Roslyn .NET compiler in dotnet/roslyn.
\ No newline at end of file
+ about: Please open issues relating to the Roslyn .NET compiler in dotnet/roslyn.
diff --git a/CODEOWNERS b/CODEOWNERS
index 5cad9a941841..34bf0b57707f 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -9,19 +9,19 @@
# Area-WebSDK
/src/WebSdk/ @vijayrkn
-/src/Tests/Microsoft.NET.Sdk.Publish.Tasks.Tests/ @vijayrkn
+/test/Microsoft.NET.Sdk.Publish.Tasks.Tests/ @vijayrkn
# Area-AspNetCore
/src/BlazorWasmSdk/ @dotnet/aspnet-blazor-eng
-/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/ @dotnet/aspnet-blazor-eng
+/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/ @dotnet/aspnet-blazor-eng
/src/Assets/TestProjects/BlazorHosted/ @dotnet/aspnet-blazor-eng
/src/Assets/TestProjects/BlazorHostedRID/ @dotnet/aspnet-blazor-eng
/src/Assets/TestProjects/BlazorWasmMinimal/ @dotnet/aspnet-blazor-eng
/src/Assets/TestProjects/BlazorWasmWithLibrary/ @dotnet/aspnet-blazor-eng
/src/RazorSdk/ @dotnet/aspnet-blazor-eng
-/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests/ @dotnet/aspnet-blazor-eng
-/src/Tests/Microsoft.NET.Sdk.Razor.Tests/ @dotnet/aspnet-blazor-eng
-/src/Tests/Microsoft.NET.Sdk.Razor.Tool.Tests/ @dotnet/aspnet-blazor-eng
+/test/Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests/ @dotnet/aspnet-blazor-eng
+/test/Microsoft.NET.Sdk.Razor.Tests/ @dotnet/aspnet-blazor-eng
+/test/Microsoft.NET.Sdk.Razor.Tool.Tests/ @dotnet/aspnet-blazor-eng
/src/Assets/TestPackages/PackageLibraryDirectDependency/ @dotnet/aspnet-blazor-eng
/src/Assets/TestPackages/PackageLibraryTransitiveDependency/ @dotnet/aspnet-blazor-eng
/src/src/Assets/TestProjects/Razor*/ @dotnet/aspnet-blazor-eng
@@ -31,30 +31,30 @@
# Area-Format
/src/Cli/dotnet/commands/dotnet-format @sharwell @arkalyanms
-/src/Tests/dotnet-format.Tests @sharwell @arkalyanms
+/test/dotnet-format.Tests @sharwell @arkalyanms
# Area-NuGet
/src/Cli/dotnet/commands/dotnet-add/dotnet-add-package @dotnet/nuget-team
-/src/Tests/dotnet-add-package.Tests @dotnet/nuget-team
+/test/dotnet-add-package.Tests @dotnet/nuget-team
/src/Cli/dotnet/commands/dotnet-nuget @dotnet/nuget-team
-/src/Tests/dotnet-nuget.UnitTests @dotnet/nuget-team
+/test/dotnet-nuget.UnitTests @dotnet/nuget-team
# Area-FSharp
/src/Cli/dotnet/commands/dotnet-fsi @dotnet/fsharp
-/src/Tests/dotnet-fsi.Tests @dotnet/fsharp
+/test/dotnet-fsi.Tests @dotnet/fsharp
# Area-DotNet Test
/src/Cli/dotnet/commands/dotnet-test @dotnet/dotnet-test-templates-admin
/src/Cli/dotnet/commands/dotnet-vstest @dotnet/dotnet-test-templates-admin
-/src/Tests/dotnet-test.Tests @dotnet/dotnet-test-templates-admin
-/src/Tests/dotnet-vstest.Tests @dotnet/dotnet-test-templates-admin
+/test/dotnet-test.Tests @dotnet/dotnet-test-templates-admin
+/test/dotnet-vstest.Tests @dotnet/dotnet-test-templates-admin
# Area-Templates
/src/Cli/dotnet/commands/dotnet-new @dotnet/templating-engine-maintainers
/src/Cli/dotnet-new3 @dotnet/templating-engine-maintainers
/src/Cli/Microsoft.TemplateEngine.Cli @dotnet/templating-engine-maintainers
-/src/Tests/dotnet-new.Tests @dotnet/templating-engine-maintainers
-/src/Tests/Microsoft.TemplateEngine.* @dotnet/templating-engine-maintainers
+/test/dotnet-new.Tests @dotnet/templating-engine-maintainers
+/test/Microsoft.TemplateEngine.* @dotnet/templating-engine-maintainers
/template_feed @dotnet/templating-engine-maintainers
# ILLink and ReadyToRun targets and tasks owned by runtime team
@@ -62,33 +62,33 @@
/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets clrappmodel@microsoft.com @dotnet/illink-contrib
/src/Tasks/Microsoft.NET.Build.Tasks/PrepareForReadyToRunCompilation.cs @AntonLapounov
/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs @AntonLapounov
-/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs clrappmodel@microsoft.com @dotnet/illink-contrib
-/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs @AntonLapounov
+/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs clrappmodel@microsoft.com @dotnet/illink-contrib
+/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs @AntonLapounov
# Publish.targets related to ILLink and ReadyToRun is own by both runtime and SDK team
/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets clrappmodel@microsoft.com @dotnet/illink-contrib @AntonLapounov @dotnet/dotnet-cli
/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ClickOnce.targets @sujitnayak
# Area-Watch
/src/Assets/TestProjects/Watch*/ @tmat @arkalyanms @dotnet/roslyn-ide
-/src/Tests/dotnet-watch.Tests/ @tmat @arkalyanms @dotnet/roslyn-ide
-/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/ @dotnet/aspnet-blazor-eng
+/test/dotnet-watch.Tests/ @tmat @arkalyanms @dotnet/roslyn-ide
+/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/ @dotnet/aspnet-blazor-eng
/src/BuiltInTools/* @tmat @arkalyanms @dotnet/roslyn-ide
/src/BuiltInTools/BrowserRefresh @dotnet/aspnet-blazor-eng
# Compatibility tools owned by runtime team
/src/Compatibility/ @dotnet/area-infrastructure-libraries
-/src/Tests/Microsoft.DotNet.ApiCompatibility*/ @dotnet/area-infrastructure-libraries
-/src/Tests/Microsoft.DotNet.ApiCompat*/ @dotnet/area-infrastructure-libraries
-/src/Tests/Microsoft.DotNet.PackageValidation*/ @dotnet/area-infrastructure-libraries
+/test/Microsoft.DotNet.ApiCompatibility*/ @dotnet/area-infrastructure-libraries
+/test/Microsoft.DotNet.ApiCompat*/ @dotnet/area-infrastructure-libraries
+/test/Microsoft.DotNet.PackageValidation*/ @dotnet/area-infrastructure-libraries
# Area-GenAPI
/src/Compatibility/GenAPI/ @dotnet/area-infrastructure-libraries @andriipatsula
/src/Compatibility/Microsoft.DotNet.ApiSymbolExtensions/ @dotnet/area-infrastructure-libraries @andriipatsula
-/src/Tests/Microsoft.DotNet.GenAPI/ @dotnet/area-infrastructure-libraries @andriipatsula
-/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/
+/test/Microsoft.DotNet.GenAPI/ @dotnet/area-infrastructure-libraries @andriipatsula
+/test/Microsoft.DotNet.ApiSymbolExtensions.Tests/
# Area: dotnet containers
/src/Cli/Containers @dotnet/sdk-container-builds-maintainers
-/src/Tests/containerize.UnitTests @dotnet/sdk-container-builds-maintainers
-/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests @dotnet/sdk-container-builds-maintainers
-/src/Tests/Microsoft.NET.Build.Containers.UnitTests @dotnet/sdk-container-builds-maintainers
+/test/containerize.UnitTests @dotnet/sdk-container-builds-maintainers
+/test/Microsoft.NET.Build.Containers.IntegrationTests @dotnet/sdk-container-builds-maintainers
+/test/Microsoft.NET.Build.Containers.UnitTests @dotnet/sdk-container-builds-maintainers
diff --git a/Directory.Build.props b/Directory.Build.props
index 8fc6904ef31e..b0e2061b5688 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -12,8 +12,6 @@
truefalsenet9.0
-
- true$(SdkTargetFramework)
@@ -32,14 +30,9 @@
-
-
-
-
-
-
-
-
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index a5caf4a10dee..bb81c4e8d6b3 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,383 +1,384 @@
-
+ https://github.com/dotnet/templating
- 25367df378f1331e2a879205ee21f56de94be6fd
+ 74d4a78aeb9518b5973ad3e710347e5aec583ddd
-
+ https://github.com/dotnet/templating
- 25367df378f1331e2a879205ee21f56de94be6fd
+ 74d4a78aeb9518b5973ad3e710347e5aec583ddd
-
+ https://github.com/dotnet/templating
- 25367df378f1331e2a879205ee21f56de94be6fd
+ 74d4a78aeb9518b5973ad3e710347e5aec583ddd
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/emsdk
- 104f09072729ed5953f0be303f62e8567f3a5478
+ c14a1d2af9d67eec272ff7d7f3c5bb6b114798fe
-
+ https://github.com/dotnet/msbuild
- d5e157ae4e93efb560eec5777de0b6826c7491a4
+ 6d97976719d4aefae595ee919b942da452e97e57
-
+ https://github.com/dotnet/msbuild
- d5e157ae4e93efb560eec5777de0b6826c7491a4
+ 6d97976719d4aefae595ee919b942da452e97e57
-
+ https://github.com/dotnet/msbuild
- d5e157ae4e93efb560eec5777de0b6826c7491a4
+ 6d97976719d4aefae595ee919b942da452e97e57
-
+ https://github.com/dotnet/fsharp
- c040d25693a071efb0df0deb24fca347802d0f22
+ 8d7795d4a68a21010577f11084ba937e51daf9a3
-
+ https://github.com/dotnet/fsharp
- c040d25693a071efb0df0deb24fca347802d0f22
+ 8d7795d4a68a21010577f11084ba937e51daf9a3
-
+ https://github.com/dotnet/format
- ae704a723a5927860e4c4815702eadfee64ca769
+ ed49f9c7d60f259d435047f22f4eb7a57437caeb
-
+ https://github.com/dotnet/roslyn
- 7eff5ed876f1d5f64dab9eb1b7d1c22e6ee587fa
+ 3cd939f76803da435c20b082a5cfcc844386fcfb
-
+ https://github.com/dotnet/roslyn
- 7eff5ed876f1d5f64dab9eb1b7d1c22e6ee587fa
+ 3cd939f76803da435c20b082a5cfcc844386fcfb
-
+ https://github.com/dotnet/roslyn
- 7eff5ed876f1d5f64dab9eb1b7d1c22e6ee587fa
+ 3cd939f76803da435c20b082a5cfcc844386fcfb
-
+ https://github.com/dotnet/roslyn
- 7eff5ed876f1d5f64dab9eb1b7d1c22e6ee587fa
+ 3cd939f76803da435c20b082a5cfcc844386fcfb
-
+ https://github.com/dotnet/roslyn
- 7eff5ed876f1d5f64dab9eb1b7d1c22e6ee587fa
+ 3cd939f76803da435c20b082a5cfcc844386fcfb
-
+ https://github.com/dotnet/roslyn
- 7eff5ed876f1d5f64dab9eb1b7d1c22e6ee587fa
+ 3cd939f76803da435c20b082a5cfcc844386fcfb
-
+ https://github.com/dotnet/roslyn
- 7eff5ed876f1d5f64dab9eb1b7d1c22e6ee587fa
+ 3cd939f76803da435c20b082a5cfcc844386fcfb
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/nuget/nuget.client
- b10ba996eeb40da639273848408d2628e01076f4
+ d55931a69dcda3dcb87ba46a09fe268e0febc223
-
+ https://github.com/microsoft/vstest
- 8e402e90c24034b5ff27bd987dbada37d216141a
+ 53df73d3373e7964f6fb37f4437bda2720a75ef2
-
+ https://github.com/microsoft/vstest
- 8e402e90c24034b5ff27bd987dbada37d216141a
+ 53df73d3373e7964f6fb37f4437bda2720a75ef2
-
+ https://github.com/microsoft/vstest
- 8e402e90c24034b5ff27bd987dbada37d216141a
+ 53df73d3373e7964f6fb37f4437bda2720a75ef2
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/windowsdesktop
- d4a30a89fdaf7aeb89be67f8b6afa16c34a663eb
+ 220836ccc946baf3888df8fa4be009355d3e3e0e
+
-
+ https://github.com/dotnet/windowsdesktop
- d4a30a89fdaf7aeb89be67f8b6afa16c34a663eb
+ 220836ccc946baf3888df8fa4be009355d3e3e0e
-
+ https://github.com/dotnet/windowsdesktop
- d4a30a89fdaf7aeb89be67f8b6afa16c34a663eb
+ 220836ccc946baf3888df8fa4be009355d3e3e0e
-
+ https://github.com/dotnet/windowsdesktop
- d4a30a89fdaf7aeb89be67f8b6afa16c34a663eb
+ 220836ccc946baf3888df8fa4be009355d3e3e0e
-
+ https://github.com/dotnet/wpf
- c6bedc36170d6842f848b5364f154d2ebdafb6b8
+ 213f59cf387c074317d1ae5827281378b6205c24
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/razor
- c1d59ff18ac4e5f724fbc448fd733acb804096b5
+ 999b33452cdd3c4ac639e21419f4b34f2999571d
-
+ https://github.com/dotnet/razor
- c1d59ff18ac4e5f724fbc448fd733acb804096b5
+ 999b33452cdd3c4ac639e21419f4b34f2999571d
-
+ https://github.com/dotnet/razor
- c1d59ff18ac4e5f724fbc448fd733acb804096b5
+ 999b33452cdd3c4ac639e21419f4b34f2999571d
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/aspnetcore
- 64f95ef2377403e075cced875363419755d317a4
+ cc9cff31eb828f5849c07afc46b08baeda42b399
-
+ https://github.com/dotnet/xdt
- 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b
+ d71290db981c297b17054b64b2bc7c707a547545
-
+ https://github.com/dotnet/roslyn-analyzers
- 91fda6d8a634d5f4715b70a24538ab52ca2a8758
+ 23ec029b47d68b1a80348c0dabc3bccf013c1fe6
-
+ https://github.com/dotnet/roslyn-analyzers
- 91fda6d8a634d5f4715b70a24538ab52ca2a8758
+ 23ec029b47d68b1a80348c0dabc3bccf013c1fe6
-
+ https://github.com/dotnet/roslyn-analyzers
- 91fda6d8a634d5f4715b70a24538ab52ca2a8758
+ 23ec029b47d68b1a80348c0dabc3bccf013c1fe6
-
+ https://github.com/dotnet/command-line-api
- 02fe27cd6a9b001c8feb7938e6ef4b3799745759
+ ecd2ce5eafbba3008a7d4f5d04b025d30928c812
-
+ https://github.com/dotnet/command-line-api
- 02fe27cd6a9b001c8feb7938e6ef4b3799745759
+ ecd2ce5eafbba3008a7d4f5d04b025d30928c812
-
+ https://github.com/dotnet/source-build-externals
- ebe0ddc3a293df4ea172129b02adc25855d9976e
+ 6fc8c1ac45220a4d9b4c59bf2ff187dafcb1da3f
-
+ https://github.com/dotnet/source-build-reference-packages
- 65d856fde9705faa6e3dd35854d6912cf078ccfc
+ 549aadff1660b230bdfffa562eea3edf59dd0bb4
-
+ https://github.com/dotnet/deployment-tools
- 1d174267bf45dabbadb12602b1170329611fd219
+ b4f8847a36543b3274dc252534d0175de35bd16c
-
+ https://github.com/dotnet/sourcelink
- e2f4720f9e7411122675568b984606c405b3bb53
+ 8f632790ea2ae7a6500ec0b16f13e39037ee9dcc
-
+ https://github.com/dotnet/sourcelink
- e2f4720f9e7411122675568b984606c405b3bb53
+ 8f632790ea2ae7a6500ec0b16f13e39037ee9dcc
-
+ https://github.com/dotnet/sourcelink
- e2f4720f9e7411122675568b984606c405b3bb53
+ 8f632790ea2ae7a6500ec0b16f13e39037ee9dcc
-
+ https://github.com/dotnet/sourcelink
- e2f4720f9e7411122675568b984606c405b3bb53
+ 8f632790ea2ae7a6500ec0b16f13e39037ee9dcc
-
+ https://github.com/dotnet/sourcelink
- e2f4720f9e7411122675568b984606c405b3bb53
+ 8f632790ea2ae7a6500ec0b16f13e39037ee9dcc
-
+ https://github.com/dotnet/sourcelink
- e2f4720f9e7411122675568b984606c405b3bb53
+ 8f632790ea2ae7a6500ec0b16f13e39037ee9dcc
-
+ https://github.com/dotnet/deployment-tools
- 1d174267bf45dabbadb12602b1170329611fd219
+ b4f8847a36543b3274dc252534d0175de35bd16c
@@ -386,56 +387,56 @@
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/arcade
- bb2b4326ddf03d86c92bd125dba87e9d8df63463
+ 3ce3eaf210b1f815e5f90b33865d8cc5e9ed9849
-
+ https://github.com/dotnet/arcade
- bb2b4326ddf03d86c92bd125dba87e9d8df63463
+ 3ce3eaf210b1f815e5f90b33865d8cc5e9ed9849
-
+ https://github.com/dotnet/arcade
- bb2b4326ddf03d86c92bd125dba87e9d8df63463
+ 3ce3eaf210b1f815e5f90b33865d8cc5e9ed9849
-
+ https://github.com/dotnet/arcade
- bb2b4326ddf03d86c92bd125dba87e9d8df63463
+ 3ce3eaf210b1f815e5f90b33865d8cc5e9ed9849
-
+ https://github.com/dotnet/runtime
- ba65769e093f8cc0d319701d16bbc85d70655c6d
+ 8accd8073a44f5835b39e0584f17d1aff1771121
-
+ https://github.com/dotnet/arcade
- bb2b4326ddf03d86c92bd125dba87e9d8df63463
+ 3ce3eaf210b1f815e5f90b33865d8cc5e9ed9849
diff --git a/eng/Versions.props b/eng/Versions.props
index 9e05b20157d6..b57716647d49 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -24,85 +24,85 @@
+ 9.0.0-preview.24067.11.0.0-20230414.12.1.0-preview2-26306-032.21.02.0.1-servicing-26011-0113.0.31.2.0-beta.435
- 7.0.0
+ 8.0.04.0.0
- 7.0.0
- 9.0.0-beta.23528.2
- 7.0.0-preview.22423.2
- 9.0.0-alpha.1.23531.4
+ 8.0.0
+ 9.0.0-alpha.1.24071.34.3.04.3.04.0.57.0.3
- 9.0.0-alpha.1.23531.4
+ 9.0.0-alpha.1.24071.34.6.0
- 2.0.0-beta4.23307.1
- 2.0.0-preview.1.23509.2
+ 2.0.0-beta4.24068.1
+ 2.0.0-preview.1.24057.23.2.2146
+ 0.3.49-beta
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3$(MicrosoftExtensionsDependencyModelPackageVersion)
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
+ 6.9.0-rc.86
+ 6.9.0-rc.866.0.0-rc.278
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
- 6.9.0-preview.1.23
+ 6.9.0-rc.86
+ 6.9.0-rc.86
+ 6.9.0-rc.86
+ 6.9.0-rc.86
+ 6.9.0-rc.86
+ 6.9.0-rc.86
+ 6.9.0-rc.86
+ 6.9.0-rc.86
+ 6.9.0-rc.86$(NuGetPackagingPackageVersion)$(NuGetProjectModelPackageVersion)
- 17.9.0-preview-23530-01
- 17.9.0-preview-23530-01
- 17.9.0-preview-23530-01
+ 17.10.0-preview-24069-04
+ 17.10.0-preview-24069-04
+ 17.10.0-preview-24069-04
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
- 9.0.0-alpha.1.23531.4
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
+ 9.0.0-alpha.1.24071.3
- 9.0.453105
+ 9.0.507001
- 9.0.0-preview.23531.3
- 3.11.0-beta1.23531.3
+ 9.0.0-preview.24067.1
+ 3.11.0-beta1.24067.1
- 17.9.0-preview-23531-02
+ 17.10.0-preview-24069-03$(MicrosoftBuildPackageVersion)
- 9.0.100-alpha.23531.3
+ 9.0.100-alpha.24069.1$(MicrosoftTemplateEngineAbstractionsPackageVersion)$(MicrosoftTemplateEngineAbstractionsPackageVersion)$(MicrosoftTemplateEngineAbstractionsPackageVersion)$(MicrosoftTemplateEngineAbstractionsPackageVersion)
- 9.0.100-alpha.23531.3
+ 9.0.100-alpha.24069.1
- 9.0.100-alpha.23531.3
+ 9.0.100-alpha.24069.1$(MicrosoftTemplateEngineMocksPackageVersion)$(MicrosoftTemplateEngineAbstractionsPackageVersion)$(MicrosoftTemplateEngineMocksPackageVersion)
- 12.8.0-beta.23525.2
+ 12.8.300-beta.24066.3
- 4.9.0-2.23531.10
- 4.9.0-2.23531.10
- 4.9.0-2.23531.10
- 4.9.0-2.23531.10
- 4.9.0-2.23531.10
- 4.9.0-2.23531.10
- 4.9.0-2.23531.10
+ 4.10.0-1.24067.21
+ 4.10.0-1.24067.21
+ 4.10.0-1.24067.21
+ 4.10.0-1.24067.21
+ 4.10.0-1.24067.21
+ 4.10.0-1.24067.21
+ 4.10.0-1.24067.21$(MicrosoftNetCompilersToolsetPackageVersion)
- 9.0.0-alpha.1.23531.6
- 9.0.0-alpha.1.23531.6
- 9.0.0-alpha.1.23531.6
- 9.0.0-alpha.1.23531.6
- 9.0.0-alpha.1.23531.6
- 9.0.0-alpha.1.23531.6
- 9.0.0-alpha.1.23531.6
+ 9.0.0-alpha.1.24069.6
+ 9.0.0-alpha.1.24069.6
+ 9.0.0-alpha.1.24069.6
+ 9.0.0-alpha.1.24069.6
+ 9.0.0-alpha.1.24069.6
+ 9.0.0-alpha.1.24069.6
+ 9.0.0-alpha.1.24069.6
- 7.0.0-preview.23531.7
- 7.0.0-preview.23531.7
- 7.0.0-preview.23531.7
+ 7.0.0-preview.24069.1
+ 7.0.0-preview.24069.1
+ 7.0.0-preview.24069.1
- 9.0.0-alpha.1.23530.1
+ 9.0.0-alpha.1.24070.4
@@ -171,17 +172,18 @@
4.0.1
-
- 9.0.0-beta.23528.2
+
+ 9.0.0-beta.24068.4
+ 9.0.0-beta.24068.4
- 8.0.0-beta.23510.3
- 8.0.0-beta.23510.3
- 8.0.0-beta.23510.3
- 8.0.0-beta.23510.3
- 8.0.0-beta.23510.3
- 8.0.0-beta.23510.3
+ 9.0.0-beta.24068.2
+ 9.0.0-beta.24068.2
+ 9.0.0-beta.24068.2
+ 9.0.0-beta.24068.2
+ 9.0.0-beta.24068.2
+ 9.0.0-beta.24068.2
@@ -191,10 +193,10 @@
6.12.06.1.0
- 9.0.0-beta.23528.2
+ 9.0.0-beta.24068.44.18.41.3.2
- 6.0.0-beta.22262.1
+ 8.0.0-beta.23607.1.exe
@@ -207,7 +209,7 @@
- 9.0.0-alpha.1.23528.4
+ 9.0.0-alpha.1.24065.1$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportPackageVersion)9.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-[A-z]*[\.]*\d*`))
diff --git a/eng/build.yml b/eng/build.yml
index 3126b7b5c240..7980caed2df5 100644
--- a/eng/build.yml
+++ b/eng/build.yml
@@ -21,7 +21,7 @@ jobs:
CreatePr: true
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-DOTNETSDK'
- MirrorBranch: release/8.0.1xx
+ MirrorBranch: release/8.0.2xx
MirrorRepo: sdk
- ${{ if not(contains(parameters.agentOs, 'TemplateEngine')) }}:
@@ -88,7 +88,7 @@ jobs:
-ci
-restore
$(_Test)
- -projects $(Build.SourcesDirectory)\src\Tests\UnitTests.proj
+ -projects $(Build.SourcesDirectory)\test\UnitTests.proj
/bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\TestInHelix.binlog
/p:_CustomHelixTargetQueue=${{ parameters.helixTargetQueue }}
$(_InternalRuntimeDownloadArgs)
@@ -120,7 +120,7 @@ jobs:
-ci
-restore
-test
- -projects $(Build.SourcesDirectory)\src\Tests\UnitTests.proj
+ -projects $(Build.SourcesDirectory)\test\UnitTests.proj
/bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\TestInHelix.binlog
/p:_CustomHelixTargetQueue=${{ parameters.helixTargetQueue }}
$(_InternalRuntimeDownloadArgs)
@@ -161,7 +161,7 @@ jobs:
-ci
-restore
-test
- -projects $(Build.SourcesDirectory)/src/Tests/UnitTests.proj
+ -projects $(Build.SourcesDirectory)/test/UnitTests.proj
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/TestInHelix.binlog
/p:_CustomHelixTargetQueue=${{ parameters.helixTargetQueue }}
$(_InternalRuntimeDownloadArgs)
@@ -268,7 +268,7 @@ jobs:
-restore
-test
-prepareMachine
- -projects $(Build.SourcesDirectory)/src/Tests/UnitTests.proj
+ -projects $(Build.SourcesDirectory)/test/UnitTests.proj
-configuration $(_BuildConfig)
/bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\TestInHelix.binlog
/p:_CustomHelixTargetQueue=${{ parameters.helixTargetQueue }}
@@ -302,7 +302,7 @@ jobs:
--ci
--restore
--test
- --projects $(Build.SourcesDirectory)/src/Tests/UnitTests.proj
+ --projects $(Build.SourcesDirectory)/test/UnitTests.proj
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/TestInHelix.binlog
/p:_CustomHelixTargetQueue=${{ parameters.helixTargetQueue }}
$(_InternalRuntimeDownloadArgs)
@@ -396,7 +396,7 @@ jobs:
-ci
-restore
$(_Test)
- -projects $(Build.SourcesDirectory)\src\Tests\Microsoft.TemplateEngine.Cli.UnitTests\Microsoft.TemplateEngine.Cli.UnitTests.csproj
+ -projects $(Build.SourcesDirectory)\test\Microsoft.TemplateEngine.Cli.UnitTests\Microsoft.TemplateEngine.Cli.UnitTests.csproj
/bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\TemplateEngine.Cli.UnitTests.binlog
$(_InternalRuntimeDownloadArgs)
displayName: Run TemplateEngine Cli Unit Tests
@@ -406,7 +406,7 @@ jobs:
-ci
-restore
$(_Test)
- -projects $(Build.SourcesDirectory)\src\Tests\dotnet-new.Tests\dotnet-new.IntegrationTests.csproj
+ -projects $(Build.SourcesDirectory)\test\dotnet-new.Tests\dotnet-new.IntegrationTests.csproj
/bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\dotnet-new.IntegrationTests.binlog
$(_InternalRuntimeDownloadArgs)
displayName: Run dotnet new Integration Tests
@@ -430,7 +430,7 @@ jobs:
-ci
-restore
-test
- -projects $(Build.SourcesDirectory)/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj
+ -projects $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/TemplateEngine.Cli.UnitTests.binlog
$(_InternalRuntimeDownloadArgs)
displayName: Run TemplateEngine Cli Unit Tests
@@ -440,7 +440,7 @@ jobs:
-ci
-restore
-test
- -projects $(Build.SourcesDirectory)/src/Tests/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
+ -projects $(Build.SourcesDirectory)/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/dotnet-new.IntegrationTests.binlog
$(_InternalRuntimeDownloadArgs)
displayName: Run dotnet new Integration Tests
diff --git a/eng/common/build.cmd b/eng/common/build.cmd
new file mode 100644
index 000000000000..99daf368abae
--- /dev/null
+++ b/eng/common/build.cmd
@@ -0,0 +1,3 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" %*"
+exit /b %ErrorLevel%
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index 33a6f2d0e248..510458eb35b8 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -19,6 +19,8 @@ Param(
[switch] $pack,
[switch] $publish,
[switch] $clean,
+ [switch] $verticalBuild,
+ [switch][Alias('pb')]$productBuild,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $ci,
@@ -58,6 +60,8 @@ function Print-Usage() {
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host " -clean Clean the solution"
+ Write-Host " -verticalBuild Run in 'vertical build' infra mode."
+ Write-Host " -productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
Write-Host ""
Write-Host "Advanced settings:"
@@ -120,6 +124,8 @@ function Build {
/p:Deploy=$deploy `
/p:Test=$test `
/p:Pack=$pack `
+ /p:DotNetBuildRepo=$($productBuild -or $verticalBuild) `
+ /p:ArcadeBuildVertical=$verticalBuild `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 2c17ba529b91..2dfb32f2ec49 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -22,6 +22,9 @@ usage()
echo " --sourceBuild Source-build the solution (short: -sb)"
echo " Will additionally trigger the following actions: --restore, --build, --pack"
echo " If --configuration is not set explicitly, will also set it to 'Release'"
+ echo " --productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
+ echo " Will additionally trigger the following actions: --restore, --build, --pack"
+ echo " If --configuration is not set explicitly, will also set it to 'Release'"
echo " --rebuild Rebuild solution"
echo " --test Run all unit tests in the solution (short: -t)"
echo " --integrationTest Run all integration tests in the solution"
@@ -59,6 +62,8 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
restore=false
build=false
source_build=false
+vertical_build=false
+product_build=false
rebuild=false
test=false
integration_test=false
@@ -126,6 +131,20 @@ while [[ $# > 0 ]]; do
-sourcebuild|-sb)
build=true
source_build=true
+ product_build=true
+ restore=true
+ pack=true
+ ;;
+ -productBuild|-pb)
+ build=true
+ product_build=true
+ restore=true
+ pack=true
+ ;;
+ -verticalbuild|-vb)
+ build=true
+ vertical_build=true
+ product_build=true
restore=true
pack=true
;;
@@ -219,7 +238,9 @@ function Build {
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
/p:Build=$build \
+ /p:DotNetBuildRepo=$product_build \
/p:ArcadeBuildFromSource=$source_build \
+ /p:ArcadeBuildVertical=$vertical_build \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index 4228f202e5bf..9fa764e78b04 100755
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -8,7 +8,7 @@ usage()
echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86"
echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine"
echo " for alpine can be specified with version: alpineX.YY or alpineedge"
- echo " for FreeBSD can be: freebsd12, freebsd13"
+ echo " for FreeBSD can be: freebsd13, freebsd14"
echo " for illumos can be: illumos"
echo " for Haiku can be: haiku."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
@@ -71,9 +71,9 @@ __AlpinePackages+=" krb5-dev"
__AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"
-__FreeBSDBase="12.4-RELEASE"
-__FreeBSDPkg="1.17.0"
-__FreeBSDABI="12"
+__FreeBSDBase="13.2-RELEASE"
+__FreeBSDPkg="1.20.0"
+__FreeBSDABI="13"
__FreeBSDPackages="libunwind"
__FreeBSDPackages+=" icu"
__FreeBSDPackages+=" libinotify"
@@ -182,12 +182,12 @@ while :; do
__AlpinePackages="${__AlpinePackages// lldb-dev/}"
__QEMUArch=riscv64
__UbuntuArch=riscv64
- __UbuntuRepo="http://deb.debian.org/debian-ports"
+ __UbuntuRepo="http://deb.debian.org/debian"
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
unset __LLDB_Package
- if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then
- __Keyring="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring"
+ if [[ -e "/usr/share/keyrings/debian-archive-keyring.gpg" ]]; then
+ __Keyring="--keyring /usr/share/keyrings/debian-archive-keyring.gpg --include=debian-archive-keyring"
fi
;;
ppc64le)
@@ -334,14 +334,14 @@ while :; do
__AlpineVersion="$__AlpineMajorVersion.$__AlpineMinoVersion"
fi
;;
- freebsd12)
+ freebsd13)
__CodeName=freebsd
__SkipUnmount=1
;;
- freebsd13)
+ freebsd14)
__CodeName=freebsd
- __FreeBSDBase="13.2-RELEASE"
- __FreeBSDABI="13"
+ __FreeBSDBase="14.0-RELEASE"
+ __FreeBSDABI="14"
__SkipUnmount=1
;;
illumos)
diff --git a/eng/common/cross/riscv64/sources.list.sid b/eng/common/cross/riscv64/sources.list.sid
index 65f730d224ca..b5f7a7e6e1eb 100644
--- a/eng/common/cross/riscv64/sources.list.sid
+++ b/eng/common/cross/riscv64/sources.list.sid
@@ -1 +1 @@
-deb http://deb.debian.org/debian-ports sid main
+deb http://deb.debian.org/debian sid main
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
index 00288a300653..3762640fdcf7 100644
--- a/eng/common/cross/toolchain.cmake
+++ b/eng/common/cross/toolchain.cmake
@@ -288,6 +288,8 @@ elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$")
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}")
endif()
+elseif(TARGET_ARCH_NAME STREQUAL "s390x")
+ add_toolchain_linker_flag("--target=${TOOLCHAIN}")
elseif(TARGET_ARCH_NAME STREQUAL "x86")
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
add_toolchain_linker_flag("--target=${TOOLCHAIN}")
@@ -335,6 +337,8 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
if(TARGET_ARCH_NAME STREQUAL "armel")
add_compile_options(-mfloat-abi=softfp)
endif()
+elseif(TARGET_ARCH_NAME STREQUAL "s390x")
+ add_compile_options("--target=${TOOLCHAIN}")
elseif(TARGET_ARCH_NAME STREQUAL "x86")
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
add_compile_options(--target=${TOOLCHAIN})
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index 435e7641341b..8fda30bdce2b 100644
--- a/eng/common/darc-init.ps1
+++ b/eng/common/darc-init.ps1
@@ -1,6 +1,6 @@
param (
$darcVersion = $null,
- $versionEndpoint = 'https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16',
+ $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16',
$verbosity = 'minimal',
$toolpath = $null
)
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index 84c1d0cc2e75..c305ae6bd771 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -2,7 +2,7 @@
source="${BASH_SOURCE[0]}"
darcVersion=''
-versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16'
+versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16'
verbosity='minimal'
while [[ $# > 0 ]]; do
diff --git a/eng/common/helixpublish.proj b/eng/common/helixpublish.proj
index d7f185856e79..c1323bf41210 100644
--- a/eng/common/helixpublish.proj
+++ b/eng/common/helixpublish.proj
@@ -1,3 +1,4 @@
+
diff --git a/eng/common/internal/Directory.Build.props b/eng/common/internal/Directory.Build.props
index dbf99d82a5c2..a735fe9a133c 100644
--- a/eng/common/internal/Directory.Build.props
+++ b/eng/common/internal/Directory.Build.props
@@ -1,4 +1,6 @@
+
+
diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj
index 7f5ce6d60813..8fa77e5b181f 100644
--- a/eng/common/internal/Tools.csproj
+++ b/eng/common/internal/Tools.csproj
@@ -1,5 +1,6 @@
+
net472false
@@ -27,4 +28,5 @@
+
diff --git a/eng/common/post-build/add-build-to-channel.ps1 b/eng/common/post-build/add-build-to-channel.ps1
index de2d957922a6..49938f0c89f7 100644
--- a/eng/common/post-build/add-build-to-channel.ps1
+++ b/eng/common/post-build/add-build-to-channel.ps1
@@ -2,7 +2,7 @@ param(
[Parameter(Mandatory=$true)][int] $BuildId,
[Parameter(Mandatory=$true)][int] $ChannelId,
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
- [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
)
diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1
index 8508397d7764..1e779fec4dd1 100644
--- a/eng/common/post-build/publish-using-darc.ps1
+++ b/eng/common/post-build/publish-using-darc.ps1
@@ -3,7 +3,7 @@ param(
[Parameter(Mandatory=$true)][int] $PublishingInfraVersion,
[Parameter(Mandatory=$true)][string] $AzdoToken,
[Parameter(Mandatory=$true)][string] $MaestroToken,
- [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
[Parameter(Mandatory=$true)][string] $WaitPublishingFinish,
[Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters,
[Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters
diff --git a/eng/common/post-build/redact-logs.ps1 b/eng/common/post-build/redact-logs.ps1
new file mode 100644
index 000000000000..82d91f6fd022
--- /dev/null
+++ b/eng/common/post-build/redact-logs.ps1
@@ -0,0 +1,81 @@
+[CmdletBinding(PositionalBinding=$False)]
+param(
+ [Parameter(Mandatory=$true, Position=0)][string] $InputPath,
+ [Parameter(Mandatory=$true)][string] $BinlogToolVersion,
+ [Parameter(Mandatory=$false)][string] $DotnetPath,
+ [Parameter(Mandatory=$false)][string] $PackageFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json',
+ # File with strings to redact - separated by newlines.
+ # For comments start the line with '# ' - such lines are ignored
+ [Parameter(Mandatory=$false)][string] $TokensFilePath,
+ [Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact
+)
+
+try {
+ . $PSScriptRoot\post-build-utils.ps1
+
+ $packageName = 'binlogtool'
+
+ $dotnet = $DotnetPath
+
+ if (!$dotnet) {
+ $dotnetRoot = InitializeDotNetCli -install:$true
+ $dotnet = "$dotnetRoot\dotnet.exe"
+ }
+
+ $toolList = & "$dotnet" tool list -g
+
+ if ($toolList -like "*$packageName*") {
+ & "$dotnet" tool uninstall $packageName -g
+ }
+
+ $toolPath = "$PSScriptRoot\..\..\..\.tools"
+ $verbosity = 'minimal'
+
+ New-Item -ItemType Directory -Force -Path $toolPath
+
+ Push-Location -Path $toolPath
+
+ try {
+ Write-Host "Installing Binlog redactor CLI..."
+ Write-Host "'$dotnet' new tool-manifest"
+ & "$dotnet" new tool-manifest
+ Write-Host "'$dotnet' tool install $packageName --local --add-source '$PackageFeed' -v $verbosity --version $BinlogToolVersion"
+ & "$dotnet" tool install $packageName --local --add-source "$PackageFeed" -v $verbosity --version $BinlogToolVersion
+
+ if (Test-Path $TokensFilePath) {
+ Write-Host "Adding additional sensitive data for redaction from file: " $TokensFilePath
+ $TokensToRedact += Get-Content -Path $TokensFilePath | Foreach {$_.Trim()} | Where { $_ -notmatch "^# " }
+ }
+
+ $optionalParams = [System.Collections.ArrayList]::new()
+
+ Foreach ($p in $TokensToRedact)
+ {
+ if($p -match '^\$\(.*\)$')
+ {
+ Write-Host ("Ignoring token {0} as it is probably unexpanded AzDO variable" -f $p)
+ }
+ elseif($p)
+ {
+ $optionalParams.Add("-p:" + $p) | Out-Null
+ }
+ }
+
+ & $dotnet binlogtool redact --input:$InputPath --recurse --in-place `
+ @optionalParams
+
+ if ($LastExitCode -ne 0) {
+ Write-PipelineTelemetryError -Category 'Redactor' -Type 'warning' -Message "Problems using Redactor tool (exit code: $LastExitCode). But ignoring them now."
+ }
+ }
+ finally {
+ Pop-Location
+ }
+
+ Write-Host 'done.'
+}
+catch {
+ Write-Host $_
+ Write-PipelineTelemetryError -Category 'Redactor' -Message "There was an error while trying to redact logs. Error: $_"
+ ExitWithExitCode 1
+}
diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1
index 55dea518ac58..ac9a95778fcd 100644
--- a/eng/common/post-build/trigger-subscriptions.ps1
+++ b/eng/common/post-build/trigger-subscriptions.ps1
@@ -2,7 +2,7 @@ param(
[Parameter(Mandatory=$true)][string] $SourceRepo,
[Parameter(Mandatory=$true)][int] $ChannelId,
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
- [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
)
diff --git a/eng/common/sdl/trim-assets-version.ps1 b/eng/common/sdl/trim-assets-version.ps1
index a2e004877045..0daa2a9e9462 100644
--- a/eng/common/sdl/trim-assets-version.ps1
+++ b/eng/common/sdl/trim-assets-version.ps1
@@ -72,4 +72,4 @@ catch {
Write-Host $_
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
-}
\ No newline at end of file
+}
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index 0b01531357e3..01c0dd995e4b 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -136,7 +136,7 @@ jobs:
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
- ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}:
- - task: NuGetAuthenticate@0
+ - task: NuGetAuthenticate@1
- ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}:
- task: DownloadPipelineArtifact@2
diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml
index 42017109f374..3115990d5114 100644
--- a/eng/common/templates/job/publish-build-assets.yml
+++ b/eng/common/templates/job/publish-build-assets.yml
@@ -48,8 +48,8 @@ jobs:
- group: AzureDevOps-Artifact-Feeds-Pats
- name: runCodesignValidationInjection
value: false
- - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}:
- - template: /eng/common/templates/post-build/common-variables.yml
+ # unconditional - needed for logs publishing (redactor tool version)
+ - template: /eng/common/templates/post-build/common-variables.yml
pool:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
@@ -63,6 +63,10 @@ jobs:
steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - checkout: self
+ fetchDepth: 3
+ clean: true
+
- task: DownloadBuildArtifacts@0
displayName: Download artifact
inputs:
@@ -72,7 +76,7 @@ jobs:
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- - task: NuGetAuthenticate@0
+ - task: NuGetAuthenticate@1
- task: PowerShell@2
displayName: Publish Build Assets
@@ -81,7 +85,7 @@ jobs:
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
- /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
+ /p:MaestroApiEndpoint=https://maestro.dot.net
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
/p:OfficialBuildId=$(Build.BuildNumber)
condition: ${{ parameters.condition }}
diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml
index b98202aa02d8..795233662623 100644
--- a/eng/common/templates/job/source-index-stage1.yml
+++ b/eng/common/templates/job/source-index-stage1.yml
@@ -1,6 +1,6 @@
parameters:
runAsPublic: false
- sourceIndexPackageVersion: 1.0.1-20230228.2
+ sourceIndexPackageVersion: 1.0.1-20231213.4
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
preSteps: []
@@ -30,20 +30,20 @@ jobs:
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
- demands: ImageOverride -equals windows.vs2019.amd64.open
+ demands: ImageOverride -equals windows.vs2022.amd64.open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
- demands: ImageOverride -equals windows.vs2019.amd64
+ demands: ImageOverride -equals windows.vs2022.amd64
steps:
- ${{ each preStep in parameters.preSteps }}:
- ${{ preStep }}
- task: UseDotNet@2
- displayName: Use .NET Core SDK 6
+ displayName: Use .NET 8 SDK
inputs:
packageType: sdk
- version: 6.0.x
+ version: 8.0.x
installationPath: $(Agent.TempDirectory)/dotnet
workingDirectory: $(Agent.TempDirectory)
diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml
index c24193acfc98..b9ede10bf099 100644
--- a/eng/common/templates/post-build/common-variables.yml
+++ b/eng/common/templates/post-build/common-variables.yml
@@ -7,7 +7,7 @@ variables:
# Default Maestro++ API Endpoint and API Version
- name: MaestroApiEndPoint
- value: "https://maestro-prod.westus2.cloudapp.azure.com"
+ value: "https://maestro.dot.net"
- name: MaestroApiAccessToken
value: $(MaestroAccessToken)
- name: MaestroApiVersion
@@ -17,6 +17,8 @@ variables:
value: 3.0.0
- name: SymbolToolVersion
value: 1.0.1
+ - name: BinlogToolVersion
+ value: 1.0.11
- name: runCodesignValidationInjection
value: false
diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml
index ef720f9d7819..bbc010fe7326 100644
--- a/eng/common/templates/post-build/post-build.yml
+++ b/eng/common/templates/post-build/post-build.yml
@@ -169,7 +169,7 @@ stages:
# This is necessary whenever we want to publish/restore to an AzDO private feed
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
# otherwise it'll complain about accessing a private feed.
- - task: NuGetAuthenticate@0
+ - task: NuGetAuthenticate@1
displayName: 'Authenticate to AzDO Feeds'
# Signing validation will optionally work with the buildmanifest file which is downloaded from
@@ -187,6 +187,7 @@ stages:
parameters:
StageLabel: 'Validation'
JobLabel: 'Signing'
+ BinlogToolVersion: $(BinlogToolVersion)
- job:
displayName: SourceLink Validation
@@ -266,7 +267,7 @@ stages:
BARBuildId: ${{ parameters.BARBuildId }}
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
- - task: NuGetAuthenticate@0
+ - task: NuGetAuthenticate@1
- task: PowerShell@2
displayName: Publish Using Darc
diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml
index 88f238f36bfd..80861297ddc0 100644
--- a/eng/common/templates/steps/publish-logs.yml
+++ b/eng/common/templates/steps/publish-logs.yml
@@ -1,6 +1,9 @@
parameters:
StageLabel: ''
JobLabel: ''
+ CustomSensitiveDataList: ''
+ # A default - in case value from eng/common/templates/post-build/common-variables.yml is not passed
+ BinlogToolVersion: '1.0.11'
steps:
- task: Powershell@2
@@ -12,7 +15,30 @@ steps:
Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
continueOnError: true
condition: always()
-
+
+- task: PowerShell@2
+ displayName: Redact Logs
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1
+ # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml
+ # Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
+ # If the file exists - sensitive data for redaction will be sourced from it
+ # (single entry per line, lines starting with '# ' are considered comments and skipped)
+ arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs'
+ -BinlogToolVersion ${{parameters.BinlogToolVersion}}
+ -TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
+ '$(publishing-dnceng-devdiv-code-r-build-re)'
+ '$(MaestroAccessToken)'
+ '$(dn-bot-all-orgs-artifact-feeds-rw)'
+ '$(akams-client-id)'
+ '$(akams-client-secret)'
+ '$(microsoft-symbol-server-pat)'
+ '$(symweb-symbol-server-pat)'
+ '$(dn-bot-all-orgs-build-rw-code-rw)'
+ ${{parameters.CustomSensitiveDataList}}
+ continueOnError: true
+ condition: always()
+
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml
index 41bbb915736a..1793eb6beb9f 100644
--- a/eng/common/templates/steps/source-build.yml
+++ b/eng/common/templates/steps/source-build.yml
@@ -94,6 +94,7 @@ steps:
$baseOsArgs \
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
/p:ArcadeBuildFromSource=true \
+ /p:DotNetBuildRepo=true \
/p:AssetManifestFileName=$assetManifestFileName
displayName: Build
@@ -105,7 +106,7 @@ steps:
Contents: |
**/*.log
**/*.binlog
- artifacts/source-build/self/prebuilt-report/**
+ artifacts/sb/prebuilt-report/**
TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
CleanTargetFolder: true
continueOnError: true
@@ -126,4 +127,4 @@ steps:
- task: ComponentGovernanceComponentDetection@0
displayName: Component Detection (Exclude upstream cache)
inputs:
- ignoreDirectories: '$(Build.SourcesDirectory)/artifacts/source-build/self/src/artifacts/obj/source-built-upstream-cache'
+ ignoreDirectories: '$(Build.SourcesDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache'
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index e8def7e6a85f..0da65b5748a7 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -165,11 +165,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
}
- # Source Build uses DotNetCoreSdkDir variable
- if ($env:DotNetCoreSdkDir -ne $null) {
- $env:DOTNET_INSTALL_DIR = $env:DotNetCoreSdkDir
- }
-
# Find the first path on %PATH% that contains the dotnet.exe
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
$dotnetExecutable = GetExecutableFileName 'dotnet'
@@ -601,7 +596,15 @@ function InitializeBuildTool() {
ExitWithExitCode 1
}
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')
- $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net8.0' }
+
+ # Use override if it exists - commonly set by source-build
+ if ($null -eq $env:_OverrideArcadeInitializeBuildToolFramework) {
+ $initializeBuildToolFramework="net9.0"
+ } else {
+ $initializeBuildToolFramework=$env:_OverrideArcadeInitializeBuildToolFramework
+ }
+
+ $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = $initializeBuildToolFramework }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
@@ -676,8 +679,14 @@ function Read-ArcadeSdkVersion() {
}
function InitializeToolset() {
- if (Test-Path variable:global:_ToolsetBuildProj) {
- return $global:_ToolsetBuildProj
+ # For Unified Build/Source-build support, check whether the environment variable is
+ # set. If it is, then use this as the toolset build project.
+ if ($env:_InitializeToolset -ne $null) {
+ return $global:_InitializeToolset = $env:_InitializeToolset
+ }
+
+ if (Test-Path variable:global:_InitializeToolset) {
+ return $global:_InitializeToolset
}
$nugetCache = GetNuGetPackageCachePath
@@ -688,7 +697,7 @@ function InitializeToolset() {
if (Test-Path $toolsetLocationFile) {
$path = Get-Content $toolsetLocationFile -TotalCount 1
if (Test-Path $path) {
- return $global:_ToolsetBuildProj = $path
+ return $global:_InitializeToolset = $path
}
}
@@ -711,7 +720,7 @@ function InitializeToolset() {
throw "Invalid toolset path: $path"
}
- return $global:_ToolsetBuildProj = $path
+ return $global:_InitializeToolset = $path
}
function ExitWithExitCode([int] $exitCode) {
@@ -763,12 +772,10 @@ function MSBuild() {
# new scripts need to work with old packages, so we need to look for the old names/versions
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')),
- (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.ArcadeLogging.dll')),
- (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
- (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')),
- (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
(Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.ArcadeLogging.dll')),
- (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll'))
+ (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll')),
+ (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.ArcadeLogging.dll')),
+ (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.Arcade.Sdk.dll'))
)
$selectedPath = $null
foreach ($path in $possiblePaths) {
@@ -827,7 +834,8 @@ function MSBuild-Core() {
}
}
- $env:ARCADE_BUILD_TOOL_COMMAND = "$($buildTool.Path) $cmdArgs"
+ # Be sure quote the path in case there are spaces in the dotnet installation location.
+ $env:ARCADE_BUILD_TOOL_COMMAND = "`"$($buildTool.Path)`" $cmdArgs"
$exitCode = Exec-Process $buildTool.Path $cmdArgs
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 710e64df967f..ece4b7307953 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -123,11 +123,6 @@ function InitializeDotNetCli {
# so it doesn't output warnings to the console.
export LTTNG_HOME="$HOME"
- # Source Build uses DotNetCoreSdkDir variable
- if [[ -n "${DotNetCoreSdkDir:-}" ]]; then
- export DOTNET_INSTALL_DIR="$DotNetCoreSdkDir"
- fi
-
# Find the first path on $PATH that contains the dotnet.exe
if [[ "$use_installed_dotnet_cli" == true && $global_json_has_runtimes == false && -z "${DOTNET_INSTALL_DIR:-}" ]]; then
local dotnet_path=`command -v dotnet`
@@ -310,7 +305,7 @@ function GetDotNetInstallScript {
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
if command -v openssl &> /dev/null; then
echo "Curl failed; dumping some information about dotnet.microsoft.com for later investigation"
- echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443
+ echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443 || true
fi
echo "Will now retry the same URL with verbose logging."
with_retries curl "$install_script_url" -sSL --verbose --retry 10 --create-dirs -o "$install_script" || {
@@ -341,7 +336,12 @@ function InitializeBuildTool {
# return values
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
- _InitializeBuildToolFramework="net8.0"
+ # use override if it exists - commonly set by source-build
+ if [[ "${_OverrideArcadeInitializeBuildToolFramework:-x}" == "x" ]]; then
+ _InitializeBuildToolFramework="net9.0"
+ else
+ _InitializeBuildToolFramework="${_OverrideArcadeInitializeBuildToolFramework}"
+ fi
}
# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
@@ -453,12 +453,10 @@ function MSBuild {
local possiblePaths=()
possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" )
- possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.ArcadeLogging.dll" )
- possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
- possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" )
- possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.Arcade.Sdk.dll" )
+ possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.ArcadeLogging.dll" )
+ possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.Arcade.Sdk.dll" )
for path in "${possiblePaths[@]}"; do
if [[ -f $path ]]; then
selectedPath=$path
diff --git a/eng/dependabot/Packages.props b/eng/dependabot/Packages.props
index 76f58d0b1abb..a4835e1c8d45 100644
--- a/eng/dependabot/Packages.props
+++ b/eng/dependabot/Packages.props
@@ -4,9 +4,9 @@
-
+
-
-
+
+
diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1
index bd9e425b4cc7..3a73883285cc 100644
--- a/eng/restore-toolset.ps1
+++ b/eng/restore-toolset.ps1
@@ -26,8 +26,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "5.0.0"
InstallDotNetSharedFramework "6.0.0"
InstallDotNetSharedFramework "7.0.0"
- InstallDotNetSharedFramework "8.0.0-preview.7.23375.6"
- InstallDotNetSharedFramework "8.0.0-rc.2.23457.7"
+ InstallDotNetSharedFramework "8.0.0"
CreateBuildEnvScripts
CreateVSShortcut
@@ -155,7 +154,7 @@ function CleanOutStage0ToolsetsAndRuntimes {
Remove-Item (Join-Path $aspnetRuntimePath "$majorVersion.*") -Recurse
Remove-Item (Join-Path $coreRuntimePath "$majorVersion.*") -Recurse
Remove-Item (Join-Path $wdRuntimePath "$majorVersion.*") -Recurse
- Remove-Item (Join-Path $sdkPath "$majorVersion.*") -Recurse
+ Remove-Item (Join-Path $sdkPath "*") -Recurse
Remove-Item (Join-Path $dotnetRoot "packs") -Recurse
Remove-Item (Join-Path $dotnetRoot "sdk-manifests") -Recurse
Remove-Item (Join-Path $dotnetRoot "templates") -Recurse
diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh
index 3bd05939857b..88f4145e76ed 100644
--- a/eng/restore-toolset.sh
+++ b/eng/restore-toolset.sh
@@ -27,8 +27,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "5.0.0"
InstallDotNetSharedFramework "6.0.0"
InstallDotNetSharedFramework "7.0.0"
- InstallDotNetSharedFramework "8.0.0-preview.7.23375.6"
- InstallDotNetSharedFramework "8.0.0-rc.2.23457.7"
+ InstallDotNetSharedFramework "8.0.0"
CreateBuildEnvScript
}
@@ -95,7 +94,7 @@ function CleanOutStage0ToolsetsAndRuntimes {
local aspnetRuntimePath="$dotnetRoot/shared/Microsoft.AspNetCore.App/$majorVersion.*"
local coreRuntimePath="$dotnetRoot/shared/Microsoft.NETCore.App/$majorVersion.*"
local wdRuntimePath="$dotnetRoot/shared/Microsoft.WindowsDesktop.App/$majorVersion.*"
- local sdkPath="$dotnetRoot/sdk/$majorVersion.*"
+ local sdkPath="$dotnetRoot/sdk/*"
if [ -f "$versionPath" ]; then
local lastInstalledSDK=$(cat $versionPath)
diff --git a/global.json b/global.json
index db9f8ba1d300..b056829b4fb9 100644
--- a/global.json
+++ b/global.json
@@ -1,12 +1,12 @@
{
"tools": {
- "dotnet": "9.0.100-alpha.1.23511.2",
+ "dotnet": "9.0.100-alpha.1.23615.4",
"runtimes": {
"dotnet": [
"$(VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion)"
],
"aspnetcore": [
- "$(MicrosoftAspNetCoreAppRefPackageVersion)"
+ "$(MicrosoftAspNetCoreComponentsSdkAnalyzersPackageVersion)"
]
},
"vs-opt": {
@@ -14,7 +14,7 @@
}
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23528.2",
- "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.23528.2"
+ "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24068.4",
+ "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24068.4"
}
}
diff --git a/scripts/register-completions.ps1 b/scripts/register-completions.ps1
index 88c416cd8340..dac468c0d546 100644
--- a/scripts/register-completions.ps1
+++ b/scripts/register-completions.ps1
@@ -1,7 +1,7 @@
-# PowerShell parameter completion shim for the dotnet CLI
+# PowerShell parameter completion shim for the dotnet CLI
Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock {
- param($commandName, $wordToComplete, $cursorPosition)
- dotnet complete --position $cursorPosition "$wordToComplete" | ForEach-Object {
- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
- }
- }
\ No newline at end of file
+ param($wordToComplete, $commandAst, $cursorPosition)
+ dotnet complete --position $cursorPosition "$commandAst" | ForEach-Object {
+ [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
+ }
+}
\ No newline at end of file
diff --git a/sdk.sln b/sdk.sln
index 2644b853a868..91faf55b21b5 100644
--- a/sdk.sln
+++ b/sdk.sln
@@ -43,31 +43,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{580D1AE7
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{5293658E-96D2-421F-A789-D0B6BA129570}"
ProjectSection(SolutionItems) = preProject
- src\Tests\Common\Program.cs = src\Tests\Common\Program.cs
+ test\Common\Program.cs = test\Common\Program.cs
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Build.Tests", "src\Tests\Microsoft.NET.Build.Tests\Microsoft.NET.Build.Tests.csproj", "{52CB4546-DD2D-4207-B6E1-494C9506D1C1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Build.Tests", "test\Microsoft.NET.Build.Tests\Microsoft.NET.Build.Tests.csproj", "{52CB4546-DD2D-4207-B6E1-494C9506D1C1}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Clean.Tests", "src\Tests\Microsoft.NET.Clean.Tests\Microsoft.NET.Clean.Tests.csproj", "{5CBFF0EE-71EA-49CC-8369-34A9A62C8116}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Clean.Tests", "test\Microsoft.NET.Clean.Tests\Microsoft.NET.Clean.Tests.csproj", "{5CBFF0EE-71EA-49CC-8369-34A9A62C8116}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Pack.Tests", "src\Tests\Microsoft.NET.Pack.Tests\Microsoft.NET.Pack.Tests.csproj", "{8746DC05-3035-4F24-9F2C-BAAAB5B50FD3}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Pack.Tests", "test\Microsoft.NET.Pack.Tests\Microsoft.NET.Pack.Tests.csproj", "{8746DC05-3035-4F24-9F2C-BAAAB5B50FD3}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Publish.Tests", "src\Tests\Microsoft.NET.Publish.Tests\Microsoft.NET.Publish.Tests.csproj", "{5B3E6EC9-AD8D-4F68-A9F8-C60CF11F4753}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Publish.Tests", "test\Microsoft.NET.Publish.Tests\Microsoft.NET.Publish.Tests.csproj", "{5B3E6EC9-AD8D-4F68-A9F8-C60CF11F4753}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Rebuild.Tests", "src\Tests\Microsoft.NET.Rebuild.Tests\Microsoft.NET.Rebuild.Tests.csproj", "{8283544E-9704-40C5-BEC2-2781413AA3CF}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Rebuild.Tests", "test\Microsoft.NET.Rebuild.Tests\Microsoft.NET.Rebuild.Tests.csproj", "{8283544E-9704-40C5-BEC2-2781413AA3CF}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Restore.Tests", "src\Tests\Microsoft.NET.Restore.Tests\Microsoft.NET.Restore.Tests.csproj", "{112668D7-322D-4F83-A6CE-B814C25AD3BF}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Restore.Tests", "test\Microsoft.NET.Restore.Tests\Microsoft.NET.Restore.Tests.csproj", "{112668D7-322D-4F83-A6CE-B814C25AD3BF}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.TestFramework", "src\Tests\Microsoft.NET.TestFramework\Microsoft.NET.TestFramework.csproj", "{CAF71BDC-7B7D-4A43-AB8C-E440A1E4F108}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.TestFramework", "test\Microsoft.NET.TestFramework\Microsoft.NET.TestFramework.csproj", "{CAF71BDC-7B7D-4A43-AB8C-E440A1E4F108}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CommandLine", "CommandLine", "{7C6A88D0-DBCC-4933-A92D-A0AC133DD5FC}"
ProjectSection(SolutionItems) = preProject
- src\Tests\Common\CommandLine\TestCommandLine.Default.cs = src\Tests\Common\CommandLine\TestCommandLine.Default.cs
+ test\Common\CommandLine\TestCommandLine.Default.cs = test\Common\CommandLine\TestCommandLine.Default.cs
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.ToolPack.Tests", "src\Tests\Microsoft.NET.ToolPack.Tests\Microsoft.NET.ToolPack.Tests.csproj", "{6F72FAA2-4E46-4382-940A-4F0290E070E2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.ToolPack.Tests", "test\Microsoft.NET.ToolPack.Tests\Microsoft.NET.ToolPack.Tests.csproj", "{6F72FAA2-4E46-4382-940A-4F0290E070E2}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelemetryStdOutLogger", "src\Tests\TelemetryStdOutLogger\TelemetryStdOutLogger.csproj", "{E740A596-2CAE-476C-8062-49705C3A9CF0}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelemetryStdOutLogger", "test\TelemetryStdOutLogger\TelemetryStdOutLogger.csproj", "{E740A596-2CAE-476C-8062-49705C3A9CF0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cli", "Cli", "{9CEF03F6-1A61-431A-8ABD-9095974629AE}"
EndProject
@@ -93,35 +93,35 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\Layout\redist
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "toolset-tasks", "src\Layout\toolset-tasks\toolset-tasks.csproj", "{C687CA8D-9843-4045-BC20-917953F6C864}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Msbuild.Tests.Utilities", "src\Tests\Msbuild.Tests.Utilities\Msbuild.Tests.Utilities.csproj", "{64294C35-9001-4FF9-975F-43D283EE5FA9}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Msbuild.Tests.Utilities", "test\Msbuild.Tests.Utilities\Msbuild.Tests.Utilities.csproj", "{64294C35-9001-4FF9-975F-43D283EE5FA9}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet.Tests", "src\Tests\dotnet.Tests\dotnet.Tests.csproj", "{C5F191E5-BF2E-4A7A-AE1D-E2393AAA6F99}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet.Tests", "test\dotnet.Tests\dotnet.Tests.csproj", "{C5F191E5-BF2E-4A7A-AE1D-E2393AAA6F99}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.ComponentMocks", "src\Tests\Microsoft.DotNet.Tools.Tests.ComponentMocks\Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj", "{99334000-EBF8-44D9-90D0-BE998ED3FE60}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.ComponentMocks", "test\Microsoft.DotNet.Tools.Tests.ComponentMocks\Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj", "{99334000-EBF8-44D9-90D0-BE998ED3FE60}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-msbuild.Tests", "src\Tests\dotnet-msbuild.Tests\dotnet-msbuild.Tests.csproj", "{8FB015CE-1900-41EE-8E68-C222CE1B8561}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-msbuild.Tests", "test\dotnet-msbuild.Tests\dotnet-msbuild.Tests.csproj", "{8FB015CE-1900-41EE-8E68-C222CE1B8561}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-sln.Tests", "src\Tests\dotnet-sln.Tests\dotnet-sln.Tests.csproj", "{5D421BE2-66A9-43FC-877C-620ACED021EB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-sln.Tests", "test\dotnet-sln.Tests\dotnet-sln.Tests.csproj", "{5D421BE2-66A9-43FC-877C-620ACED021EB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentsReflector", "src\Tests\ArgumentsReflector\ArgumentsReflector.csproj", "{587A6639-FA2A-498C-8FA2-F77925DB732B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentsReflector", "test\ArgumentsReflector\ArgumentsReflector.csproj", "{587A6639-FA2A-498C-8FA2-F77925DB732B}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentForwarding.Tests", "src\Tests\ArgumentForwarding.Tests\ArgumentForwarding.Tests.csproj", "{2D8AA9EA-3013-47DE-B2DD-E074F67467ED}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentForwarding.Tests", "test\ArgumentForwarding.Tests\ArgumentForwarding.Tests.csproj", "{2D8AA9EA-3013-47DE-B2DD-E074F67467ED}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndToEnd.Tests", "src\Tests\EndToEnd.Tests\EndToEnd.Tests.csproj", "{A0EFB2CB-517F-4746-902E-D0EBEFFBD89B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndToEnd.Tests", "test\EndToEnd.Tests\EndToEnd.Tests.csproj", "{A0EFB2CB-517F-4746-902E-D0EBEFFBD89B}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Cli.Sln.Internal.Tests", "src\Tests\Microsoft.DotNet.Cli.Sln.Internal.Tests\Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj", "{82D910C3-A5E2-41F0-A142-F4F2D770CB59}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Cli.Sln.Internal.Tests", "test\Microsoft.DotNet.Cli.Sln.Internal.Tests\Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj", "{82D910C3-A5E2-41F0-A142-F4F2D770CB59}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Cli.Utils.Tests", "src\Tests\Microsoft.DotNet.Cli.Utils.Tests\Microsoft.DotNet.Cli.Utils.Tests.csproj", "{C34FB893-2320-41A3-9D38-0061C22A6464}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Cli.Utils.Tests", "test\Microsoft.DotNet.Cli.Utils.Tests\Microsoft.DotNet.Cli.Utils.Tests.csproj", "{C34FB893-2320-41A3-9D38-0061C22A6464}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.MSBuildSdkResolver.Tests", "src\Tests\Microsoft.DotNet.MSBuildSdkResolver.Tests\Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj", "{0AE2AB83-1F0D-4E04-9C8D-5C35CE97FDDC}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.MSBuildSdkResolver.Tests", "test\Microsoft.DotNet.MSBuildSdkResolver.Tests\Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj", "{0AE2AB83-1F0D-4E04-9C8D-5C35CE97FDDC}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.PackageInstall.Tests", "src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj", "{3D20D19D-74FB-4A43-B78C-B0AF90A696A0}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.PackageInstall.Tests", "test\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj", "{3D20D19D-74FB-4A43-B78C-B0AF90A696A0}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities.Tests", "src\Tests\Microsoft.DotNet.Tools.Tests.Utilities.Tests\Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj", "{BE6B9618-2262-4FF7-B762-FB97A7A1A0B8}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities.Tests", "test\Microsoft.DotNet.Tools.Tests.Utilities.Tests\Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj", "{BE6B9618-2262-4FF7-B762-FB97A7A1A0B8}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "msbuild.Integration.Tests", "src\Tests\msbuild.Integration.Tests\msbuild.Integration.Tests.csproj", "{45281FB4-EAFA-4D62-84BA-47546C04D653}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "msbuild.Integration.Tests", "test\msbuild.Integration.Tests\msbuild.Integration.Tests.csproj", "{45281FB4-EAFA-4D62-84BA-47546C04D653}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelixTasks", "src\Tests\HelixTasks\HelixTasks.csproj", "{818165C4-6D22-4FA6-AAAF-DC66DA72450A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelixTasks", "test\HelixTasks\HelixTasks.csproj", "{818165C4-6D22-4FA6-AAAF-DC66DA72450A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebSdk", "WebSdk", "{974F9450-8895-41D9-8328-D55AFF81A814}"
ProjectSection(SolutionItems) = preProject
@@ -159,7 +159,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Web.Tasks
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Worker.Tasks", "src\WebSdk\Worker\Tasks\Microsoft.NET.Sdk.Worker.Tasks.csproj", "{ACB5302C-8641-4E12-B7F7-0122D2A97C31}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Publish.Tasks.Tests", "src\Tests\Microsoft.NET.Sdk.Publish.Tasks.Tests\Microsoft.NET.Sdk.Publish.Tasks.Tests.csproj", "{1F26FAE6-2654-4E83-8936-146134638C59}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Publish.Tasks.Tests", "test\Microsoft.NET.Sdk.Publish.Tasks.Tests\Microsoft.NET.Sdk.Publish.Tasks.Tests.csproj", "{1F26FAE6-2654-4E83-8936-146134638C59}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sdk (2)", "Sdk (2)", "{F717D467-EF88-49B9-AD67-55FC6350A9DE}"
ProjectSection(SolutionItems) = preProject
@@ -254,7 +254,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tasks (2)", "Tasks (2)", "{
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TemplateLocator", "src\Microsoft.DotNet.TemplateLocator\Microsoft.DotNet.TemplateLocator.csproj", "{89F798D9-A8BA-4556-B2A2-39CEF3587093}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TemplateLocator.Tests", "src\Tests\Microsoft.DotNet.TemplateLocator.Tests\Microsoft.DotNet.TemplateLocator.Tests.csproj", "{360F049F-D501-478A-98BD-A2BA4DB000B9}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TemplateLocator.Tests", "test\Microsoft.DotNet.TemplateLocator.Tests\Microsoft.DotNet.TemplateLocator.Tests.csproj", "{360F049F-D501-478A-98BD-A2BA4DB000B9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resolvers", "Resolvers", "{8F22FBD6-BDC8-431E-8402-B7460D3A9724}"
EndProject
@@ -266,7 +266,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.WorkloadM
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkloadManifestValidator", "src\Resolvers\WorkloadManifestValidator\WorkloadManifestValidator.csproj", "{565411E4-E89D-4DF3-ADD5-55D3295F30EE}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.WorkloadManifestReader.Tests", "src\Tests\Microsoft.NET.Sdk.WorkloadManifestReader.Tests\Microsoft.NET.Sdk.WorkloadManifestReader.Tests.csproj", "{988D4839-B97F-42BB-A045-C79157CA7780}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.WorkloadManifestReader.Tests", "test\Microsoft.NET.Sdk.WorkloadManifestReader.Tests\Microsoft.NET.Sdk.WorkloadManifestReader.Tests.csproj", "{988D4839-B97F-42BB-A045-C79157CA7780}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver", "src\Resolvers\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.csproj", "{56F189B0-6A8E-4A9D-B7AE-24241204E98D}"
EndProject
@@ -276,15 +276,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch", "src\BuiltIn
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Watch.BrowserRefresh", "src\BuiltInTools\BrowserRefresh\Microsoft.AspNetCore.Watch.BrowserRefresh.csproj", "{A82EF2B9-24BC-4569-8FE5-9EF51017F4CB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch.Tests", "src\Tests\dotnet-watch.Tests\dotnet-watch.Tests.csproj", "{CCE1A328-9CFE-44D3-B68F-FE84A039ACEA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch.Tests", "test\dotnet-watch.Tests\dotnet-watch.Tests.csproj", "{CCE1A328-9CFE-44D3-B68F-FE84A039ACEA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Watch.BrowserRefresh.Tests", "src\Tests\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj", "{81ADA3FA-AC26-4149-8CFC-EC7808ECB820}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Watch.BrowserRefresh.Tests", "test\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj", "{81ADA3FA-AC26-4149-8CFC-EC7808ECB820}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetWatchTasks", "src\BuiltInTools\DotNetWatchTasks\DotNetWatchTasks.csproj", "{A41DF752-6F21-4036-AD02-DD37B11A2723}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.BlazorWebAssembly.Tasks", "src\BlazorWasmSdk\Tasks\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.csproj", "{4AE60971-C960-4DDF-B671-8B3E32C1AFD2}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.BlazorWebAssembly.Tests", "src\Tests\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj", "{CB7F74C6-BF0A-4CD6-94B4-BBF47AF9BB56}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.BlazorWebAssembly.Tests", "test\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj", "{CB7F74C6-BF0A-4CD6-94B4-BBF47AF9BB56}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.BlazorWebAssembly.Tool", "src\BlazorWasmSdk\Tool\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.csproj", "{6CFB4CBF-1618-4D13-8880-518939E1809A}"
EndProject
@@ -304,9 +304,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RazorSdk", "RazorSdk", "{E9
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Razor.Tasks", "src\RazorSdk\Tasks\Microsoft.NET.Sdk.Razor.Tasks.csproj", "{8A0288C8-3F81-4CE1-B81A-C9BCDE506E57}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Razor.Tests", "src\Tests\Microsoft.NET.Sdk.Razor.Tests\Microsoft.NET.Sdk.Razor.Tests.csproj", "{8076A8AF-01FA-4B3C-B2BB-BC612B1BD7D5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Razor.Tests", "test\Microsoft.NET.Sdk.Razor.Tests\Microsoft.NET.Sdk.Razor.Tests.csproj", "{8076A8AF-01FA-4B3C-B2BB-BC612B1BD7D5}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Razor.Tool.Tests", "src\Tests\Microsoft.NET.Sdk.Razor.Tool.Tests\Microsoft.NET.Sdk.Razor.Tool.Tests.csproj", "{08C9E634-39F3-4B24-BCEA-D0B21971EBBE}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Razor.Tool.Tests", "test\Microsoft.NET.Sdk.Razor.Tool.Tests\Microsoft.NET.Sdk.Razor.Tool.Tests.csproj", "{08C9E634-39F3-4B24-BCEA-D0B21971EBBE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tool", "Tool", "{5BE2A52C-E48E-4AFC-A530-47B61A040694}"
EndProject
@@ -349,21 +349,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiCompat", "ApiCompat", "{
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompatibility", "src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompatibility\Microsoft.DotNet.ApiCompatibility.csproj", "{3F5A028C-C51B-434A-8C10-37680CD2635C}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompatibility.Tests", "src\Tests\Microsoft.DotNet.ApiCompatibility.Tests\Microsoft.DotNet.ApiCompatibility.Tests.csproj", "{24F084ED-35BB-401E-89F5-63E5E22C3B3B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompatibility.Tests", "test\Microsoft.DotNet.ApiCompatibility.Tests\Microsoft.DotNet.ApiCompatibility.Tests.csproj", "{24F084ED-35BB-401E-89F5-63E5E22C3B3B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Msi", "src\Microsoft.Win32.Msi\Microsoft.Win32.Msi.csproj", "{3D002392-6308-41DF-8BD5-224CCC5B049F}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Msi.Tests", "src\Tests\Microsoft.Win32.Msi.Tests\Microsoft.Win32.Msi.Tests.csproj", "{80932949-B8B2-4163-B325-76F8FDBE3897}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Msi.Tests", "test\Microsoft.Win32.Msi.Tests\Microsoft.Win32.Msi.Tests.csproj", "{80932949-B8B2-4163-B325-76F8FDBE3897}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Msi.Manual.Tests", "src\Tests\Microsoft.Win32.Msi.Manual.Tests\Microsoft.Win32.Msi.Manual.Tests.csproj", "{EEF4C7DD-CDC9-44B6-8B4F-725647D54ED8}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Msi.Manual.Tests", "test\Microsoft.Win32.Msi.Manual.Tests\Microsoft.Win32.Msi.Manual.Tests.csproj", "{EEF4C7DD-CDC9-44B6-8B4F-725647D54ED8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.PackageValidation", "src\Compatibility\ApiCompat\Microsoft.DotNet.PackageValidation\Microsoft.DotNet.PackageValidation.csproj", "{E56BEA9A-B52A-4781-9FF4-217439923319}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.PackageValidation.Tests", "src\Tests\Microsoft.DotNet.PackageValidation.Tests\Microsoft.DotNet.PackageValidation.Tests.csproj", "{69C03400-12AC-4E4D-B970-6A880616BF68}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.PackageValidation.Tests", "test\Microsoft.DotNet.PackageValidation.Tests\Microsoft.DotNet.PackageValidation.Tests.csproj", "{69C03400-12AC-4E4D-B970-6A880616BF68}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DotNetDeltaApplier.Tests", "src\Tests\Microsoft.Extensions.DotNetDeltaApplier.Tests\Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj", "{FAAC2E23-A460-40FE-9207-C10EEE5A6A07}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DotNetDeltaApplier.Tests", "test\Microsoft.Extensions.DotNetDeltaApplier.Tests\Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj", "{FAAC2E23-A460-40FE-9207-C10EEE5A6A07}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests", "src\Tests\Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests\Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.csproj", "{920F6448-C2D0-4B01-AC25-16214C5A6006}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests", "test\Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests\Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.csproj", "{920F6448-C2D0-4B01-AC25-16214C5A6006}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.DotNet.ApiCompat.Shared", "src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.shproj", "{9D36039F-D0A1-462F-85B4-81763C6B02CB}"
EndProject
@@ -371,11 +371,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompat.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompat.Tool", "src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Tool\Microsoft.DotNet.ApiCompat.Tool.csproj", "{0A3C9AFD-F6E6-4A5D-83FB-93BF66732696}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "trustedroots.Tests", "src\Tests\trustedroots.Tests\trustedroots.Tests.csproj", "{08A18C0B-8985-49EE-AC80-EFEEDF18BCC5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "trustedroots.Tests", "test\trustedroots.Tests\trustedroots.Tests.csproj", "{08A18C0B-8985-49EE-AC80-EFEEDF18BCC5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.Cli", "src\Cli\Microsoft.TemplateEngine.Cli\Microsoft.TemplateEngine.Cli.csproj", "{9C16B0D8-8B4D-479B-9861-2645BFB0A169}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.Cli.UnitTests", "src\Tests\Microsoft.TemplateEngine.Cli.UnitTests\Microsoft.TemplateEngine.Cli.UnitTests.csproj", "{F08F3E99-5294-4CE7-B492-38FE588D8428}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.Cli.UnitTests", "test\Microsoft.TemplateEngine.Cli.UnitTests\Microsoft.TemplateEngine.Cli.UnitTests.csproj", "{F08F3E99-5294-4CE7-B492-38FE588D8428}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-new3", "src\Cli\dotnet-new3\dotnet-new3.csproj", "{628C09B7-BE6B-4AD4-AF41-C8863C809B31}"
EndProject
@@ -385,11 +385,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Common.Ite
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Common.ProjectTemplates.9.0", "template_feed\Microsoft.DotNet.Common.ProjectTemplates.9.0\Microsoft.DotNet.Common.ProjectTemplates.9.0.csproj", "{AB7ADCF8-48AC-4885-9C70-16D752B97168}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-new.IntegrationTests", "src\Tests\dotnet-new.Tests\dotnet-new.IntegrationTests.csproj", "{8868D816-C072-4B66-84D6-7E014EA16D48}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-new.IntegrationTests", "test\dotnet-new.Tests\dotnet-new.IntegrationTests.csproj", "{8868D816-C072-4B66-84D6-7E014EA16D48}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompat.IntegrationTests", "src\Tests\Microsoft.DotNet.ApiCompat.IntegrationTests\Microsoft.DotNet.ApiCompat.IntegrationTests.csproj", "{AE43BEC0-4BB7-42E1-B2B7-60A36092C61A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompat.IntegrationTests", "test\Microsoft.DotNet.ApiCompat.IntegrationTests\Microsoft.DotNet.ApiCompat.IntegrationTests.csproj", "{AE43BEC0-4BB7-42E1-B2B7-60A36092C61A}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompat.Tests", "src\Tests\Microsoft.DotNet.ApiCompat.Tests\Microsoft.DotNet.ApiCompat.Tests.csproj", "{A9103B98-D888-4260-8A05-FA36F640698A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompat.Tests", "test\Microsoft.DotNet.ApiCompat.Tests\Microsoft.DotNet.ApiCompat.Tests.csproj", "{A9103B98-D888-4260-8A05-FA36F640698A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.TestTemplates", "src\Assets\TestPackages\dotnet-new\Microsoft.TemplateEngine.TestTemplates.csproj", "{C37EC61D-6A88-4C15-B371-A61F23EF9072}"
EndProject
@@ -403,15 +403,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GenAPI", "GenAPI", "{95D8B0
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Tool", "src\Compatibility\GenAPI\Microsoft.DotNet.GenAPI.Tool\Microsoft.DotNet.GenAPI.Tool.csproj", "{9C08C7BD-EC01-42FA-AF1B-4177686DFC64}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Tests", "src\Tests\Microsoft.DotNet.GenAPI.Tests\Microsoft.DotNet.GenAPI.Tests.csproj", "{5D81D6AA-E198-4537-AE1C-549367DAF187}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Tests", "test\Microsoft.DotNet.GenAPI.Tests\Microsoft.DotNet.GenAPI.Tests.csproj", "{5D81D6AA-E198-4537-AE1C-549367DAF187}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiSymbolExtensions.Tests", "src\Tests\Microsoft.DotNet.ApiSymbolExtensions.Tests\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj", "{E2BC296E-2660-4692-B471-F6FCD4C19F6E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiSymbolExtensions.Tests", "test\Microsoft.DotNet.ApiSymbolExtensions.Tests\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj", "{E2BC296E-2660-4692-B471-F6FCD4C19F6E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI", "src\Compatibility\GenAPI\Microsoft.DotNet.GenAPI\Microsoft.DotNet.GenAPI.csproj", "{5F74AD67-A4AD-4660-A63C-844DAAF354C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Task", "src\Compatibility\GenAPI\Microsoft.DotNet.GenAPI.Task\Microsoft.DotNet.GenAPI.Task.csproj", "{C419AE2D-D318-49EB-8ECA-6A5DC13FE4EA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Web.Tests", "src\Tests\Microsoft.NET.Sdk.Web.Tests\Microsoft.NET.Sdk.Web.Tests.csproj", "{B8A61A5C-A9A4-45C5-97E3-CB368358682F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Web.Tests", "test\Microsoft.NET.Sdk.Web.Tests\Microsoft.NET.Sdk.Web.Tests.csproj", "{B8A61A5C-A9A4-45C5-97E3-CB368358682F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StaticWebAssetsSdk", "StaticWebAssetsSdk", "{9E9F3BB2-6FED-47BC-869C-BFAF6E7C85FC}"
EndProject
@@ -467,13 +467,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Build.Contain
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "package", "src\Containers\packaging\package.csproj", "{DEA8FE40-0AE9-4CE6-9430-089C985217CA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "containerize.UnitTests", "src\Tests\containerize.UnitTests\containerize.UnitTests.csproj", "{F04DB812-7278-47F2-913E-225CE2EF150C}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "containerize.UnitTests", "test\containerize.UnitTests\containerize.UnitTests.csproj", "{F04DB812-7278-47F2-913E-225CE2EF150C}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Build.Containers.IntegrationTests", "src\Tests\Microsoft.NET.Build.Containers.IntegrationTests\Microsoft.NET.Build.Containers.IntegrationTests.csproj", "{7DCA2BEC-B1E1-4F2B-952A-A26B5110FDA5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Build.Containers.IntegrationTests", "test\Microsoft.NET.Build.Containers.IntegrationTests\Microsoft.NET.Build.Containers.IntegrationTests.csproj", "{7DCA2BEC-B1E1-4F2B-952A-A26B5110FDA5}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Build.Containers.UnitTests", "src\Tests\Microsoft.NET.Build.Containers.UnitTests\Microsoft.NET.Build.Containers.UnitTests.csproj", "{E54506B8-0B81-4FC4-99B5-5C67E19D4B09}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Build.Containers.UnitTests", "test\Microsoft.NET.Build.Containers.UnitTests\Microsoft.NET.Build.Containers.UnitTests.csproj", "{E54506B8-0B81-4FC4-99B5-5C67E19D4B09}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDDLTests", "src\Tests\SDDLTests\SDDLTests.csproj", "{FEA8B7B5-901B-4A3A-948F-7E5F54F09FF5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDDLTests", "test\SDDLTests\SDDLTests.csproj", "{FEA8B7B5-901B-4A3A-948F-7E5F54F09FF5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compatibility", "Compatibility", "{44E564E1-AE0D-4313-A4E9-CBF2109397E3}"
EndProject
diff --git a/src/Assets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj b/src/Assets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj
index 01c7c68441d7..19a5bd141751 100644
--- a/src/Assets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj
+++ b/src/Assets/TestProjects/DesktopMinusRid/DesktopMinusRid.csproj
@@ -7,6 +7,6 @@
$(DefineConstants);USE_NATIVE_CODE
-
+
\ No newline at end of file
diff --git a/src/Assets/TestProjects/DesktopWpf/FxWpf/AssemblyInfo.cs b/src/Assets/TestProjects/DesktopWpf/FxWpf/AssemblyInfo.cs
new file mode 100644
index 000000000000..cc29e7f74114
--- /dev/null
+++ b/src/Assets/TestProjects/DesktopWpf/FxWpf/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly:ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/src/Assets/TestProjects/DesktopWpf/FxWpf/FxWpf.csproj b/src/Assets/TestProjects/DesktopWpf/FxWpf/FxWpf.csproj
new file mode 100644
index 000000000000..367a10d0d4f1
--- /dev/null
+++ b/src/Assets/TestProjects/DesktopWpf/FxWpf/FxWpf.csproj
@@ -0,0 +1,20 @@
+
+
+
+ WinExe
+ net472
+ enable
+ latest
+ $(MSBuildThisFileDirectory)\..\obj\
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Assets/TestProjects/DesktopWpf/FxWpf/MainWindow.xaml b/src/Assets/TestProjects/DesktopWpf/FxWpf/MainWindow.xaml
new file mode 100644
index 000000000000..6023b5bd2228
--- /dev/null
+++ b/src/Assets/TestProjects/DesktopWpf/FxWpf/MainWindow.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/src/Assets/TestProjects/DesktopWpf/FxWpf/MainWindow.xaml.cs b/src/Assets/TestProjects/DesktopWpf/FxWpf/MainWindow.xaml.cs
new file mode 100644
index 000000000000..552d5e3d27f4
--- /dev/null
+++ b/src/Assets/TestProjects/DesktopWpf/FxWpf/MainWindow.xaml.cs
@@ -0,0 +1,23 @@
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace FxWpf;
+
+///
+/// Interaction logic for MainWindow.xaml
+///
+public partial class MainWindow : Window
+{
+ public MainWindow()
+ {
+ // InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/src/Assets/TestProjects/DesktopWpf/FxWpf/Program.cs b/src/Assets/TestProjects/DesktopWpf/FxWpf/Program.cs
new file mode 100644
index 000000000000..88050617bbd0
--- /dev/null
+++ b/src/Assets/TestProjects/DesktopWpf/FxWpf/Program.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Windows;
+
+class C
+{
+ [STAThread]
+ static void Main(string[] args)
+ {
+ var app = new Application();
+ var window = new Window();
+ app.Run(window);
+ }
+}
\ No newline at end of file
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/App.sln b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/App.sln
new file mode 100644
index 000000000000..f2cd46c8e963
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/App.sln
@@ -0,0 +1,82 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26124.0
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Base\Test.csproj", "{884E9311-BB85-494C-8588-1FAD4C93C0AC}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Base", "Base", "{C6C93973-1CD8-454F-AA3D-41E0052E8E26}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Base\Second\Test.csproj", "{B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestCollision", "Base\Second\Third\TestCollision.csproj", "{187AA828-6BDD-48AF-800E-26E65068CADC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Second", "Base\Second\Second.csproj", "{010A3387-74B8-467C-93B5-E07564F11C26}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Debug|x64.Build.0 = Debug|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Debug|x86.Build.0 = Debug|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Release|x64.ActiveCfg = Release|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Release|x64.Build.0 = Release|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Release|x86.ActiveCfg = Release|Any CPU
+ {884E9311-BB85-494C-8588-1FAD4C93C0AC}.Release|x86.Build.0 = Release|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Debug|x64.Build.0 = Debug|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Debug|x86.Build.0 = Debug|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Release|x64.ActiveCfg = Release|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Release|x64.Build.0 = Release|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Release|x86.ActiveCfg = Release|Any CPU
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1}.Release|x86.Build.0 = Release|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Debug|x64.Build.0 = Debug|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Debug|x86.Build.0 = Debug|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Release|x64.ActiveCfg = Release|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Release|x64.Build.0 = Release|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Release|x86.ActiveCfg = Release|Any CPU
+ {187AA828-6BDD-48AF-800E-26E65068CADC}.Release|x86.Build.0 = Release|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Debug|x64.Build.0 = Debug|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Debug|x86.Build.0 = Debug|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Release|Any CPU.Build.0 = Release|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Release|x64.ActiveCfg = Release|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Release|x64.Build.0 = Release|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Release|x86.ActiveCfg = Release|Any CPU
+ {010A3387-74B8-467C-93B5-E07564F11C26}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {B7DAD6CF-BBE2-49FF-8FA0-84BA67263CB1} = {C6C93973-1CD8-454F-AA3D-41E0052E8E26}
+ {187AA828-6BDD-48AF-800E-26E65068CADC} = {C6C93973-1CD8-454F-AA3D-41E0052E8E26}
+ {010A3387-74B8-467C-93B5-E07564F11C26} = {C6C93973-1CD8-454F-AA3D-41E0052E8E26}
+ EndGlobalSection
+EndGlobal
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Class1.cs b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Class1.cs
new file mode 100644
index 000000000000..b056a1e2fbd5
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Class1.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace Test
+{
+ public class Class1
+ {
+ }
+}
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Class2.cs b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Class2.cs
new file mode 100644
index 000000000000..4952448135ce
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Class2.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace TestCollision
+{
+ public class Class1
+ {
+ }
+}
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class1.cs b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class1.cs
new file mode 100644
index 000000000000..b056a1e2fbd5
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class1.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace Test
+{
+ public class Class1
+ {
+ }
+}
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class2.cs b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class2.cs
new file mode 100644
index 000000000000..4952448135ce
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class2.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace TestCollision
+{
+ public class Class1
+ {
+ }
+}
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class3.cs b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class3.cs
new file mode 100644
index 000000000000..a39ee63c8095
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Class3.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace Second
+{
+ public class Class1
+ {
+ }
+}
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Second.csproj b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Second.csproj
new file mode 100644
index 000000000000..9f5c4f4abb61
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Second.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Test.csproj b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Test.csproj
new file mode 100644
index 000000000000..9f5c4f4abb61
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Test.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/TestCollision.csproj b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/TestCollision.csproj
new file mode 100644
index 000000000000..9f5c4f4abb61
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/TestCollision.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Class1.cs b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Class1.cs
new file mode 100644
index 000000000000..04f9690c4db8
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Class1.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace bar
+{
+ public class Class1
+ {
+ }
+}
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Class2.cs b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Class2.cs
new file mode 100644
index 000000000000..a39ee63c8095
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Class2.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace Second
+{
+ public class Class1
+ {
+ }
+}
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Second.csproj b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Second.csproj
new file mode 100644
index 000000000000..9f5c4f4abb61
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/Second.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/TestCollision.csproj b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/TestCollision.csproj
new file mode 100644
index 000000000000..9f5c4f4abb61
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Second/Third/TestCollision.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Test.csproj b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Test.csproj
new file mode 100644
index 000000000000..9f5c4f4abb61
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/Test.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/TestCollision.csproj b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/TestCollision.csproj
new file mode 100644
index 000000000000..9f5c4f4abb61
--- /dev/null
+++ b/src/Assets/TestProjects/TestAppWithSlnAndCsprojInSubDirVSErrors/Base/TestCollision.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Assets/TestProjects/VSTestEnvironmentVariables/Tests.cs b/src/Assets/TestProjects/VSTestEnvironmentVariables/Tests.cs
index 3d8505ce077c..966b7ab23992 100644
--- a/src/Assets/TestProjects/VSTestEnvironmentVariables/Tests.cs
+++ b/src/Assets/TestProjects/VSTestEnvironmentVariables/Tests.cs
@@ -23,7 +23,7 @@ public void TestEnvironmentVariables()
Console.WriteLine($"{key}={value}");
}
- // This project is compiled, and executed by the tests in "src/Tests/dotnet-test.Tests/GivenDotnetTestContainsEnvironmentVariables.cs"
+ // This project is compiled, and executed by the tests in "test/dotnet-test.Tests/GivenDotnetTestContainsEnvironmentVariables.cs"
// The values are set there.
AssertEnvironmentVariable("__DOTNET_TEST_ENVIRONMENT_VARIABLE_EMPTY", string.Empty);
AssertEnvironmentVariable("__DOTNET_TEST_ENVIRONMENT_VARIABLE_1", "VALUE1");
diff --git a/src/Assets/TestProjects/VSTestForwardDotnetRootEnvironmentVariables/Tests.cs b/src/Assets/TestProjects/VSTestForwardDotnetRootEnvironmentVariables/Tests.cs
index fd021bd8f4ba..3de940ec7980 100644
--- a/src/Assets/TestProjects/VSTestForwardDotnetRootEnvironmentVariables/Tests.cs
+++ b/src/Assets/TestProjects/VSTestForwardDotnetRootEnvironmentVariables/Tests.cs
@@ -13,7 +13,7 @@ public class Tests
[TestMethod]
public void TestForwardDotnetRootEnvironmentVariables()
{
- // This project is compiled, and executed by the tests in "src/Tests/dotnet-test.Tests/GivenDotnetTestForwardDotnetRootEnvironmentVariables.cs"
+ // This project is compiled, and executed by the tests in "test/dotnet-test.Tests/GivenDotnetTestForwardDotnetRootEnvironmentVariables.cs"
foreach (DictionaryEntry env in Environment.GetEnvironmentVariables())
{
if (env.Key.ToString().Contains("VSTEST_WINAPPHOST_"))
diff --git a/src/Assets/TestProjects/WatchHotReloadAppCustomHost/Program.cs b/src/Assets/TestProjects/WatchHotReloadAppCustomHost/Program.cs
new file mode 100644
index 000000000000..0e8a498b81e8
--- /dev/null
+++ b/src/Assets/TestProjects/WatchHotReloadAppCustomHost/Program.cs
@@ -0,0 +1,35 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Linq;
+using System.Diagnostics;
+using System.Reflection;
+using System.Runtime.Versioning;
+using System.Threading;
+
+var assembly = typeof(C).Assembly;
+
+Console.WriteLine("Started");
+
+// Process ID is insufficient because PID's may be reused.
+Console.WriteLine($"Process identifier = {Process.GetCurrentProcess().Id}, {Process.GetCurrentProcess().StartTime:hh:mm:ss.FF}");
+Console.WriteLine($"DOTNET_WATCH = {Environment.GetEnvironmentVariable("DOTNET_WATCH")}");
+Console.WriteLine($"DOTNET_WATCH_ITERATION = {Environment.GetEnvironmentVariable("DOTNET_WATCH_ITERATION")}");
+Console.WriteLine($"Arguments = {string.Join(",", args)}");
+Console.WriteLine($"Version = {assembly.GetCustomAttributes().FirstOrDefault()?.Version ?? ""}");
+Console.WriteLine($"TFM = {assembly.GetCustomAttributes().FirstOrDefault()?.FrameworkName ?? ""}");
+Console.WriteLine($"Configuration = {assembly.GetCustomAttributes().FirstOrDefault()?.Configuration ?? ""}");
+
+Loop();
+
+static void Loop()
+{
+ while (true)
+ {
+ Console.WriteLine(".");
+ Thread.Sleep(1000);
+ }
+}
+
+class C { }
diff --git a/src/Assets/TestProjects/WatchHotReloadAppCustomHost/Properties/launchSettings.json b/src/Assets/TestProjects/WatchHotReloadAppCustomHost/Properties/launchSettings.json
new file mode 100644
index 000000000000..7bd33c8a2537
--- /dev/null
+++ b/src/Assets/TestProjects/WatchHotReloadAppCustomHost/Properties/launchSettings.json
@@ -0,0 +1,14 @@
+{
+ "profiles": {
+ "app": {
+ "commandName": "Project",
+ "environmentVariables": {
+ "EnvironmentFromProfile": "Development"
+ }
+ },
+ "P1": {
+ "commandName": "Project",
+ "commandLineArgs": "\"Arg1 from launch profile\" \"Arg2 from launch profile\""
+ }
+ }
+ }
diff --git a/src/Assets/TestProjects/WatchHotReloadAppCustomHost/WatchHotReloadApp.csproj b/src/Assets/TestProjects/WatchHotReloadAppCustomHost/WatchHotReloadApp.csproj
new file mode 100644
index 000000000000..fb39d3d96409
--- /dev/null
+++ b/src/Assets/TestProjects/WatchHotReloadAppCustomHost/WatchHotReloadApp.csproj
@@ -0,0 +1,7 @@
+
+
+ $(CurrentTargetFramework)
+ Exe
+ "Argument Specified in Props"
+
+
diff --git a/src/Assets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj b/src/Assets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj
index 552ae988d38d..b22b7a420622 100644
--- a/src/Assets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj
+++ b/src/Assets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj
@@ -15,4 +15,8 @@
CS9057
+
+
+
+
diff --git a/src/BlazorWasmSdk/BlazorWasmSdk.slnf b/src/BlazorWasmSdk/BlazorWasmSdk.slnf
index 5547e380d569..b019aad1ef9b 100644
--- a/src/BlazorWasmSdk/BlazorWasmSdk.slnf
+++ b/src/BlazorWasmSdk/BlazorWasmSdk.slnf
@@ -4,8 +4,8 @@
"projects": [
"src\\BlazorWasmSdk\\Tasks\\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.csproj",
"src\\BlazorWasmSdk\\Tool\\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.csproj",
- "src\\Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj",
- "src\\Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.csproj"
+ "test\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj",
+ "test\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.csproj"
]
}
}
diff --git a/src/BuiltInTools/dotnet-watch.slnf b/src/BuiltInTools/dotnet-watch.slnf
index 76764371d81b..06b19e7ec8b8 100644
--- a/src/BuiltInTools/dotnet-watch.slnf
+++ b/src/BuiltInTools/dotnet-watch.slnf
@@ -6,10 +6,10 @@
"src\\BuiltInTools\\DotNetDeltaApplier\\Microsoft.Extensions.DotNetDeltaApplier.csproj",
"src\\BuiltInTools\\DotNetWatchTasks\\DotNetWatchTasks.csproj",
"src\\BuiltInTools\\dotnet-watch\\dotnet-watch.csproj",
- "src\\Tests\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj",
- "src\\Tests\\Microsoft.Extensions.DotNetDeltaApplier.Tests\\Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj",
- "src\\Tests\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj",
- "src\\Tests\\dotnet-watch.Tests\\dotnet-watch.Tests.csproj"
+ "test\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj",
+ "test\\Microsoft.Extensions.DotNetDeltaApplier.Tests\\Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj",
+ "test\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj",
+ "test\\dotnet-watch.Tests\\dotnet-watch.Tests.csproj"
]
}
}
\ No newline at end of file
diff --git a/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs b/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs
index 60ecaf0c7b2a..8d7f9b8083fb 100644
--- a/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs
+++ b/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs
@@ -8,13 +8,6 @@
namespace Microsoft.DotNet.Watcher;
-internal sealed class RunCommandLineOptions
-{
- public required bool NoLaunchProfile { get; init; }
- public required string? LaunchProfileName { get; init; }
- public required IReadOnlyList RemainingArguments { get; init; }
-}
-
internal sealed class CommandLineOptions
{
private const string Description = @"
@@ -56,20 +49,36 @@ dotnet watch test
private const string TargetFrameworkOptionName = "--framework";
private const string BuildPropertyOptionName = "--property";
+ public string? ExplicitCommand { get; init; }
public string? Project { get; init; }
- public string? LaunchProfileName { get; init; }
public string? TargetFramework { get; init; }
public IReadOnlyList<(string name, string value)>? BuildProperties { get; init; }
public bool BinaryLogger { get; init; }
- public bool NoLaunchProfile { get; init; }
+ public bool WatchNoLaunchProfile { get; init; }
+ public string? WatchLaunchProfileName { get; init; }
+ public bool? CommandNoLaunchProfile { get; init; }
+ public string? CommandLaunchProfileName { get; init; }
public bool Quiet { get; init; }
public bool Verbose { get; init; }
public bool List { get; init; }
public bool NoHotReload { get; init; }
public bool NonInteractive { get; init; }
public required IReadOnlyList RemainingArguments { get; init; }
- public RunCommandLineOptions? RunOptions { get; init; }
+ public string Command => ExplicitCommand ?? "run";
+
+ ///
+ /// Command line parsing attempts to mimic `dotnet run`, in the sense that `run` can be replaced with `watch` and the arguments are processed the same way.
+ /// E.g. `dotnet run x y z` runs the app with arguments `x`, `y`, `z`, and so does `dotnet watch x y z` or `dotnet watch run x y z`.
+ ///
+ /// `dotnet watch` also uses Hot Reload mode by default. `--no-hot-reload` can be passed to disable.
+ /// However, we can't run `build` and `test` commands in Hot Reload mode. To support these commands we need to special-case them.
+ ///
+ /// This design prevents us from supporting arbitrary commands and passing the verb and all arguments through.
+ ///
+ /// To pass `run`, `build` and `test` commands through, we use the `--` delimiter.
+ /// E.g. `dotnet watch -- test x y z` runs the project with arguments `x`, `y`, `z` in Hot Reload mode.
+ ///
public static CommandLineOptions? Parse(string[] args, IReporter reporter, out int errorCode, TextWriter? output = null, TextWriter? error = null)
{
var quietOption = new CliOption("--quiet", "-q")
@@ -95,18 +104,18 @@ dotnet watch test
var longProjectOption = new CliOption("--project") { Description = "The project to watch" };
// launch profile used by dotnet-watch
- var launchProfileWatchOption = new CliOption(LaunchProfileOptionName, "-lp")
+ var launchProfileRootOption = new CliOption(LaunchProfileOptionName, "-lp")
{
Description = "The launch profile to start the project with (case-sensitive)."
};
- var noLaunchProfileWatchOption = new CliOption(NoLaunchProfileOptionName)
+ var noLaunchProfileRootOption = new CliOption(NoLaunchProfileOptionName)
{
Description = "Do not attempt to use launchSettings.json to configure the application."
};
// launch profile used by dotnet-run
- var launchProfileRunOption = new CliOption(LaunchProfileOptionName, "-lp") { Hidden = true };
- var noLaunchProfileRunOption = new CliOption(NoLaunchProfileOptionName) { Hidden = true };
+ var launchProfileCommandOption = new CliOption(LaunchProfileOptionName, "-lp") { Hidden = true };
+ var noLaunchProfileCommandOption = new CliOption(NoLaunchProfileOptionName) { Hidden = true };
var targetFrameworkOption = new CliOption("--framework", "-f")
{
@@ -136,69 +145,62 @@ dotnet watch test
};
var remainingWatchArgs = new CliArgument("forwardedArgs") { Description = "Arguments to pass to the child dotnet process." };
- var remainingRunArgs = new CliArgument("remainingRunArgs");
+ var remainingCommandArgs = new CliArgument("remainingCommandArgs");
var runCommand = new CliCommand("run") { Hidden = true };
+ var testCommand = new CliCommand("test") { Hidden = true };
+ var buildCommand = new CliCommand("build") { Hidden = true };
var rootCommand = new CliRootCommand(Description);
- AddSymbols(runCommand);
- AddSymbols(rootCommand);
void AddSymbols(CliCommand command)
{
command.Options.Add(quietOption);
command.Options.Add(verboseOption);
- command.Options.Add(noHotReloadOption);
+
+ if (command == runCommand || command == rootCommand)
+ {
+ command.Options.Add(noHotReloadOption);
+ }
+
command.Options.Add(nonInteractiveOption);
command.Options.Add(longProjectOption);
command.Options.Add(shortProjectOption);
- if (command == runCommand)
+ if (command == rootCommand)
{
- command.Options.Add(launchProfileRunOption);
- command.Options.Add(noLaunchProfileRunOption);
+ command.Options.Add(launchProfileRootOption);
+ command.Options.Add(noLaunchProfileRootOption);
}
else
{
- command.Options.Add(launchProfileWatchOption);
- command.Options.Add(noLaunchProfileWatchOption);
+ command.Options.Add(launchProfileCommandOption);
+ command.Options.Add(noLaunchProfileCommandOption);
}
command.Options.Add(targetFrameworkOption);
command.Options.Add(propertyOption);
-
command.Options.Add(listOption);
- if (command == runCommand)
- {
- command.Arguments.Add(remainingRunArgs);
- }
- else
- {
- command.Subcommands.Add(runCommand);
- command.Arguments.Add(remainingWatchArgs);
- }
+ command.Arguments.Add(remainingCommandArgs);
};
- CommandLineOptions? options = null;
-
- runCommand.SetAction(parseResult =>
+ foreach (var command in new[] { runCommand, testCommand, buildCommand })
{
- RootHandler(parseResult, new()
- {
- LaunchProfileName = parseResult.GetValue(launchProfileRunOption),
- NoLaunchProfile = parseResult.GetValue(noLaunchProfileRunOption),
- RemainingArguments = parseResult.GetValue(remainingRunArgs) ?? Array.Empty(),
- });
- });
+ AddSymbols(command);
+ rootCommand.Subcommands.Add(command);
+ command.SetAction(parseResult => Handler(parseResult, command.Name));
+ }
- rootCommand.SetAction(parseResult => RootHandler(parseResult, runOptions: null));
+ CommandLineOptions? options = null;
+ AddSymbols(rootCommand);
+ rootCommand.SetAction(parseResult => Handler(parseResult, commandName: null));
- void RootHandler(ParseResult parseResults, RunCommandLineOptions? runOptions)
+ void Handler(ParseResult parseResult, string? commandName)
{
- var projectValue = parseResults.GetValue(longProjectOption);
+ var projectValue = parseResult.GetValue(longProjectOption);
if (string.IsNullOrEmpty(projectValue))
{
- var projectShortValue = parseResults.GetValue(shortProjectOption);
+ var projectShortValue = parseResult.GetValue(shortProjectOption);
if (!string.IsNullOrEmpty(projectShortValue))
{
reporter.Warn(Resources.Warning_ProjectAbbreviationDeprecated);
@@ -206,21 +208,29 @@ void RootHandler(ParseResult parseResults, RunCommandLineOptions? runOptions)
}
}
+ string[] remainingArgs =
+ [
+ .. parseResult.GetValue(remainingWatchArgs),
+ .. parseResult.GetValue(remainingCommandArgs)
+ ];
+
options = new()
{
- Quiet = parseResults.GetValue(quietOption),
- List = parseResults.GetValue(listOption),
- NoHotReload = parseResults.GetValue(noHotReloadOption),
- NonInteractive = parseResults.GetValue(nonInteractiveOption),
- Verbose = parseResults.GetValue(verboseOption),
+ ExplicitCommand = commandName,
+ Quiet = parseResult.GetValue(quietOption),
+ List = parseResult.GetValue(listOption),
+ NoHotReload = parseResult.GetValue(noHotReloadOption),
+ NonInteractive = parseResult.GetValue(nonInteractiveOption),
+ Verbose = parseResult.GetValue(verboseOption),
Project = projectValue,
- LaunchProfileName = parseResults.GetValue(launchProfileWatchOption),
- NoLaunchProfile = parseResults.GetValue(noLaunchProfileWatchOption),
- TargetFramework = parseResults.GetValue(targetFrameworkOption),
- BuildProperties = parseResults.GetValue(propertyOption)?
+ WatchLaunchProfileName = parseResult.GetValue(launchProfileRootOption),
+ WatchNoLaunchProfile = parseResult.GetValue(noLaunchProfileRootOption),
+ CommandLaunchProfileName = (commandName != null) ? parseResult.GetValue(launchProfileCommandOption) : null,
+ CommandNoLaunchProfile = (commandName != null) ? parseResult.GetValue(noLaunchProfileCommandOption) : null,
+ TargetFramework = parseResult.GetValue(targetFrameworkOption),
+ BuildProperties = parseResult.GetValue(propertyOption)?
.Select(p => (p[..p.IndexOf('=')].Trim(), p[(p.IndexOf('=') + 1)..])).ToArray(),
- RemainingArguments = parseResults.GetValue(remainingWatchArgs) ?? Array.Empty(),
- RunOptions = runOptions,
+ RemainingArguments = remainingArgs,
};
}
@@ -239,7 +249,7 @@ public IReadOnlyList GetLaunchProcessArguments(bool hotReload, IReporter
if (!hotReload)
{
// Arguments are passed to dotnet and the first argument is interpreted as a command.
- argsBuilder.Add("run");
+ argsBuilder.Add(Command);
// add options that are applicable to dotnet run:
@@ -253,32 +263,37 @@ public IReadOnlyList GetLaunchProcessArguments(bool hotReload, IReporter
{
foreach (var (name, value) in BuildProperties)
{
- argsBuilder.Add(BuildPropertyOptionName);
- argsBuilder.Add($"{name}={value}");
+ if (Command == "build")
+ {
+ argsBuilder.Add($"/p:{name}={value}");
+ }
+ else
+ {
+ argsBuilder.Add(BuildPropertyOptionName);
+ argsBuilder.Add($"{name}={value}");
+ }
}
}
}
- argsBuilder.AddRange(RemainingArguments);
-
// launch profile:
if (hotReload)
{
- watchNoLaunchProfile = NoLaunchProfile || RunOptions?.NoLaunchProfile == true;
- watchLaunchProfileName = LaunchProfileName ?? RunOptions?.LaunchProfileName;
+ watchNoLaunchProfile = WatchNoLaunchProfile || CommandNoLaunchProfile == true;
+ watchLaunchProfileName = WatchLaunchProfileName ?? CommandLaunchProfileName;
- if (LaunchProfileName != null && RunOptions?.LaunchProfileName != null)
+ if (WatchLaunchProfileName != null && CommandLaunchProfileName != null)
{
- reporter.Warn($"Using launch profile name '{LaunchProfileName}', ignoring '{RunOptions.LaunchProfileName}'.");
+ reporter.Warn($"Using launch profile name '{WatchLaunchProfileName}', ignoring '{CommandLaunchProfileName}'.");
}
}
else
{
- var runNoLaunchProfile = (RunOptions != null) ? RunOptions.NoLaunchProfile : NoLaunchProfile;
- watchNoLaunchProfile = NoLaunchProfile;
+ var runNoLaunchProfile = (ExplicitCommand != null) ? CommandNoLaunchProfile == true : WatchNoLaunchProfile;
+ watchNoLaunchProfile = WatchNoLaunchProfile;
- var runLaunchProfileName = (RunOptions != null) ? RunOptions.LaunchProfileName : LaunchProfileName;
- watchLaunchProfileName = LaunchProfileName;
+ var runLaunchProfileName = (ExplicitCommand != null) ? CommandLaunchProfileName : WatchLaunchProfileName;
+ watchLaunchProfileName = WatchLaunchProfileName;
if (runNoLaunchProfile)
{
@@ -292,10 +307,7 @@ public IReadOnlyList GetLaunchProcessArguments(bool hotReload, IReporter
}
}
- if (RunOptions != null)
- {
- argsBuilder.AddRange(RunOptions.RemainingArguments);
- }
+ argsBuilder.AddRange(RemainingArguments);
return argsBuilder.ToArray();
}
diff --git a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs
index 3868d739e94f..d60353264e1e 100644
--- a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs
+++ b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs
@@ -91,7 +91,7 @@ public async Task WatchAsync(DotNetWatchContext context, CancellationToken cance
currentRunCancellationSource.Token))
using (var fileSetWatcher = new FileSetWatcher(fileSet, _reporter))
{
- _reporter.Verbose($"Running {processSpec.ShortDisplayName()} with the following arguments: '{string.Join(" ", processSpec.Arguments)}'");
+ _reporter.Verbose($"Running {processSpec.ShortDisplayName()} with the following arguments: '{processSpec.GetArgumentsDisplay()}'");
var processTask = _processRunner.RunAsync(processSpec, combinedCancellationSource.Token);
_reporter.Output("Started", emoji: "🚀");
diff --git a/src/BuiltInTools/dotnet-watch/Filters/BrowserRefreshFilter.cs b/src/BuiltInTools/dotnet-watch/Filters/BrowserRefreshFilter.cs
index 11a733f0fb43..0e4632164581 100644
--- a/src/BuiltInTools/dotnet-watch/Filters/BrowserRefreshFilter.cs
+++ b/src/BuiltInTools/dotnet-watch/Filters/BrowserRefreshFilter.cs
@@ -10,6 +10,8 @@ namespace Microsoft.DotNet.Watcher.Tools
{
internal sealed class BrowserRefreshFilter : IWatchFilter, IAsyncDisposable
{
+ // This needs to be in sync with the version BrowserRefreshMiddleware is compiled against.
+ private static readonly Version s_minimumSupportedVersion = new(6, 0);
private readonly DotNetWatchOptions _options;
private readonly IReporter _reporter;
private readonly string _muxerPath;
@@ -38,6 +40,13 @@ public async ValueTask ProcessAsync(DotNetWatchContext context, CancellationToke
_reporter.Verbose("Unable to determine if this project is a webapp.");
return;
}
+ else if (!IsSupportedVersion(context.ProjectGraph))
+ {
+ _reporter.Warn(
+ "Skipping configuring browser-refresh middleware since the target framework version is not supported." +
+ " For more information see 'https://aka.ms/dotnet/watch/unsupported-tfm'.");
+ return;
+ }
else if (IsWebApp(context.ProjectGraph))
{
_reporter.Verbose("Configuring the app to use browser-refresh middleware.");
@@ -66,6 +75,24 @@ public async ValueTask ProcessAsync(DotNetWatchContext context, CancellationToke
}
}
+ private bool IsSupportedVersion(ProjectGraph context)
+ {
+ if (context.GraphRoots.FirstOrDefault() is not { } projectNode)
+ {
+ return false;
+ }
+ if (projectNode.ProjectInstance.GetPropertyValue("_TargetFrameworkVersionWithoutV") is not string targetFrameworkVersion)
+ {
+ return false;
+ }
+ if(!Version.TryParse(targetFrameworkVersion, out var version))
+ {
+ return false;
+ }
+
+ return version >= s_minimumSupportedVersion;
+ }
+
private static bool IsWebApp(ProjectGraph projectGraph)
{
// We only want to enable browser refreshes if this is a WebApp (ASP.NET Core / Blazor app).
diff --git a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs
index 313b050649ef..8fd1799697b2 100644
--- a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs
+++ b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs
@@ -129,7 +129,7 @@ public async Task WatchAsync(DotNetWatchContext context, CancellationToken cance
// when the solution captures state of the file after the changes has already been made.
await hotReload.InitializeAsync(context, cancellationToken);
- _reporter.Verbose($"Running {processSpec.ShortDisplayName()} with the following arguments: '{string.Join(" ", processSpec.Arguments ?? Array.Empty())}'");
+ _reporter.Verbose($"Running {processSpec.ShortDisplayName()} with the following arguments: '{processSpec.GetArgumentsDisplay()}'");
var processTask = _processRunner.RunAsync(processSpec, combinedCancellationSource.Token);
_reporter.Output("Started", emoji: "🚀");
@@ -298,10 +298,28 @@ private void ConfigureExecutable(DotNetWatchContext context, ProcessSpec process
var project = context.FileSet?.Project;
Debug.Assert(project != null);
+ // RunCommand property specifies the host to use to run the project.
+ // RunArguments then specifies the arguments to the host.
+ // Arguments to the executable should follow the host arguments.
+
processSpec.Executable = project.RunCommand;
+
if (!string.IsNullOrEmpty(project.RunArguments))
{
- processSpec.EscapedArguments = project.RunArguments;
+ var escapedArguments = project.RunArguments;
+
+ if (processSpec.EscapedArguments != null)
+ {
+ escapedArguments += " " + processSpec.EscapedArguments;
+ }
+
+ if (processSpec.Arguments != null)
+ {
+ escapedArguments += " " + CommandLineUtilities.JoinArguments(processSpec.Arguments);
+ }
+
+ processSpec.EscapedArguments = escapedArguments;
+ processSpec.Arguments = null;
}
if (!string.IsNullOrEmpty(project.RunWorkingDirectory))
diff --git a/src/BuiltInTools/dotnet-watch/Internal/CommandLineUtilities.cs b/src/BuiltInTools/dotnet-watch/Internal/CommandLineUtilities.cs
new file mode 100644
index 000000000000..ff710c7666b8
--- /dev/null
+++ b/src/BuiltInTools/dotnet-watch/Internal/CommandLineUtilities.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// Copied from dotnet/runtime/src/libraries/System.Private.CoreLib/src/System/PasteArguments.cs
+namespace Microsoft.DotNet.Watcher;
+
+internal static class CommandLineUtilities
+{
+ public static string JoinArguments(IEnumerable arguments)
+ {
+ var builder = new StringBuilder();
+ AppendArguments(builder, arguments);
+ return builder.ToString();
+ }
+
+ public static void AppendArguments(StringBuilder builder, IEnumerable arguments)
+ {
+ foreach (var arg in arguments)
+ {
+ AppendArgument(builder, arg);
+ }
+ }
+
+ private static void AppendArgument(StringBuilder stringBuilder, string argument)
+ {
+ if (stringBuilder.Length != 0)
+ {
+ stringBuilder.Append(' ');
+ }
+
+ // Parsing rules for non-argv[0] arguments:
+ // - Backslash is a normal character except followed by a quote.
+ // - 2N backslashes followed by a quote ==> N literal backslashes followed by unescaped quote
+ // - 2N+1 backslashes followed by a quote ==> N literal backslashes followed by a literal quote
+ // - Parsing stops at first whitespace outside of quoted region.
+ // - (post 2008 rule): A closing quote followed by another quote ==> literal quote, and parsing remains in quoting mode.
+ if (argument.Length != 0 && ContainsNoWhitespaceOrQuotes(argument))
+ {
+ // Simple case - no quoting or changes needed.
+ stringBuilder.Append(argument);
+ }
+ else
+ {
+ stringBuilder.Append(Quote);
+ int idx = 0;
+ while (idx < argument.Length)
+ {
+ char c = argument[idx++];
+ if (c == Backslash)
+ {
+ int numBackSlash = 1;
+ while (idx < argument.Length && argument[idx] == Backslash)
+ {
+ idx++;
+ numBackSlash++;
+ }
+
+ if (idx == argument.Length)
+ {
+ // We'll emit an end quote after this so must double the number of backslashes.
+ stringBuilder.Append(Backslash, numBackSlash * 2);
+ }
+ else if (argument[idx] == Quote)
+ {
+ // Backslashes will be followed by a quote. Must double the number of backslashes.
+ stringBuilder.Append(Backslash, numBackSlash * 2 + 1);
+ stringBuilder.Append(Quote);
+ idx++;
+ }
+ else
+ {
+ // Backslash will not be followed by a quote, so emit as normal characters.
+ stringBuilder.Append(Backslash, numBackSlash);
+ }
+
+ continue;
+ }
+
+ if (c == Quote)
+ {
+ // Escape the quote so it appears as a literal. This also guarantees that we won't end up generating a closing quote followed
+ // by another quote (which parses differently pre-2008 vs. post-2008.)
+ stringBuilder.Append(Backslash);
+ stringBuilder.Append(Quote);
+ continue;
+ }
+
+ stringBuilder.Append(c);
+ }
+
+ stringBuilder.Append(Quote);
+ }
+ }
+
+ private static bool ContainsNoWhitespaceOrQuotes(string s)
+ {
+ for (int i = 0; i < s.Length; i++)
+ {
+ char c = s[i];
+ if (char.IsWhiteSpace(c) || c == Quote)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private const char Quote = '\"';
+ private const char Backslash = '\\';
+}
diff --git a/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs b/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs
index 1485eadc26b8..74ac788a4423 100644
--- a/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs
+++ b/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs
@@ -65,8 +65,7 @@ public async Task RunAsync(ProcessSpec processSpec, CancellationToken cance
stopwatch.Start();
process.Start();
- var args = processSpec.EscapedArguments ?? string.Join(" ", processSpec.Arguments ?? Array.Empty());
- _reporter.Verbose($"Started '{processSpec.Executable}' '{args}' with process id {process.Id}", emoji: "🚀");
+ _reporter.Verbose($"Started '{processSpec.Executable}' with arguments '{processSpec.GetArgumentsDisplay()}': process id {process.Id}", emoji: "🚀");
if (readOutput)
{
diff --git a/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs b/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs
index 9f71e99c2f14..b99753b49dd6 100644
--- a/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs
+++ b/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs
@@ -10,6 +10,12 @@ namespace Microsoft.DotNet.Watcher.Tools
{
internal sealed class LaunchSettingsProfile
{
+ private static readonly JsonSerializerOptions s_serializerOptions = new(JsonSerializerDefaults.Web)
+ {
+ AllowTrailingCommas = true,
+ ReadCommentHandling = JsonCommentHandling.Skip,
+ };
+
[JsonIgnore]
public string? LaunchProfileName { get; set; }
public string? ApplicationUrl { get; init; }
@@ -32,7 +38,7 @@ internal sealed class LaunchSettingsProfile
{
launchSettings = JsonSerializer.Deserialize(
File.ReadAllText(launchSettingsPath),
- new JsonSerializerOptions(JsonSerializerDefaults.Web));
+ s_serializerOptions);
}
catch (Exception ex)
{
diff --git a/src/BuiltInTools/dotnet-watch/ProcessSpec.cs b/src/BuiltInTools/dotnet-watch/ProcessSpec.cs
index 92f743b13d9d..b756aff1a2f8 100644
--- a/src/BuiltInTools/dotnet-watch/ProcessSpec.cs
+++ b/src/BuiltInTools/dotnet-watch/ProcessSpec.cs
@@ -31,5 +31,8 @@ internal sealed class ProcessSpecEnvironmentVariables : Dictionary Path.GetFileNameWithoutExtension(Executable);
+
+ public string GetArgumentsDisplay()
+ => EscapedArguments ?? CommandLineUtilities.JoinArguments(Arguments ?? []);
}
}
diff --git a/src/BuiltInTools/dotnet-watch/Program.cs b/src/BuiltInTools/dotnet-watch/Program.cs
index ebfdaadd6774..2b778e97c38f 100644
--- a/src/BuiltInTools/dotnet-watch/Program.cs
+++ b/src/BuiltInTools/dotnet-watch/Program.cs
@@ -174,7 +174,12 @@ private async Task RunAsync(CommandLineOptions options, CancellationToken c
var projectGraph = TryReadProject(projectFile, options);
bool enableHotReload;
- if (options.NoHotReload)
+ if (options.Command != "run")
+ {
+ _reporter.Verbose($"Command '{options.Command}' does not support Hot Reload.");
+ enableHotReload = false;
+ }
+ else if (options.NoHotReload)
{
_reporter.Verbose("Hot Reload disabled by command line switch.");
enableHotReload = false;
diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj
index 1a03973fcd4f..747b43b278a6 100644
--- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj
+++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj
@@ -26,9 +26,12 @@
+
+
+
- $(PkgMicrosoft_Build_Runtime)\contentFiles\any\net7.0\MSBuild.dll
+ $(PkgMicrosoft_Build_Runtime)\contentFiles\any\net8.0\MSBuild.dll$(PkgMicrosoft_Build_Runtime)\contentFiles\any\$(NetCurrent)\MSBuild.dll
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf
index 0a19b54165ac..059c3cc90ea8 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf
@@ -12,6 +12,11 @@
Nesprávně naformátovaný text příkazu {0}
+
+ Could not execute because the specified command or file was not found.
+ Nebylo možné provést, protože zadaný příkaz nebo soubor nebyl nalezen.
+
+ Unable to locate dotnet multiplexerNepodařilo se najít multiplexor dotnetu.
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Spuštění nebylo úspěšné, protože zadaný příkaz nebo soubor se nenašly.
-Mezi možné příčiny patří toto:
- * V integrovaném příkazu dotnet je překlep.
+ Možné důvody:
+ * Chybně jste napsali integrovaný příkaz dotnet.
* Chtěli jste spustit program .NET, ale {0} neexistuje.
- * Chtěli jste spustit globální nástroj, ale v proměnné PATH se nepovedlo najít spustitelný soubor s předponou dotnet s tímto názvem.
+ * Chtěli jste spustit nástroj global, ale v cestě PATH nebyl nalezen spustitelný soubor s předponou dotnet s tímto názvem.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf
index 931f8681cf5a..b65426871939 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf
@@ -12,6 +12,11 @@
Fehlerhafter Befehlstext "{0}".
+
+ Could not execute because the specified command or file was not found.
+ Die Ausführung war nicht möglich, da der angegebene Befehl oder die angegebene Datei nicht gefunden wurde.
+
+ Unable to locate dotnet multiplexerDotnetmultiplexer nicht gefunden
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Die Ausführung war nicht möglich, weil der angegebene Befehl oder die Datei nicht gefunden wurde.
-Mögliche Ursachen:
- * Sie haben sich bei einem integrierten dotnet-Befehl verschrieben.
- * Sie wollten ein .NET-Programm ausführen, aber "{0}" ist nicht vorhanden.
- * Sie wollten ein globales Tool ausführen, aber in PATH wurde keine ausführbare Datei dieses Namens mit dotnet-Präfix gefunden.
+ Mögliche Gründe hierfür sind:
+ * Sie haben einen integrierten dotnet-Befehl falsch geschrieben.
+ * Sie wollten ein .NET-Programm ausführen, aber {0} ist nicht vorhanden.
+ * Sie wollten ein globales Tool ausführen, aber eine ausführbare Datei mit dotnet-Präfix und diesem Namen wurde in PATH nicht gefunden.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf
index 6c95a5a48054..ab310ba0919e 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf
@@ -12,6 +12,11 @@
Texto de comando con formato incorrecto "{0}"
+
+ Could not execute because the specified command or file was not found.
+ No se pudo ejecutar porque no se encontró el comando o archivo especificado.
+
+ Unable to locate dotnet multiplexerNo se puede ubicar el multiplexor dotnet
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- No se pudo ejecutar porque no se encontró el comando o el archivo especificado.
-Algunas de las posibles causas son :
- * Escribió mal un comando dotnet integrado.
- * Pretendía ejecutar un programa .NET, pero {0} no existe.
- * Pretendía ejecutar una herramienta global, pero no se encontró ningún ejecutable con prefijo dotnet con este nombre en PATH.
+ Entre las posibles razones para esto se incluyen:
+ * Escribió de manera incorrecta un comando dotnet integrado.
+ * Tenía previsto ejecutar un programa .NET, pero {0} no existe.
+ * Tuvo la intención de ejecutar una herramienta global, pero no se encontró un ejecutable con el prefijo dotnet con este nombre en la ruta.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf
index ac52d261b855..83aafec69438 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf
@@ -12,6 +12,11 @@
Texte de commande incorrect '{0}'
+
+ Could not execute because the specified command or file was not found.
+ Exécution impossible, car la commande ou le fichier spécifié est introuvable.
+
+ Unable to locate dotnet multiplexerLe multiplexeur dotnet est introuvable
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Impossible d'effectuer l'exécution, car la commande ou le fichier spécifié est introuvable.
-Raisons possibles :
+ Les raisons possibles sont les suivantes :
* Vous avez mal orthographié une commande dotnet intégrée.
- * Vous avez voulu exécuter un programme .NET, mais {0} n'existe pas.
- * Vous avez voulu exécuter un outil global, mais l'exécutable de ce nom avec le préfixe dotnet est introuvable dans le CHEMIN.
+ * Vous avez l’intention d’exécuter un programme .NET, mais {0} n’existe pas.
+ * Vous avez l’intention d’exécuter un outil global, mais un exécutable avec un préfixe dotnet portant ce nom est introuvable sur le chemin d’accès.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf
index a6c286a1e24c..d14e1840c5e8 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf
@@ -12,6 +12,11 @@
Il testo del comando '{0}' non è corretto
+
+ Could not execute because the specified command or file was not found.
+ Non è stato possibile eseguire perché il comando o il file specificato non è stato trovato.
+
+ Unable to locate dotnet multiplexerIl multiplexer dotnet non è stato trovato
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Non è stato possibile completare l'esecuzione perché il comando o il file specificato non è stato trovato.
-Motivi possibili:
- * Il nome di un comando dotnet predefinito non è stato digitato correttamente.
+ I possibili motivi includono:
+ * È stato digitato in modo errato un comando dotnet predefinito.
* Si intendeva eseguire un programma .NET, ma {0} non esiste.
- * Si intendeva eseguire uno strumento globale, ma in PATH non è stato trovato alcun eseguibile con questo nome e prefisso dotnet.
+ * Si intendeva eseguire uno strumento globale, ma non è stato possibile trovare un eseguibile con prefisso dotnet con questo nome in PATH.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf
index db28e5cadd21..ac1e63ccf812 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf
@@ -12,6 +12,11 @@
無効な形式のコマンド テキスト '{0}'
+
+ Could not execute because the specified command or file was not found.
+ 指定されたコマンドまたはファイルが見つからなかったため、実行できませんでした。
+
+ Unable to locate dotnet multiplexerdotnet マルチプレクサーが見つかりません
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- 指定されたコマンドまたはファイルが見つからなかったため、実行できませんでした。
-次のような原因が考えられます。
- * 組み込みの dotnet コマンドのスペルが間違っている。
- * .NET プログラムを実行しようとしたが、{0} が存在しない。
- * グローバル ツールを実行しようとしたが、プレフィックスとして dotnet が付いたこの名前の実行可能なものが PATH に見つからなかった。
+ これには、次のような理由が考えられます:
+ * 組み込みの dotnet コマンドのスペルが間違っています。
+ * .NET プログラムを実行しようとしましたが、{0} が存在しません。
+ * グローバル ツールを実行しようとしましたが、この名前の dotnet プレフィックス付き実行可能ファイルが PATH に見つかりませんでした。
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf
index dbe9f93adc8f..4f2d0561d088 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf
@@ -12,6 +12,11 @@
형식이 잘못된 명령 텍스트 '{0}'
+
+ Could not execute because the specified command or file was not found.
+ 지정한 명령 또는 파일을 찾을 수 없어 실행하지 못했습니다.
+
+ Unable to locate dotnet multiplexerdotnet multiplexer를 찾을 수 없음
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- 지정된 명령 또는 파일을 찾을 수 없으므로 실행할 수 없습니다.
-가능한 원인은 다음과 같습니다.
- * 기본 제공 dotnet 명령 철자가 잘못 입력되었습니다.
- * .NET 프로그램을 실행하려고 했지만, {0}이(가) 없습니다.
- * 전역 도구를 실행하려고 했지만, 이 이름의 dotnet 접두사가 있는 실행 파일을 PATH에서 찾을 수 없습니다.
+ 이에 대한 예상 원인은 다음과 같습니다.
+ * 기본 제공 dotnet 명령의 철자가 잘못되었습니다.
+ * .NET 프로그램을 실행하려고 했지만 {0}이(가) 없습니다.
+ * 전역 도구를 실행하려고 했지만 PATH에서 이 이름의 dotnet 접두사 실행 파일을 찾지 못했습니다.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf
index bb872cff6b03..f6b356e4a6eb 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf
@@ -12,6 +12,11 @@
Nieprawidłowo sformułowany tekst polecenia „{0}”
+
+ Could not execute because the specified command or file was not found.
+ Nie można wykonać, ponieważ nie znaleziono określonego polecenia lub pliku.
+
+ Unable to locate dotnet multiplexerNie można zlokalizować multipleksera dotnet
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Nie można wykonać, ponieważ nie odnaleziono określonego polecenia lub pliku.
-Możliwe przyczyny:
- * Błąd pisowni wbudowanego polecenia dotnet .
- * Planowano wykonanie programu platformy .NET, ale element {0} nie istnieje.
- * Planowano uruchomienie narzędzia globalnego, ale nie można odnaleźć pliku wykonywalnego z prefiksem dotnet o tej nazwie w zmiennej PATH.
+ Możliwe przyczyny tego są następujące:
+ * Błędnie napisano wbudowane polecenie dotnet.
+ * Zamierzano wykonać program .NET, ale {0} nie istnieje.
+ * Zamierzano uruchomić narzędzie globalne, ale nie można odnaleźć pliku wykonywalnego z prefiksem dotnet o tej nazwie w ścieżce PATH.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf
index c3a32a20687d..b29d04bbe723 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf
@@ -12,6 +12,11 @@
Texto do comando malformado '{0}'
+
+ Could not execute because the specified command or file was not found.
+ Não foi possível executar porque o comando ou arquivo especificado não foi encontrado.
+
+ Unable to locate dotnet multiplexerNão é possível localizar o multiplexador do dotnet
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Não foi possível executar porque o comando ou o arquivo especificado não foi encontrado.
-Possíveis motivos para isso incluem:
- * Você digitou incorretamente um comando de dotnet interno.
+ Os possíveis motivos para isso incluem:
+ * Você digitou incorretamente um comando dotnet interno.
* Você pretendia executar um programa .NET, mas {0} não existe.
- * Você pretendia executar uma ferramenta global, mas não foi possível encontrar um executável com prefixo de dotnet com esse nome no CAMINHO.
+ * Você pretendia executar uma ferramenta global, mas não foi possível encontrar um executável com prefixo dotnet com esse nome no PATH.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf
index 84b4742064c3..0de8ace38958 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf
@@ -12,6 +12,11 @@
Неправильный формат текста команды "{0}"
+
+ Could not execute because the specified command or file was not found.
+ Не удалось выполнить, поскольку указанная команда или файл не найдены.
+
+ Unable to locate dotnet multiplexerНе удается найти мультиплексор dotnet.
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Не удалось выполнить, так как не найдены указанная команда или указанный файл.
-Возможные причины:
- * вы неправильно набрали встроенную команду dotnet;
- * вы планировали выполнить программу .NET, однако {0} не существует;
- * вы хотели запустить глобальное средство, но по указанному в PATH пути не удалось найти исполняемый файл с префиксом dotnet, имеющий такое имя.
+ Возможные причины этого включают:
+ * Вы допустили ошибку во встроенной команде dotnet.
+ * Вы собирались выполнить программу .NET, но {0} не существует.
+ * Вы собирались запустить глобальное средство, но в PATH не удалось найти исполняемый файл с префиксом dotnet и таким именем.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf
index 546b74e21b8f..effa36b8a0ee 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf
@@ -12,6 +12,11 @@
Hatalı biçimlendirilmiş komut metni: '{0}'
+
+ Could not execute because the specified command or file was not found.
+ Belirtilen komut veya dosya bulunamadığından yürütülemedi.
+
+ Unable to locate dotnet multiplexerDotnet çoğullayıcısı bulunamadı
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- Belirtilen komut veya dosya bulunamadığından yürütülemedi.
-Bunun nedeni şunlardan biri olabilir:
+ Bunun olası nedenleri şunlar olabilir:
* Yerleşik bir dotnet komutunu yanlış yazdınız.
- * Bir .NET programını yürütmeyi amaçladınız, ancak {0} yok.
- * Genel bir aracı çalıştırmayı amaçladınız, ancak bu ada sahip dotnet ön ekli yürütülebilir dosya PATH üzerinde bulunamadı.
+ * Bir .NET programını yürütmeyi amaçladınız ancak {0} mevcut değil.
+ * Bir genel aracı çalıştırmayı amaçladınız ancak YOL dizininde bu ada sahip dotnet ön eki olan bir yürütülebilir dosya bulunamadı.
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf
index 5d2ec87f2da8..92d85374f55b 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf
@@ -12,6 +12,11 @@
命令文本“{0}”格式错误
+
+ Could not execute because the specified command or file was not found.
+ 无法执行,因为找不到指定的命令或文件。
+
+ Unable to locate dotnet multiplexer找不到 dotnet 多路复用器
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- 无法执行,因为找不到指定的命令或文件。
-可能的原因包括:
- *内置的 dotnet 命令拼写错误。
- *你打算执行 .NET 程序,但 {0} 不存在。
- *你打算运行全局工具,但在路径上找不到具有此名称且前缀为 dotnet 的可执行文件。
+ 可能造成此问题的原因包括:
+ *内置 dotnet 命令拼写错误。
+ *你打算执行 .NET 程序,但 {0} 不存在。
+ *你打算运行全局工具,但在 PATH 上找不到具有此名称且带有 dotnet 前缀的可执行文件。
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf
index 829e3039ab97..2a19383fc1ce 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf
@@ -12,6 +12,11 @@
命令文字 '{0}' 格式錯誤
+
+ Could not execute because the specified command or file was not found.
+ 無法執行,因為找不到指定的命令或檔案。
+
+ Unable to locate dotnet multiplexer找不到 dotnet multiplexer
@@ -28,16 +33,14 @@
- Could not execute because the specified command or file was not found.
-Possible reasons for this include:
+ Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but {0} does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- 因為找不到指定的命令或檔案,所以無法執行。
-可能的原因包括:
- * 內建 dotnet 命令拼寫錯誤。
- * 您預計要執行 .NET 程式,但不存在 {0}。
- * 您預計要執行全域工具,但在 PATH 上找不到此名稱且開頭為 dotnet 的可執行檔。
+ 可能的原因包括:
+ * 您拼錯了內建 dotnet 命令。
+ * 您打算執行 .NET 程式,但 {0} 不存在。
+ * 您打算執行全域工具,但在 PATH 上找不到具有此名稱的以 dotnet 為首碼的可執行檔。
diff --git a/src/Cli/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf b/src/Cli/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf
index 7c393562ad06..c4a282ffbb99 100644
--- a/src/Cli/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf
@@ -39,7 +39,7 @@ Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cl
Escribir su primera aplicación: https://aka.ms/dotnet-hello-world
Descubra las novedades: https://aka.ms/dotnet-whats-new
Explore la documentación: https://aka.ms/dotnet-docs
-Notificar problemas y encontrar el origen en GitHub: https://github.com/dotnet/core
+Notificar problemas y encontrar el código fuente en GitHub: https://github.com/dotnet/core
Use "dotnet --help" para ver los comandos disponibles o visite: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/CliTemplateParameter.cs b/src/Cli/Microsoft.TemplateEngine.Cli/CliTemplateParameter.cs
index 67a4fac3e74a..c528f549c72c 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/CliTemplateParameter.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/CliTemplateParameter.cs
@@ -425,7 +425,7 @@ private static Func GetParseArgument(CliTemplateParameter
private (bool, double) ConvertValueToFloat(string? value)
{
- if (Utils.ParserExtensions.DoubleTryParseСurrentOrInvariant(value, out double convertedFloat))
+ if (Utils.ParserExtensions.DoubleTryParseCurrentOrInvariant(value, out double convertedFloat))
{
return (true, convertedFloat);
}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs
index 37e9d6150492..cd0107dc0b95 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs
@@ -3,6 +3,7 @@
using System.CommandLine;
using System.CommandLine.Completions;
+using System.CommandLine.Invocation;
using System.Reflection;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.TemplateEngine.Abstractions;
@@ -219,7 +220,7 @@ private static void HandleDebugShowConfig(TArgs args, IEngineEnvironmentSettings
Reporter.Output.WriteLine();
}
- private sealed class CommandAction : CliAction
+ private sealed class CommandAction : AsynchronousCliAction
{
private readonly BaseCommand _command;
@@ -282,8 +283,6 @@ public override async Task InvokeAsync(ParseResult parseResult, Cancellatio
return (int)returnCode;
}
-
- public override int Invoke(ParseResult parseResult) => InvokeAsync(parseResult, CancellationToken.None).GetAwaiter().GetResult();
}
}
}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs
index 42fd64f9bf0d..9e1a78b02622 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/ParserFactory.cs
@@ -15,7 +15,6 @@ internal static CliConfiguration CreateParser(CliCommand command, bool disableHe
//.UseParseDirective()
//.UseSuggestDirective()
{
- EnableParseErrorReporting = true,
EnablePosixBundling = false
};
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs
index 8b5f38be95e9..ef71e9bcb602 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs
@@ -455,6 +455,7 @@ private static void WriteCustomInstantiateHelp(HelpContext context, CliCommand c
HelpBuilder.Default.CommandArgumentsSection()(context);
context.Output.WriteLine();
HelpBuilder.Default.OptionsSection()(context);
+ context.Output.WriteLine();
HelpBuilder.Default.SubcommandsSection()(context);
context.Output.WriteLine();
}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs
index 211349cccc54..5dbd34f8485d 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs
@@ -76,10 +76,10 @@ internal static IEnumerable GetTemplateCompletions(
//// Get parameterset, localize them
////
- //// Do not bind! untill we see any have the 'IsEnabled' condition - and put those last
+ //// Do not bind! until we see any have the 'IsEnabled' condition - and put those last
//// - default and resolved values (bind somehow)
- //// get parameters without enablement condition - first get those that are required, then conditionaly required, then optional
+ //// get parameters without enablement condition - first get those that are required, then conditionally required, then optional
//// then do a topological sort of rest of parameters and evaluate enablement conditions on the fly - get them in order
//template.ParameterDefinitionSet[0].Priority
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommandArgs.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommandArgs.cs
index 0bedbbf22629..368bbcf6177c 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommandArgs.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommandArgs.cs
@@ -115,7 +115,7 @@ public bool TryGetAliasForCanonicalName(string canonicalName, out string? alias)
{
throw new InvalidOperationException($"Parameter {parameterName} is not defined for {Template.Identity}.");
}
- if (parameter.Type == ParameterType.Hex && optionResult.Option.ValueType == typeof(long))
+ if (parameter.Type == ParameterType.Hex && optionResult.Option is CliOption)
{
var intValue = (long)optionValue;
return $"0x{intValue.ToString("X")}";
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs
index d60afcf50389..c3b953a9fdb7 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs
@@ -253,8 +253,7 @@ private async Task> GetCuratedListAsync(CancellationT
"Microsoft.Common.Console", //console
"Microsoft.Common.WPF", //wpf
"Microsoft.Common.WinForms", //winforms
- "Microsoft.Web.Blazor.Server", //blazorserver
- "Microsoft.Web.RazorPages" //webapp
+ "Microsoft.Web.Blazor" //blazor
};
IReadOnlyList templates = await _templatePackageManager.GetTemplatesAsync(cancellationToken).ConfigureAwait(false);
diff --git a/src/Cli/dotnet-new3/ParserFactory.cs b/src/Cli/dotnet-new3/ParserFactory.cs
index 4cda78c7f480..6116ed16c203 100644
--- a/src/Cli/dotnet-new3/ParserFactory.cs
+++ b/src/Cli/dotnet-new3/ParserFactory.cs
@@ -18,7 +18,6 @@ internal static CliConfiguration CreateParser(CliCommand command, bool disableHe
//.UseParseDirective()
//.UseSuggestDirective()
{
- EnableParseErrorReporting = true, //TODO: discuss with SDK if it is possible to use it.
EnablePosixBundling = false
};
@@ -53,15 +52,25 @@ static HelpOption CreateCustomHelp()
}
}
- private static IEnumerable> CustomHelpLayout(HelpContext context)
+ private static IEnumerable> CustomHelpLayout(HelpContext context)
{
if (context.ParseResult.CommandResult.Command is ICustomHelp custom)
{
- return custom.CustomHelpLayout();
+ foreach (var layout in custom.CustomHelpLayout())
+ {
+ yield return hc =>
+ {
+ layout(hc);
+ return true;
+ };
+ }
}
else
{
- return HelpBuilder.Default.GetLayout();
+ foreach (var layout in HelpBuilder.Default.GetLayout())
+ {
+ yield return layout;
+ }
}
}
}
diff --git a/src/Cli/dotnet/CommandLineInfo.cs b/src/Cli/dotnet/CommandLineInfo.cs
index 0807258c3694..32993585931a 100644
--- a/src/Cli/dotnet/CommandLineInfo.cs
+++ b/src/Cli/dotnet/CommandLineInfo.cs
@@ -36,7 +36,7 @@ private static void PrintWorkloadsInfo()
{
Reporter.Output.WriteLine();
Reporter.Output.WriteLine($"{LocalizableStrings.DotnetWorkloadInfoLabel}");
- WorkloadCommandParser.ShowWorkloadsInfo();
+ WorkloadCommandParser.ShowWorkloadsInfo(showVersion: false);
}
private static string GetDisplayRid(DotnetVersionFile versionFile)
diff --git a/src/Cli/dotnet/CommandLineValidation/CommandLineValidationMessages.cs b/src/Cli/dotnet/CommandLineValidation/CommandLineValidationMessages.cs
deleted file mode 100644
index 56c4091b7984..000000000000
--- a/src/Cli/dotnet/CommandLineValidation/CommandLineValidationMessages.cs
+++ /dev/null
@@ -1,23 +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.CommandLine.Parsing;
-
-namespace Microsoft.DotNet.Cli
-{
- internal static class SymbolResultExtensions
- {
- internal static CliToken Token(this SymbolResult symbolResult)
- {
- return symbolResult switch
- {
- CommandResult commandResult => commandResult.IdentifierToken,
- OptionResult optionResult => optionResult.IdentifierToken is null ?
- new CliToken($"--{optionResult.Option.Name}", CliTokenType.Option, optionResult.Option)
- : optionResult.IdentifierToken,
- ArgumentResult argResult => new CliToken(argResult.GetValueOrDefault(), CliTokenType.Argument, argResult.Argument),
- _ => default
- };
- }
- }
-}
diff --git a/src/Cli/dotnet/DotNetCommandFactory.cs b/src/Cli/dotnet/DotNetCommandFactory.cs
index 3106a49c01d4..22b04fd9df81 100644
--- a/src/Cli/dotnet/DotNetCommandFactory.cs
+++ b/src/Cli/dotnet/DotNetCommandFactory.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.CommandLine.Invocation;
using System.Diagnostics;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.CommandFactory;
@@ -37,9 +38,9 @@ public ICommand Create(
private bool TryGetBuiltInCommand(string commandName, out Func commandFunc)
{
var command = Parser.GetBuiltInCommand(commandName);
- if (command != null && command.Action != null)
+ if (command?.Action is AsynchronousCliAction action)
{
- commandFunc = (args) => command.Action.InvokeAsync(Parser.Instance.Parse(args)).Result;
+ commandFunc = (args) => action.InvokeAsync(Parser.Instance.Parse(args)).Result;
return true;
}
commandFunc = null;
diff --git a/src/Cli/dotnet/Installer/Windows/ISynchronizingLogger.cs b/src/Cli/dotnet/Installer/Windows/ISynchronizingLogger.cs
new file mode 100644
index 000000000000..a442a7f4401a
--- /dev/null
+++ b/src/Cli/dotnet/Installer/Windows/ISynchronizingLogger.cs
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace Microsoft.DotNet.Installer.Windows
+{
+ ///
+ /// Represents a type used to log setup operations that can manage a series of named pipes writing to it.
+ ///
+ internal interface ISynchronizingLogger : ISetupLogger
+ {
+ ///
+ /// Starts a new thread to listen for log requests messages from external processes.
+ ///
+ /// The name of the pipe.
+ void AddNamedPipe(string pipeName);
+ }
+}
diff --git a/src/Cli/dotnet/Installer/Windows/InstallClientElevationContext.cs b/src/Cli/dotnet/Installer/Windows/InstallClientElevationContext.cs
index d6002a9731e5..54dd62eaf0c9 100644
--- a/src/Cli/dotnet/Installer/Windows/InstallClientElevationContext.cs
+++ b/src/Cli/dotnet/Installer/Windows/InstallClientElevationContext.cs
@@ -14,13 +14,13 @@ namespace Microsoft.DotNet.Installer.Windows
[SupportedOSPlatform("windows")]
internal sealed class InstallClientElevationContext : InstallElevationContextBase
{
- private TimestampedFileLogger _log;
+ private ISynchronizingLogger _log;
private Process _serverProcess;
public override bool IsClient => true;
- public InstallClientElevationContext(TimestampedFileLogger logger)
+ public InstallClientElevationContext(ISynchronizingLogger logger)
{
_log = logger;
}
@@ -60,7 +60,7 @@ public override void Elevate()
// Add a pipe to the logger to allow the server to send log requests. This avoids having an elevated process writing
// to a less privileged location. It also simplifies troubleshooting because log events will be chronologically
- // ordered in a single file.
+ // ordered in a single file.
_log.AddNamedPipe(WindowsUtils.CreatePipeName(_serverProcess.Id, "log"));
HasElevated = true;
diff --git a/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs b/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs
index 39adb8effb92..21bf5562bcb1 100644
--- a/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs
+++ b/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs
@@ -146,5 +146,51 @@ public InstallResponseMessage SendWorkloadRecordRequest(InstallRequestType reque
SdkFeatureBand = sdkFeatureBand.ToString(),
});
}
+
+ ///
+ /// Send an to delete the install state file.
+ ///
+ /// The SDK feature band of the install state file to delete.
+ ///
+ public InstallResponseMessage SendRemoveManifestsFromInstallStateFileRequest(SdkFeatureBand sdkFeatureBand)
+ {
+ return Send(new InstallRequestMessage
+ {
+ RequestType = InstallRequestType.RemoveManifestsFromInstallStateFile,
+ SdkFeatureBand = sdkFeatureBand.ToString(),
+ });
+ }
+
+ ///
+ /// Sends an to write the install state file.
+ ///
+ /// The SDK feature band of the install state file to write
+ /// A multi-line string containing the formatted JSON data to write.
+ ///
+ public InstallResponseMessage SendSaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary manifestContents)
+ {
+ return Send(new InstallRequestMessage
+ {
+ RequestType = InstallRequestType.SaveInstallStateManifestVersions,
+ SdkFeatureBand = sdkFeatureBand.ToString(),
+ InstallStateManifestVersions = manifestContents
+ });
+ }
+
+ ///
+ /// Send an to adjust the mode used for installing and updating workloads
+ ///
+ /// The SDK feature band of the install state file to write
+ /// Whether to use workload sets or not
+ ///
+ public InstallResponseMessage SendUpdateWorkloadModeRequest(SdkFeatureBand sdkFeatureBand, bool newMode)
+ {
+ return Send(new InstallRequestMessage
+ {
+ RequestType = InstallRequestType.AdjustWorkloadMode,
+ SdkFeatureBand = sdkFeatureBand.ToString(),
+ UseWorkloadSets = newMode,
+ });
+ }
}
}
diff --git a/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs b/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs
index 712534d0b666..5ab6430bcbf4 100644
--- a/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs
+++ b/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs
@@ -29,6 +29,16 @@ public string ManifestPath
set;
}
+ ///
+ /// The contents of the install state file. Each element corresponds to a single line of
+ /// the JSON file to be written.
+ ///
+ public Dictionary InstallStateManifestVersions
+ {
+ get;
+ set;
+ }
+
///
/// The path of the MSI log file to generate when installing, uninstalling or repairing a specific MSI.
///
@@ -110,6 +120,14 @@ public string WorkloadId
set;
}
+ ///
+ /// The new mode to use: workloadset or loosemanifests
+ ///
+ public bool UseWorkloadSets
+ {
+ get; set;
+ }
+
///
/// Converts a deserialized array of bytes into an .
///
diff --git a/src/Cli/dotnet/Installer/Windows/InstallRequestType.cs b/src/Cli/dotnet/Installer/Windows/InstallRequestType.cs
index 7bb46285b29a..2d90d3f2f68f 100644
--- a/src/Cli/dotnet/Installer/Windows/InstallRequestType.cs
+++ b/src/Cli/dotnet/Installer/Windows/InstallRequestType.cs
@@ -53,6 +53,21 @@ public enum InstallRequestType
///
/// Remove a workload installation record.
///
- DeleteWorkloadInstallationRecord
+ DeleteWorkloadInstallationRecord,
+
+ ///
+ /// Creates an install state file.
+ ///
+ SaveInstallStateManifestVersions,
+
+ ///
+ /// Removes an install state file.
+ ///
+ RemoveManifestsFromInstallStateFile,
+
+ ///
+ /// Changes the workload mode
+ ///
+ AdjustWorkloadMode,
}
}
diff --git a/src/Cli/dotnet/Installer/Windows/InstallerBase.cs b/src/Cli/dotnet/Installer/Windows/InstallerBase.cs
index 5a7e19f87e16..6ac423a25ea6 100644
--- a/src/Cli/dotnet/Installer/Windows/InstallerBase.cs
+++ b/src/Cli/dotnet/Installer/Windows/InstallerBase.cs
@@ -103,7 +103,7 @@ protected bool VerifySignatures
///
///
///
- ///
+ /// Determines whether MSI signatures should be verified
protected InstallerBase(InstallElevationContextBase elevationContext, ISetupLogger logger, bool verifySignatures)
{
ElevationContext = elevationContext;
@@ -123,7 +123,7 @@ protected void Elevate()
/// Checks the specified error code to determine whether it indicates a success result. If not, additional extended information
/// is retrieved before throwing a .
///
- /// The property will be set to if the error is either
+ /// The property will be set to if the error is either
/// or .
///
/// The error code to check.
@@ -133,18 +133,7 @@ protected void ExitOnError(uint error, string message)
{
if (!Error.Success(error))
{
- StringBuilder sb = new(2048);
- NativeMethods.FormatMessage((uint)(FormatMessage.FromSystem | FormatMessage.IgnoreInserts),
- IntPtr.Zero, error, 0, sb, (uint)sb.Capacity, IntPtr.Zero);
- string errorDetail = sb.ToString().TrimEnd(Environment.NewLine.ToCharArray());
- string errorMessage = $"{message} Error: 0x{error:x8}.";
-
- if (!string.IsNullOrWhiteSpace(errorDetail))
- {
- errorMessage += $" {errorDetail}";
- }
-
- throw new WorkloadException(error, errorMessage);
+ throw new WorkloadException($"{message} Error: 0x{error:x8}, {Marshal.GetPInvokeErrorMessage((int)error)}");
}
// Once set to true, we retain restart information for the duration of the underlying command.
diff --git a/src/Cli/dotnet/Installer/Windows/LocalizableStrings.resx b/src/Cli/dotnet/Installer/Windows/LocalizableStrings.resx
index da4ab122f64b..896807677bf5 100644
--- a/src/Cli/dotnet/Installer/Windows/LocalizableStrings.resx
+++ b/src/Cli/dotnet/Installer/Windows/LocalizableStrings.resx
@@ -117,7 +117,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
+
+ The requested certificate chain policy could not be checked: {0}
\ No newline at end of file
diff --git a/src/Cli/dotnet/Installer/Windows/MsiPackageCache.cs b/src/Cli/dotnet/Installer/Windows/MsiPackageCache.cs
index ff74254b4f61..54f0939a4785 100644
--- a/src/Cli/dotnet/Installer/Windows/MsiPackageCache.cs
+++ b/src/Cli/dotnet/Installer/Windows/MsiPackageCache.cs
@@ -1,15 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System.IO.Pipes;
using System.Runtime.Versioning;
-using System.Security;
-using System.Security.AccessControl;
-using System.Security.Cryptography.X509Certificates;
-using System.Security.Principal;
-using Microsoft.DotNet.Cli.Utils;
+#if !DOT_NET_BUILD_FROM_SOURCE
using Microsoft.DotNet.Installer.Windows.Security;
-using Microsoft.Win32.Msi;
+#endif
+using Microsoft.DotNet.Workloads.Workload;
using Newtonsoft.Json;
namespace Microsoft.DotNet.Installer.Windows
@@ -21,53 +17,9 @@ namespace Microsoft.DotNet.Installer.Windows
internal class MsiPackageCache : InstallerBase
{
///
- /// Default inheritance to apply to directory ACLs.
+ /// Determines whether revocation checks can go online.
///
- private static readonly InheritanceFlags s_DefaultInheritance = InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit;
-
- ///
- /// SID that matches built-in administrators.
- ///
- private static readonly SecurityIdentifier s_AdministratorsSid = new(WellKnownSidType.BuiltinAdministratorsSid, null);
-
- ///
- /// SID that matches everyone.
- ///
- private static readonly SecurityIdentifier s_EveryoneSid = new(WellKnownSidType.WorldSid, null);
-
- ///
- /// Local SYSTEM SID.
- ///
- private static readonly SecurityIdentifier s_LocalSystemSid = new(WellKnownSidType.LocalSystemSid, null);
-
- ///
- /// SID matching built-in user accounts.
- ///
- private static readonly SecurityIdentifier s_UsersSid = new(WellKnownSidType.BuiltinUsersSid, null);
-
- ///
- /// ACL rule associated with the Administrators SID.
- ///
- private static readonly FileSystemAccessRule s_AdministratorRule = new(s_AdministratorsSid, FileSystemRights.FullControl,
- s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
-
- ///
- /// ACL rule associated with the Everyone SID.
- ///
- private static readonly FileSystemAccessRule s_EveryoneRule = new(s_EveryoneSid, FileSystemRights.ReadAndExecute,
- s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
-
- ///
- /// ACL rule associated with the Local SYSTEM SID.
- ///
- private static readonly FileSystemAccessRule s_LocalSystemRule = new(s_LocalSystemSid, FileSystemRights.FullControl,
- s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
-
- ///
- /// ACL rule associated with the built-in users SID.
- ///
- private static readonly FileSystemAccessRule s_UsersRule = new(s_UsersSid, FileSystemRights.ReadAndExecute,
- s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
+ private bool _allowOnlineRevocationChecks;
///
/// The root directory of the package cache where MSI workload packs are stored.
@@ -80,21 +32,7 @@ public MsiPackageCache(InstallElevationContextBase elevationContext, ISetupLogge
PackageCacheRoot = string.IsNullOrWhiteSpace(packageCacheRoot)
? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads")
: packageCacheRoot;
- }
-
- ///
- /// Creates the specified directory and secures it by configuring access rules (ACLs) that allow sub-directories
- /// and files to inherit access control entries.
- ///
- /// The path of the directory to create.
- public static void CreateSecureDirectory(string path)
- {
- if (!Directory.Exists(path))
- {
- DirectorySecurity ds = new();
- SetDirectoryAccessRules(ds);
- ds.CreateDirectory(path);
- }
+ _allowOnlineRevocationChecks = SignCheck.AllowOnlineRevocationChecks();
}
///
@@ -123,7 +61,7 @@ public void CachePayload(string packageId, string packageVersion, string manifes
Directory.Delete(packageDirectory, recursive: true);
}
- CreateSecureDirectory(packageDirectory);
+ SecurityUtils.CreateSecureDirectory(packageDirectory);
// We cannot assume that the MSI adjacent to the manifest is the one to cache. We'll trust
// the manifest to provide the MSI filename.
@@ -134,8 +72,8 @@ public void CachePayload(string packageId, string packageVersion, string manifes
string cachedMsiPath = Path.Combine(packageDirectory, Path.GetFileName(msiPath));
string cachedManifestPath = Path.Combine(packageDirectory, Path.GetFileName(manifestPath));
- MoveAndSecureFile(manifestPath, cachedManifestPath, Log);
- MoveAndSecureFile(msiPath, cachedMsiPath, Log);
+ SecurityUtils.MoveAndSecureFile(manifestPath, cachedManifestPath, Log);
+ SecurityUtils.MoveAndSecureFile(msiPath, cachedMsiPath, Log);
}
else if (IsClient)
{
@@ -154,37 +92,6 @@ public string GetPackageDirectory(string packageId, string packageVersion)
return Path.Combine(PackageCacheRoot, packageId, packageVersion);
}
- ///
- /// Moves a file from one location to another if the destination file does not already exist and
- /// configure its permissions.
- ///
- /// The source file to move.
- /// The destination where the source file will be moved.
- /// The underlying setup log to use.
- public static void MoveAndSecureFile(string sourceFile, string destinationFile, ISetupLogger log = null)
- {
- if (!File.Exists(destinationFile))
- {
- FileAccessRetrier.RetryOnMoveAccessFailure(() =>
- {
- // Moving the file preserves the owner SID and fails to inherit the WD ACE.
- File.Copy(sourceFile, destinationFile, overwrite: true);
- File.Delete(sourceFile);
- });
- log?.LogMessage($"Moved '{sourceFile}' to '{destinationFile}'");
-
- FileInfo fi = new(destinationFile);
- FileSecurity fs = new();
-
- // Set the owner and group to built-in administrators (BA). All other ACE values are inherited from
- // the parent directory. See https://github.com/dotnet/sdk/issues/28450. If the directory's descriptor
- // is correctly configured, we should end up with an inherited ACE for Everyone: (A;ID;0x1200a9;;;WD)
- fs.SetOwner(s_AdministratorsSid);
- fs.SetGroup(s_AdministratorsSid);
- fi.SetAccessControl(fs);
- }
- }
-
///
/// Determines if the workload pack MSI is cached and tries to retrieve its payload from the cache.
///
@@ -238,74 +145,36 @@ public bool TryGetMsiPathFromPackageData(string packageDataPath, out string msiP
}
///
- /// Apply a standard set of access rules to the directory security descriptor. The owner and group will
- /// be set to built-in Administrators. Full access is granted to built-in administators and SYSTEM with
- /// read, execute, synchronize permssions for built-in users and Everyone.
- ///
- /// The security descriptor to update.
- private static void SetDirectoryAccessRules(DirectorySecurity ds)
- {
- ds.SetOwner(s_AdministratorsSid);
- ds.SetGroup(s_AdministratorsSid);
- ds.SetAccessRule(s_AdministratorRule);
- ds.SetAccessRule(s_LocalSystemRule);
- ds.SetAccessRule(s_UsersRule);
- ds.SetAccessRule(s_EveryoneRule);
- }
-
- ///
- /// Verifies the AuthentiCode signature of an MSI package if the executing command itself is running
- /// from a signed module.
+ /// Verifies that an MSI package contains an Authenticode signature that terminates in a trusted Microsoft root certificate.
///
/// The path of the MSI to verify.
private void VerifyPackageSignature(string msiPath)
{
if (VerifySignatures)
{
- bool isAuthentiCodeSigned = AuthentiCode.IsSigned(msiPath);
-
- // Need to capture the error now as other OS calls might change the last error.
- uint lastError = !isAuthentiCodeSigned ? unchecked((uint)Marshal.GetLastWin32Error()) : Error.SUCCESS;
-
- bool isTrustedOrganization = AuthentiCode.IsSignedByTrustedOrganization(msiPath, AuthentiCode.TrustedOrganizations);
-
- if (isAuthentiCodeSigned && isTrustedOrganization)
+ // MSI and authenticode verification only applies to Windows. NET only supports Win7 and later.
+#if !DOT_NET_BUILD_FROM_SOURCE
+#pragma warning disable CA1416
+ unsafe
{
- Log?.LogMessage($"Successfully verified AuthentiCode signature for {msiPath}.");
- }
- else
- {
- // Summarize the failure and then report additional details.
- Log?.LogMessage($"Failed to verify signature for {msiPath}. AuthentiCode signed: {isAuthentiCodeSigned}, Trusted organization: {isTrustedOrganization}.");
- IEnumerable certificates = AuthentiCode.GetCertificates(msiPath);
+ int result = Signature.IsAuthenticodeSigned(msiPath, _allowOnlineRevocationChecks);
- // Dump all the certificates if there are any.
- if (certificates.Any())
+ if (result != 0)
{
- Log?.LogMessage($"Certificate(s):");
-
- foreach (X509Certificate2 certificate in certificates)
- {
- Log?.LogMessage($" Subject={certificate.Subject}");
- Log?.LogMessage($" Issuer={certificate.Issuer}");
- Log?.LogMessage($" Not before={certificate.NotBefore}");
- Log?.LogMessage($" Not after={certificate.NotAfter}");
- Log?.LogMessage($" Thumbprint={certificate.Thumbprint}");
- Log?.LogMessage($" Algorithm={certificate.SignatureAlgorithm.FriendlyName}");
- }
+ ExitOnError((uint)result, $"Failed to verify Authenticode signature, package: {msiPath}, allow online revocation checks: {_allowOnlineRevocationChecks}");
}
- if (!isAuthentiCodeSigned)
- {
- // If it was a WinTrust failure, we can exit using that error code and include a proper message from the OS.
- ExitOnError(lastError, $"Failed to verify authenticode signature for {msiPath}.");
- }
+ result = Signature.HasMicrosoftTrustedRoot(msiPath);
- if (!isTrustedOrganization)
+ if (result != 0)
{
- throw new SecurityException(string.Format(LocalizableStrings.AuthentiCodeNoTrustedOrg, msiPath));
+ ExitOnError((uint)result, $"Failed to verify the Authenticode signature terminates in a trusted Microsoft root certificate. Package: {msiPath}");
}
+
}
+ Log?.LogMessage($"Successfully verified Authenticode signature for {msiPath}");
+#pragma warning restore CA1416
+#endif
}
else
{
diff --git a/src/Cli/dotnet/Installer/Windows/NullInstallerLogger.cs b/src/Cli/dotnet/Installer/Windows/NullInstallerLogger.cs
new file mode 100644
index 000000000000..2c61375d89a1
--- /dev/null
+++ b/src/Cli/dotnet/Installer/Windows/NullInstallerLogger.cs
@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+namespace Microsoft.DotNet.Installer.Windows;
+
+///
+/// A class that swallows all logging - used for code paths where logging setup operations isn't valuable, like dotnet --info.
+///
+internal class NullInstallerLogger : ISynchronizingLogger
+{
+ public string LogPath => String.Empty;
+
+ public void AddNamedPipe(string pipeName)
+ {
+
+ }
+
+ public void LogMessage(string message)
+ {
+
+ }
+}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/AuthentiCode.cs b/src/Cli/dotnet/Installer/Windows/Security/AuthentiCode.cs
deleted file mode 100644
index 59aeb5161034..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/AuthentiCode.cs
+++ /dev/null
@@ -1,191 +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.ComponentModel;
-using System.Runtime.Versioning;
-using System.Security.Cryptography;
-using System.Security.Cryptography.Pkcs;
-using System.Security.Cryptography.X509Certificates;
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Contains various utilities methods around verifying AuthentiCode signatures on Windows.
- ///
-#if NETCOREAPP
- [SupportedOSPlatform("windows")]
-#endif
- internal static class AuthentiCode
- {
- ///
- /// A set of trusted organizations used to verify the certificates associated with an AuthentiCode signature.
- ///
- public static readonly string[] TrustedOrganizations = { "Microsoft Corporation" };
-
- ///
- /// Object identifier value for nested signature.
- ///
- private const string OidNestedSignature = "1.3.6.1.4.1.311.2.4.1";
-
- ///
- /// Verifies the authenticode signature of the specified file.
- ///
- /// The full path of the file to verify.
- /// if the signature is valid; otherwise.
- public static bool IsSigned(string path)
- {
- WinTrustFileInfo fileInfo = new()
- {
- cbStruct = (uint)Marshal.SizeOf(typeof(WinTrustFileInfo)),
- pcwszFilePath = Path.GetFullPath(path),
- hFile = IntPtr.Zero,
- pgKnownSubject = IntPtr.Zero
- };
-
- WinTrustData data = new()
- {
- cbStruct = (uint)Marshal.SizeOf(typeof(WinTrustData)),
- dwProvFlags = 0,
- dwStateAction = StateAction.WTD_STATEACTION_IGNORE,
- dwUIChoice = UIChoice.WTD_UI_NONE,
- dwUIContext = 0,
- dwUnionChoice = UnionChoice.WTD_CHOICE_FILE,
- fdwRevocationChecks = RevocationChecks.WTD_REVOKE_NONE,
- hWVTStateData = IntPtr.Zero,
- pWinTrustInfo = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(WinTrustFileInfo))),
- pPolicyCallbackData = IntPtr.Zero,
- pSIPClientData = IntPtr.Zero,
- pwszURLReference = IntPtr.Zero
- };
-
- Marshal.StructureToPtr(fileInfo, data.pWinTrustInfo, false);
-
- IntPtr pGuid = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Guid)));
- IntPtr pData = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(WinTrustData)));
- Marshal.StructureToPtr(data, pData, true);
- Marshal.StructureToPtr(NativeMethods.WINTRUST_ACTION_GENERIC_VERIFY_V2, pGuid, true);
-
- uint result = NativeMethods.WinVerifyTrust(IntPtr.Zero, pGuid, pData);
-
- Marshal.FreeHGlobal(pGuid);
- Marshal.FreeHGlobal(pData);
- Marshal.FreeHGlobal(data.pWinTrustInfo);
-
- // The return value is a LONG, not an HRESULT.
- // Do not use HRESULT macros such as SUCCEEDED to determine whether the function succeeded.
- // Instead, check the return value for equality to zero.
- return result == 0;
- }
-
- ///
- /// Determines if the file contains a signature associated with one of the specified organizations. The primary certificate is queried
- /// before looking at nested certificates.
- ///
- /// The path of the signed file.
- /// A set of trusted organizations.
- /// if organization described in the certificate subject matches any of the specified
- /// organizations; otherwise.
- internal static bool IsSignedByTrustedOrganization(string path, params string[] organizations)
- {
- try
- {
- IEnumerable certificates = GetCertificates(path);
-
- return certificates.Any(c => organizations.Any(o => c.Subject.Contains($"O={o}", StringComparison.OrdinalIgnoreCase)));
- }
- catch (CryptographicException)
- {
- return false;
- }
- }
-
- ///
- /// Retrieves the certificates from each signature in the specified file, including nested signatures.
- ///
- /// The path of the file.
- /// A collection of one or more certificates.
- internal static List GetCertificates(string path)
- {
- List certificates = new();
-
- try
- {
- certificates.Add(new X509Certificate2(X509Certificate.CreateFromSignedFile(path)));
- }
- catch (CryptographicException)
- {
- return certificates;
- }
-
- SignedCms cms = CreateSignedCmsFromFile(path);
-
- foreach (CryptographicAttributeObject attribute in cms.SignerInfos[0].UnsignedAttributes)
- {
- if (attribute.Oid.Value.Equals(OidNestedSignature))
- {
- foreach (AsnEncodedData value in attribute.Values)
- {
- SignedCms nestedCms = new();
- nestedCms.Decode(value.RawData);
-
- certificates.Add(nestedCms.Certificates[0]);
- }
- }
- }
-
- return certificates;
- }
-
- ///
- /// Creates a object from all the certificate data in a file.
- ///
- /// The full path of the file to use.
- ///
- private static SignedCms CreateSignedCmsFromFile(string path)
- {
- int msgAndCertEncodingType;
- int msgContentType;
- int formatType;
-
- IntPtr certStore = IntPtr.Zero;
- IntPtr phMessage = IntPtr.Zero;
- IntPtr context = IntPtr.Zero;
- IntPtr pvObject = Marshal.StringToHGlobalUni(path);
-
- try
- {
- if (!NativeMethods.CryptQueryObject(CryptQueryObjectType.File, pvObject,
- CertQueryContentFlags.All, CertQueryFormatFlags.All, 0,
- out msgAndCertEncodingType, out msgContentType, out formatType, ref certStore, ref phMessage, ref context))
- {
- throw new Win32Exception(Marshal.GetLastWin32Error());
- }
-
- int cbData = 0;
-
- // Passing in NULL to pvData retrieves the size of the encoded message, allowing us to allocate a buffer and then
- // call the function again to retrieve it.
- if (!NativeMethods.CryptMsgGetParam(phMessage, Crypt32.CMSG_ENCODED_MESSAGE, 0, IntPtr.Zero, ref cbData))
- {
- throw new Win32Exception(Marshal.GetLastWin32Error());
- }
-
- byte[] pvData = new byte[cbData];
- if (!NativeMethods.CryptMsgGetParam(phMessage, Crypt32.CMSG_ENCODED_MESSAGE, 0, pvData, ref cbData))
- {
- throw new Win32Exception(Marshal.GetLastWin32Error());
- }
-
- var signedCms = new SignedCms();
- signedCms.Decode(pvData);
-
- return signedCms;
- }
- finally
- {
- Marshal.FreeHGlobal(pvObject);
- Marshal.FreeHGlobal(phMessage);
- }
- }
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/CertQueryContentFlags.cs b/src/Cli/dotnet/Installer/Windows/Security/CertQueryContentFlags.cs
deleted file mode 100644
index 1aa375d93c06..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/CertQueryContentFlags.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Flags describing different content objects that can be queried.
- ///
- [Flags]
- public enum CertQueryContentFlags
- {
- ///
- /// The content is a single certificate
- ///
- Certificate = 1 << Crypt32.CERT_QUERY_CONTENT_CERT,
-
- ///
- /// The content is a single certificate trust list (CTL).
- ///
- CertificateTrustList = 1 << Crypt32.CERT_QUERY_CONTENT_CTL,
-
- ///
- /// The content is a single certificate revocation list (CRL).
- ///
- CertificalRevocationList = 1 << Crypt32.CERT_QUERY_CONTENT_CRL,
-
- ///
- /// The content is a serialized store.
- ///
- SerializedStore = 1 << Crypt32.CERT_QUERY_CONTENT_SERIALIZED_STORE,
-
- ///
- /// The content is a single, serialized certificate.
- ///
- SerializedCertificate = 1 << Crypt32.CERT_QUERY_CONTENT_SERIALIZED_CERT,
-
- ///
- /// The content is a single, serialized certificate trust list (CTL).
- ///
- SerializedCertificateTrustList = 1 << Crypt32.CERT_QUERY_CONTENT_SERIALIZED_CTL,
-
- ///
- /// The content is a single, serialized certificate revocation list (CRL).
- ///
- SerializedCertificateRevocationList = 1 << Crypt32.CERT_QUERY_CONTENT_SERIALIZED_CRL,
-
- ///
- /// The content is a PKCS #7 signed message.
- ///
- Pkcs7Signed = 1 << Crypt32.CERT_QUERY_CONTENT_PKCS7_SIGNED,
-
- ///
- /// The content is a PKCS #7 unsigned message.
- ///
- Pkcs7Unsigned = 1 << Crypt32.CERT_QUERY_CONTENT_PKCS7_UNSIGNED,
-
- ///
- /// The content is an embedded PKCS #7 signed message.
- ///
- Pkcs7SignedEmbed = 1 << Crypt32.CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED,
-
- ///
- /// The content is a PKCS #10 message.
- ///
- Pkcs10 = 1 << Crypt32.CERT_QUERY_CONTENT_PKCS10,
-
- ///
- /// The content is an encoded PFX blob.
- ///
- Pfx = 1 << Crypt32.CERT_QUERY_CONTENT_PFX,
-
- ///
- /// An encoded CertificatePair (contains forward and/or reverse cross certs)
- ///
- CertificatePair = 1 << Crypt32.CERT_QUERY_CONTENT_CERT_PAIR,
-
- ///
- /// The content is an encoded PFX blob and will be loaded subject to various conditions.
- /// See this for more details.
- ///
- PfxAndLoad = 1 << Crypt32.CERT_QUERY_CONTENT_PFX_AND_LOAD,
-
- ///
- /// The content can be any type, except .
- ///
- All = Certificate | CertificateTrustList | CertificalRevocationList |
- SerializedStore | SerializedCertificate | SerializedCertificateTrustList | SerializedCertificateRevocationList |
- Pkcs7Signed | Pkcs7Unsigned | Pkcs7SignedEmbed | Pkcs10 | Pfx |
- CertificatePair
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/CertQueryFormatFlags.cs b/src/Cli/dotnet/Installer/Windows/Security/CertQueryFormatFlags.cs
deleted file mode 100644
index 3ded8384eaad..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/CertQueryFormatFlags.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// The expected format of return types, expressed as a flag.
- ///
- public enum CertQueryFormatFlags : uint
- {
- ///
- /// The content is in binary format.
- ///
- Binary = 1 << Crypt32.CERT_QUERY_FORMAT_BINARY,
-
- ///
- /// The content is base64 encoded.
- ///
- Base64 = 1 << Crypt32.CERT_QUERY_FORMAT_BASE64_ENCODED,
-
- ///
- /// The content is in ASCII hex-encoded with a "{ASN}" prefix.
- ///
- AsnAsciiHex = 1 << Crypt32.CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED,
-
- ///
- /// The content can be returned in any format.
- ///
- All = Binary | Base64 | AsnAsciiHex
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/Crypt32.cs b/src/Cli/dotnet/Installer/Windows/Security/Crypt32.cs
deleted file mode 100644
index 9478bae88b9f..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/Crypt32.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Defines various constants related to Windows cryptographic APIs.
- ///
- internal partial class Crypt32
- {
- //encoded single certificate
- internal const int CERT_QUERY_CONTENT_CERT = 1;
- //encoded single CTL
- internal const int CERT_QUERY_CONTENT_CTL = 2;
- //encoded single CRL
- internal const int CERT_QUERY_CONTENT_CRL = 3;
- //serialized store
- internal const int CERT_QUERY_CONTENT_SERIALIZED_STORE = 4;
- //serialized single certificate
- internal const int CERT_QUERY_CONTENT_SERIALIZED_CERT = 5;
- //serialized single CTL
- internal const int CERT_QUERY_CONTENT_SERIALIZED_CTL = 6;
- //serialized single CRL
- internal const int CERT_QUERY_CONTENT_SERIALIZED_CRL = 7;
- //a PKCS#7 signed message
- internal const int CERT_QUERY_CONTENT_PKCS7_SIGNED = 8;
- //a PKCS#7 message, such as enveloped message. But it is not a signed message,
- internal const int CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9;
- //a PKCS7 signed message embedded in a file
- internal const int CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10;
- //an encoded PKCS#10
- internal const int CERT_QUERY_CONTENT_PKCS10 = 11;
- //an encoded PFX BLOB
- internal const int CERT_QUERY_CONTENT_PFX = 12;
- //an encoded CertificatePair (contains forward and/or reverse cross certs)
- internal const int CERT_QUERY_CONTENT_CERT_PAIR = 13;
- //an encoded PFX BLOB, which was loaded to phCertStore
- internal const int CERT_QUERY_CONTENT_PFX_AND_LOAD = 14;
-
- internal const int CERT_QUERY_FORMAT_BINARY = 1;
- internal const int CERT_QUERY_FORMAT_BASE64_ENCODED = 2;
- internal const int CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED = 3;
-
- // See https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptmsggetparam
- public const int CMSG_TYPE_PARAM = 1;
- public const int CMSG_CONTENT_PARAM = 2;
- public const int CMSG_BARE_CONTENT_PARAM = 3;
- public const int CMSG_INNER_CONTENT_TYPE_PARAM = 4;
- public const int CMSG_SIGNER_COUNT_PARAM = 5;
- public const int CMSG_SIGNER_INFO_PARAM = 6;
- public const int CMSG_SIGNER_CERT_INFO_PARAM = 7;
- public const int CMSG_SIGNER_HASH_ALGORITHM_PARAM = 8;
- public const int CMSG_SIGNER_AUTH_ATTR_PARAM = 9;
- public const int CMSG_SIGNER_UNAUTH_ATTR_PARAM = 10;
- public const int CMSG_CERT_COUNT_PARAM = 11;
- public const int CMSG_CERT_PARAM = 12;
- public const int CMSG_CRL_COUNT_PARAM = 13;
- public const int CMSG_CRL_PARAM = 14;
- public const int CMSG_ENVELOPE_ALGORITHM_PARAM = 15;
- public const int CMSG_RECIPIENT_COUNT_PARAM = 17;
- public const int CMSG_RECIPIENT_INDEX_PARAM = 18;
- public const int CMSG_RECIPIENT_INFO_PARAM = 19;
- public const int CMSG_HASH_ALGORITHM_PARAM = 20;
- public const int CMSG_HASH_DATA_PARAM = 21;
- public const int CMSG_COMPUTED_HASH_PARAM = 22;
- public const int CMSG_ENCRYPT_PARAM = 26;
- public const int CMSG_ENCRYPTED_DIGEST = 27;
- public const int CMSG_ENCODED_SIGNER = 28;
- public const int CMSG_ENCODED_MESSAGE = 29;
- public const int CMSG_VERSION_PARAM = 30;
- public const int CMSG_ATTR_CERT_COUNT_PARAM = 31;
- public const int CMSG_ATTR_CERT_PARAM = 32;
- public const int CMSG_CMS_RECIPIENT_COUNT_PARAM = 33;
- public const int CMSG_CMS_RECIPIENT_INDEX_PARAM = 34;
- public const int CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM = 35;
- public const int CMSG_CMS_RECIPIENT_INFO_PARAM = 36;
- public const int CMSG_UNPROTECTED_ATTR_PARAM = 37;
- public const int CMSG_SIGNER_CERT_ID_PARAM = 38;
- public const int CMSG_CMS_SIGNER_INFO_PARAM = 39;
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/CryptQueryObjectType.cs b/src/Cli/dotnet/Installer/Windows/Security/CryptQueryObjectType.cs
deleted file mode 100644
index 6e7ede4ba5d9..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/CryptQueryObjectType.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// The type of object to be queried.
- ///
- public enum CryptQueryObjectType : uint
- {
- ///
- /// The object is stored in a file.
- ///
- File = 1,
-
- ///
- /// The object is stored in memory.
- ///
- Blob = 2
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/NativeMethods.cs b/src/Cli/dotnet/Installer/Windows/Security/NativeMethods.cs
deleted file mode 100644
index c759ef536638..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/NativeMethods.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- internal class NativeMethods
- {
- ///
- /// The GUID action ID for using the AuthentiCode policy provider (see softpub.h).
- ///
- public static readonly Guid WINTRUST_ACTION_GENERIC_VERIFY_V2 = new("{00AAC56B-CD44-11d0-8CC2-00C04FC295EE}");
-
- [DllImport("Crypt32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- [DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
- public static extern bool CryptMsgGetParam(
- IntPtr hCryptMsg,
- int dwParamType,
- int dwIndex,
- [In, Out] byte[] pvData,
- ref int pcbData);
-
- [DllImport("Crypt32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- [DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
- public static extern bool CryptMsgGetParam(
- IntPtr hCryptMsg,
- int dwParamType,
- int dwIndex,
- IntPtr pvData,
- ref int pcbData);
-
- [DllImport("Crypt32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- [DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
- public static extern bool CryptQueryObject(CryptQueryObjectType dwObjectType,
- IntPtr pvObject,
- CertQueryContentFlags dwExpectedContentTypeFlags,
- CertQueryFormatFlags dwExpectedFormatTypeFlags,
- int dwFlags,
- out int pdwMsgAndCertEncodingType,
- out int pdwContentType,
- out int pdwFormatType,
- ref IntPtr phCertStore,
- ref IntPtr phMsg,
- ref IntPtr ppvContext);
-
- [DllImport("wintrust.dll", SetLastError = true)]
- [DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
- public static extern uint WinVerifyTrust(IntPtr hWnd, IntPtr pgActionID, IntPtr pWinTrustData);
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/ProviderSettings.cs b/src/Cli/dotnet/Installer/Windows/Security/ProviderSettings.cs
deleted file mode 100644
index 611dcd7777c8..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/ProviderSettings.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Trust provider settings.
- ///
- [Flags]
- public enum ProviderSettings : uint
- {
- ///
- /// The trust is verified in the same manner as implemented by Internet Explorer 4.0.
- ///
- WTD_USE_IE4_TRUST_FLAG = 0x00000001,
-
- ///
- /// The Internet Explorer 4.0 chain functionality is not used.
- ///
- WTD_NO_IE4_CHAIN_FLAG = 0x00000002,
-
- ///
- /// The default verification of the policy provider, such as code signing for Authenticode, is not performed, and the certificate is assumed valid for all usages.
- ///
- WTD_NO_POLICY_USAGE_FLAG = 0x00000004,
-
- ///
- /// Revocation checking is not performed.
- ///
- WTD_REVOCATION_CHECK_NONE = 0x00000010,
-
- ///
- /// Revocation checking is performed on the end certificate only.
- ///
- WTD_REVOCATION_CHECK_END_CERT = 0x00000020,
-
- ///
- /// Revocation checking is performed on the entire certificate chain.
- ///
- WTD_REVOCATION_CHECK_CHAIN = 0x00000040,
-
- ///
- /// Revocation checking is performed on the entire certificate chain, excluding the root certificate.
- ///
- WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x00000080,
-
- ///
- /// Not supported.
- ///
- WTD_SAFER_FLAG = 0x00000100,
-
- ///
- /// Only the hash is verified.
- ///
- WTD_HASH_ONLY_FLAG = 0x00000200,
-
- ///
- /// The default operating system version checking is performed. This flag is only used for verifying catalog-signed files.
- ///
- WTD_USE_DEFAULT_OSVER_CHECK = 0x00000400,
-
- ///
- /// If this flag is not set, all time stamped signatures are considered valid forever. Setting this flag limits the valid lifetime of the signature to the lifetime of the signing certificate. This allows time stamped signatures to expire.
- ///
- WTD_LIFETIME_SIGNING_FLAG = 0x00000800,
-
- ///
- /// Use only the local cache for revocation checks. Prevents revocation checks over the network. This value is not supported on Windows XP.
- ///
- WTD_CACHE_ONLY_URL_RETRIEVAL = 0x00001000,
-
- ///
- /// Disable the use of MD2 and MD4 hashing algorithms. If a file is signed by using MD2 or MD4 and if this flag is set, an NTE_BAD_ALGID error is returned.
- /// This flag is only supported on Windows 7 SP1 and later.
- ///
- WTD_DISABLE_MD2_MD4 = 0x00002000,
-
- ///
- /// If this flag is specified it is assumed that the file being verified has been downloaded from the web and has the Mark of the Web attribute. Policies that are meant to apply to Mark of the Web files will be enforced.
- /// This flag is only supported on Windows 8.1 and later or system that installed KB2862966.
- ///
- WTD_MOTW = 0x00004000
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/RevocationChecks.cs b/src/Cli/dotnet/Installer/Windows/Security/RevocationChecks.cs
deleted file mode 100644
index 0c983c67ddef..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/RevocationChecks.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Defines options to specify additional revocation checks.
- ///
- public enum RevocationChecks : uint
- {
- ///
- /// No additional revocation checking will be done when the WTD_REVOKE_NONE flag is used in conjunction with the HTTPSPROV_ACTION value set in the pgActionID parameter of the WinVerifyTrust function. To ensure the WinVerifyTrust function does not attempt any network retrieval when verifying code signatures, WTD_CACHE_ONLY_URL_RETRIEVAL must be set in the dwProvFlags parameter.
- ///
- WTD_REVOKE_NONE = 0,
-
- ///
- /// Revocation checking will be done on the whole chain.
- ///
- WTD_REVOKE_WHOLECHAIN = 1
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/Signature.cs b/src/Cli/dotnet/Installer/Windows/Security/Signature.cs
new file mode 100644
index 000000000000..16cfe8ab7738
--- /dev/null
+++ b/src/Cli/dotnet/Installer/Windows/Security/Signature.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.Versioning;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using Windows.Win32.Foundation;
+using Windows.Win32.Security.Cryptography;
+using Windows.Win32.Security.WinTrust;
+using static Windows.Win32.PInvoke;
+
+namespace Microsoft.DotNet.Installer.Windows.Security
+{
+ ///
+ /// Contains methods for verifying Authenticode signatures on Windows.
+ ///
+#if NETCOREAPP
+ [SupportedOSPlatform("windows5.1.2600")]
+#endif
+ internal static class Signature
+ {
+ ///
+ /// Verifies that the certificate used to sign the specified file terminates in a trusted Microsoft root certificate. The policy check is performed against
+ /// the first simple chain.
+ ///
+ /// The path of the file to verify.
+ /// 0 if the policy could be checked. can be called to obtain more detail about the failure.
+ ///
+ /// This method does not perform any other chain validation like revocation checks, timestamping, etc.
+ internal static unsafe int HasMicrosoftTrustedRoot(string path)
+ {
+ // Create an X509Certificate2 instance so we can access the certificate context and create a chain context.
+ using X509Certificate2 certificate = new(path);
+
+ // We don't use X509Chain because it doesn't support verifying the specific policy and because we defer
+ // that to the WinTrust provider as it performs timestamp and revocation checks.
+ HCERTCHAINENGINE HCCE_LOCAL_MACHINE = (HCERTCHAINENGINE)0x01;
+ CERT_CHAIN_PARA pChainPara = default;
+ CERT_CHAIN_CONTEXT* pChainContext = default;
+ CERT_CONTEXT* pCertContext = (CERT_CONTEXT*)certificate.Handle;
+ uint dwFlags = 0;
+
+ try
+ {
+ if (!CertGetCertificateChain(HCCE_LOCAL_MACHINE, pCertContext, null, default, &pChainPara, dwFlags, null, &pChainContext))
+ {
+ throw new CryptographicException(Marshal.GetPInvokeErrorMessage(Marshal.GetLastWin32Error()));
+ }
+
+ CERT_CHAIN_POLICY_PARA policyCriteria = default;
+ CERT_CHAIN_POLICY_STATUS policyStatus = default;
+
+ policyCriteria.cbSize = (uint)sizeof(CERT_CHAIN_POLICY_PARA);
+ policyCriteria.dwFlags = (CERT_CHAIN_POLICY_FLAGS)MICROSOFT_ROOT_CERT_CHAIN_POLICY_CHECK_APPLICATION_ROOT_FLAG;
+
+ if (!CertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_MICROSOFT_ROOT, pChainContext, &policyCriteria, &policyStatus))
+ {
+ throw new CryptographicException(string.Format(LocalizableStrings.UnableToCheckCertificateChainPolicy, nameof(CERT_CHAIN_POLICY_MICROSOFT_ROOT)));
+ }
+
+ return (int)policyStatus.dwError;
+ }
+ finally
+ {
+ CertFreeCertificateChain(pChainContext);
+ }
+ }
+
+ ///
+ /// Verifies that the specified file is Authenticode signed.
+ ///
+ /// The path of the file to verify.
+ /// Allow revocation checks to go online. When set to , the cached certificate revocation list is used instead.
+ /// 0 if successful. can be called to obtain more detail about the failure.
+ /// See this example for more information.
+ /// A valid Authenticode signature does not establish trust. For example, Microsoft SHA1 signatures will return a positive result, even though their
+ /// root certificates are no longer trusted. This simply verifies that the Authenticode signature is valid.
+ ///
+ internal static unsafe int IsAuthenticodeSigned(string path, bool allowOnlineRevocationChecks = true)
+ {
+ fixed (char* p = Path.GetFullPath(path))
+ {
+ WINTRUST_FILE_INFO fileInfo = new()
+ {
+ pcwszFilePath = p,
+ cbStruct = (uint)sizeof(WINTRUST_FILE_INFO),
+ };
+
+ Guid policyGuid = WINTRUST_ACTION_GENERIC_VERIFY_V2;
+
+ WINTRUST_DATA trustData = new()
+ {
+ cbStruct = (uint)sizeof(WINTRUST_DATA),
+ dwUIChoice = WINTRUST_DATA_UICHOICE.WTD_UI_NONE,
+ fdwRevocationChecks = WINTRUST_DATA_REVOCATION_CHECKS.WTD_REVOKE_WHOLECHAIN,
+ dwUnionChoice = WINTRUST_DATA_UNION_CHOICE.WTD_CHOICE_FILE,
+ dwStateAction = WINTRUST_DATA_STATE_ACTION.WTD_STATEACTION_VERIFY,
+ dwProvFlags = WINTRUST_DATA_PROVIDER_FLAGS.WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT,
+ };
+
+ if (!allowOnlineRevocationChecks)
+ {
+ trustData.dwProvFlags |= WINTRUST_DATA_PROVIDER_FLAGS.WTD_CACHE_ONLY_URL_RETRIEVAL;
+ }
+
+ trustData.Anonymous.pFile = &fileInfo;
+
+ int lstatus = WinVerifyTrust((HWND)IntPtr.Zero, ref policyGuid, &trustData);
+
+ // Release the hWVTStateData handle, but return the original status.
+ trustData.dwStateAction = WINTRUST_DATA_STATE_ACTION.WTD_STATEACTION_CLOSE;
+ _ = WinVerifyTrust((HWND)IntPtr.Zero, ref policyGuid, &trustData);
+
+ return lstatus;
+ }
+ }
+ }
+}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/StateAction.cs b/src/Cli/dotnet/Installer/Windows/Security/StateAction.cs
deleted file mode 100644
index 15a8b51e208b..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/StateAction.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Describes the action to be taken in relation to the state data.
- ///
- public enum StateAction : uint
- {
- ///
- /// Ignore the hWVTStateData member.
- ///
- WTD_STATEACTION_IGNORE = 0,
-
- ///
- /// Verify the trust of the object (typically a file) that is specified by the dwUnionChoice member. The hWVTStateData member will receive a handle to the state data. This handle must be freed by specifying the WTD_STATEACTION_CLOSE action in a subsequent call.
- ///
- WTD_STATEACTION_VERIFY = 1,
-
- ///
- /// Free the hWVTStateData member previously allocated with the WTD_STATEACTION_VERIFY action. This action must be specified for every use of the WTD_STATEACTION_VERIFY action.
- ///
- WTD_STATEACTION_CLOSE = 2,
-
- ///
- /// Write the catalog data to a WINTRUST_DATA structure and then cache that structure. This action only applies when the dwUnionChoice member contains WTD_CHOICE_CATALOG.
- ///
- WTD_STATEACTION_AUTO_CACHE = 3,
-
- ///
- /// Flush any cached catalog data. This action only applies when the dwUnionChoice member contains WTD_CHOICE_CATALOG.
- ///
- WTD_STATEACTION_AUTO_CACHE_FLUSH = 4
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/UIChoice.cs b/src/Cli/dotnet/Installer/Windows/Security/UIChoice.cs
deleted file mode 100644
index 24a44db65909..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/UIChoice.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Describes the type of user interface to display.
- ///
- public enum UIChoice : uint
- {
- ///
- /// Display all UI.
- ///
- WTD_UI_ALL = 1,
-
- ///
- /// Display no UI.
- ///
- WTD_UI_NONE = 2,
-
- ///
- /// Do not display any negative UI.
- ///
- WTD_UI_NOBAD = 3,
-
- ///
- /// Do not display any positive UI.
- ///
- WTD_UI_NOGOOD = 4
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/UnionChoice.cs b/src/Cli/dotnet/Installer/Windows/Security/UnionChoice.cs
deleted file mode 100644
index 02569f3dd2f9..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/UnionChoice.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Specifies the union member to use when verifying trust.
- ///
- public enum UnionChoice : uint
- {
- ///
- /// Use the file pointed to by pFile.
- ///
- WTD_CHOICE_FILE = 1,
-
- ///
- /// Use the catalog pointed to by pCatalog.
- ///
- WTD_CHOICE_CATALOG = 2,
-
- ///
- /// Use the BLOB pointed to by pBlob.
- ///
- WTD_CHOICE_BLOB,
-
- ///
- /// Use the WINTRUST_SGNR_INFO structure pointed to by pSgnr.
- ///
- WTD_CHOICE_SIGNER,
-
- ///
- /// Use the certificate pointed to by pCert.
- ///
- WTD_CHOICE_CERT
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/WinTrustData.cs b/src/Cli/dotnet/Installer/Windows/Security/WinTrustData.cs
deleted file mode 100644
index 218de3e193e5..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/WinTrustData.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// Structure used to pass information to trust providers when calling WinVerifyTrust.
- /// See this for further details.
- ///
- [StructLayout(LayoutKind.Sequential)]
- public struct WinTrustData
- {
- ///
- /// The size, in bytes, of the structure.
- ///
- public uint cbStruct;
-
- ///
- /// A pointer to a buffer used to pass policy-specific data to a policy provider. This field may be .
- ///
- public IntPtr pPolicyCallbackData;
-
- ///
- /// Pointer to a buffer used to pass subject interface package data to a SIP provider. This field may be .
- ///
- public IntPtr pSIPClientData;
-
- ///
- /// Specifies the type of interface to use.
- ///
- public UIChoice dwUIChoice;
-
- ///
- /// Specifies certificate revocation check options that the selected policy provider can perform.
- ///
- public RevocationChecks fdwRevocationChecks;
-
- ///
- /// Specifies the union member to be used. This determines the type of object for which trust will be verified.
- /// acts as the union member.
- ///
- public UnionChoice dwUnionChoice;
-
- ///
- /// Pointer to the object for which trust will be verified. This is a union member. See .
- ///
- public IntPtr pWinTrustInfo;
-
- ///
- /// Specifies the action to be taken.
- ///
- public StateAction dwStateAction;
-
- ///
- /// A handle to the state data. The contents depends on the value of .
- ///
- public IntPtr hWVTStateData;
-
- ///
- /// Reserved. This field should be .
- ///
- public IntPtr pwszURLReference;
-
- ///
- /// DWORD value that specifies trust provider settings.
- ///
- public ProviderSettings dwProvFlags;
-
- ///
- /// A DWORD value that specifies the user interface context for the WinVerifyTrust function.
- /// This causes the text in the Authenticode dialog box to match the action taken on the file.
- ///
- public uint dwUIContext;
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/Security/WinTrustFileInfo.cs b/src/Cli/dotnet/Installer/Windows/Security/WinTrustFileInfo.cs
deleted file mode 100644
index 431424ba4a24..000000000000
--- a/src/Cli/dotnet/Installer/Windows/Security/WinTrustFileInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.DotNet.Installer.Windows.Security
-{
- ///
- /// The structure to use when calling WinVerifyTrust to verify an individual file. See
- /// this for
- /// furhter details.
- ///
- [StructLayout(LayoutKind.Sequential)]
- public struct WinTrustFileInfo
- {
- ///
- /// The size, in bytes, of the structure.
- ///
- public uint cbStruct;
-
- ///
- /// The full path and file name of the file to verify. This field cannot be .
- ///
- [MarshalAs(UnmanagedType.LPTStr)]
- public string pcwszFilePath;
-
- ///
- /// Optional handle to an open file to be verified. The handle must have read permissions.
- ///
- public IntPtr hFile;
-
- ///
- /// Optional pointer to a GUID structure that specifies the subject type.
- ///
- public IntPtr pgKnownSubject;
- }
-}
diff --git a/src/Cli/dotnet/Installer/Windows/SecurityUtils.cs b/src/Cli/dotnet/Installer/Windows/SecurityUtils.cs
new file mode 100644
index 000000000000..38ca0e78499d
--- /dev/null
+++ b/src/Cli/dotnet/Installer/Windows/SecurityUtils.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.IO.Pipes;
+using System.Runtime.Versioning;
+using System.Security.AccessControl;
+using System.Security.Principal;
+using Microsoft.DotNet.Cli.Utils;
+
+namespace Microsoft.DotNet.Installer.Windows
+{
+ ///
+ /// Defines some generic security related helper methods.
+ ///
+ [SupportedOSPlatform("windows")]
+ internal static class SecurityUtils
+ {
+ ///
+ /// Default inheritance to apply to directory ACLs.
+ ///
+ private static readonly InheritanceFlags s_DefaultInheritance = InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit;
+
+ ///
+ /// SID that matches built-in administrators.
+ ///
+ private static readonly SecurityIdentifier s_AdministratorsSid = new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null);
+
+ ///
+ /// SID that matches everyone.
+ ///
+ private static readonly SecurityIdentifier s_EveryoneSid = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
+
+ ///
+ /// Local SYSTEM SID.
+ ///
+ private static readonly SecurityIdentifier s_LocalSystemSid = new SecurityIdentifier(WellKnownSidType.LocalSystemSid, null);
+
+ ///
+ /// SID matching built-in user accounts.
+ ///
+ private static readonly SecurityIdentifier s_UsersSid = new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null);
+
+ ///
+ /// ACL rule associated with the Administrators SID.
+ ///
+ private static readonly FileSystemAccessRule s_AdministratorRule = new FileSystemAccessRule(s_AdministratorsSid, FileSystemRights.FullControl,
+ s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
+
+ ///
+ /// ACL rule associated with the Everyone SID.
+ ///
+ private static readonly FileSystemAccessRule s_EveryoneRule = new FileSystemAccessRule(s_EveryoneSid, FileSystemRights.ReadAndExecute,
+ s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
+
+ ///
+ /// ACL rule associated with the Local SYSTEM SID.
+ ///
+ private static readonly FileSystemAccessRule s_LocalSystemRule = new FileSystemAccessRule(s_LocalSystemSid, FileSystemRights.FullControl,
+ s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
+
+ ///
+ /// ACL rule associated with the built-in users SID.
+ ///
+ private static readonly FileSystemAccessRule s_UsersRule = new FileSystemAccessRule(s_UsersSid, FileSystemRights.ReadAndExecute,
+ s_DefaultInheritance, PropagationFlags.None, AccessControlType.Allow);
+
+ ///
+ /// Creates the specified directory and secures it by configuring access rules (ACLs) that allow sub-directories
+ /// and files to inherit access control entries.
+ ///
+ /// The path of the directory to create.
+ public static void CreateSecureDirectory(string path)
+ {
+ if (!Directory.Exists(path))
+ {
+ DirectorySecurity ds = new();
+ SecurityUtils.SetDirectoryAccessRules(ds);
+ ds.CreateDirectory(path);
+ }
+ }
+
+ ///
+ /// Moves a file from one location to another if the destination file does not already exist and
+ /// configure its permissions.
+ ///
+ /// The source file to move.
+ /// The destination where the source file will be moved.
+ /// The underlying setup log to use.
+ public static void MoveAndSecureFile(string sourceFile, string destinationFile, ISetupLogger log = null)
+ {
+ if (!File.Exists(destinationFile))
+ {
+ FileAccessRetrier.RetryOnMoveAccessFailure(() =>
+ {
+ // Moving the file preserves the owner SID and fails to inherit the WD ACE.
+ File.Copy(sourceFile, destinationFile, overwrite: true);
+ File.Delete(sourceFile);
+ });
+ log?.LogMessage($"Moved '{sourceFile}' to '{destinationFile}'");
+
+ SecureFile(destinationFile);
+ }
+ }
+
+ ///
+ /// Secures a file by setting the owner and group to built-in administrators (BA). All other ACE values are inherited from
+ /// the parent directory.
+ ///
+ /// The path of the file to secure.
+ public static void SecureFile(string path)
+ {
+ FileInfo fi = new(path);
+ FileSecurity fs = new();
+
+ // See https://github.com/dotnet/sdk/issues/28450. If the directory's descriptor
+ // is correctly configured, we should end up with an inherited ACE for Everyone: (A;ID;0x1200a9;;;WD)
+ fs.SetOwner(s_AdministratorsSid);
+ fs.SetGroup(s_AdministratorsSid);
+ fi.SetAccessControl(fs);
+ }
+
+ ///
+ /// Apply a standard set of access rules to the directory security descriptor. The owner and group will
+ /// be set to built-in Administrators. Full access is granted to built-in administators and SYSTEM with
+ /// read, execute, synchronize permssions for built-in users and Everyone.
+ ///
+ /// The security descriptor to update.
+ private static void SetDirectoryAccessRules(DirectorySecurity ds)
+ {
+ ds.SetOwner(s_AdministratorsSid);
+ ds.SetGroup(s_AdministratorsSid);
+ ds.SetAccessRule(s_AdministratorRule);
+ ds.SetAccessRule(s_LocalSystemRule);
+ ds.SetAccessRule(s_UsersRule);
+ ds.SetAccessRule(s_EveryoneRule);
+ }
+ }
+}
diff --git a/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs b/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs
index 66cbaa435215..08fccd340831 100644
--- a/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs
+++ b/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs
@@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Installer.Windows
/// queue messages.
///
[SupportedOSPlatform("windows")]
- internal class TimestampedFileLogger : SetupLoggerBase, IDisposable, ISetupLogger
+ internal class TimestampedFileLogger : SetupLoggerBase, IDisposable, ISynchronizingLogger
{
///
/// Thread safe queue use to store incoming log request messages.
@@ -81,10 +81,6 @@ public TimestampedFileLogger(string path, int flushThreshold, params string[] lo
LogMessage($"=== Logging started ===");
}
- ///
- /// Starts a new thread to listen for log requests messages from external processes.
- ///
- /// The name of the pipe.
public void AddNamedPipe(string pipeName)
{
Thread logRequestThread = new(ProcessLogRequests) { IsBackground = true };
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.cs.xlf
index 100b70e341ea..c00aae5e30af 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.cs.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- Podpis AuthentiCode pro {0} nepatří důvěryhodné organizaci.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.de.xlf
index a358d63a5369..108efca9275b 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.de.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- Die AuthentiCode-Signatur für {0} gehört nicht zu einer vertrauenswürdigen Organisation.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.es.xlf
index 49c6a6af789f..196614f4c45f 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.es.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- La firma AuthentiCode para {0} no pertenece a una organización de confianza.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.fr.xlf
index 52c9042f7e63..d9453fce2c36 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.fr.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- La signature AuthentiCode pour {0} n’appartient pas à une organisation approuvée.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.it.xlf
index 6caedf570426..5cdcdd9e9707 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.it.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- La firma AuthentiCode per {0} non appartiene a un'organizzazione attendibile.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ja.xlf
index 3d2140ab9b43..29bca91ae045 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ja.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- {0} の AuthentiCode 署名は、信頼されている組織に属していません。
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ko.xlf
index 5504670c80dc..eff70df8d5b1 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ko.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- {0}에 대한 AuthentiCode 서명이 신뢰할 수 있는 조직에 속해 있지 않습니다.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pl.xlf
index a89b7b61b7f9..d47b4882d5bb 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pl.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- Podpis AuthentiCode dla {0} nie należy do zaufanej organizacji.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pt-BR.xlf
index b9c9f365b741..457c0255912b 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.pt-BR.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- A assinatura AuthentiCode para {0} não pertence a uma organização confiável.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ru.xlf
index 4e7c7f1c3591..d952a0d46d26 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.ru.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- Подпись AuthentiCode для {0} не принадлежит доверенной организации.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.tr.xlf
index e61cd713ac68..341d602fc487 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.tr.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- {0} için AuthentiCode imzası güvenilir bir kuruluşa ait değil.
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hans.xlf
index ba5dcba91dd5..3323173002c8 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hans.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- {0} 的 AuthentiCode 签名不属于受信任的组织。
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hant.xlf
index e5793719fa5d..28ffbf5688f0 100644
--- a/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/Installer/Windows/xlf/LocalizableStrings.zh-Hant.xlf
@@ -2,9 +2,9 @@
-
- AuthentiCode signature for {0} does not belong to a trusted organization.
- {0} 的 AuthentiCode 簽章不屬於信任的組織。
+
+ The requested certificate chain policy could not be checked: {0}
+ The requested certificate chain policy could not be checked: {0}
diff --git a/src/Cli/dotnet/NativeMethods.txt b/src/Cli/dotnet/NativeMethods.txt
new file mode 100644
index 000000000000..30816e485917
--- /dev/null
+++ b/src/Cli/dotnet/NativeMethods.txt
@@ -0,0 +1,15 @@
+// Methods
+WinVerifyTrust
+CertFreeCertificateChain
+CertGetCertificateChain
+CertVerifyCertificateChainPolicy
+
+// Structs, constants, enums
+WINTRUST_DATA
+WINTRUST_ACTION*
+WTD*
+CERT_STORE*
+CERT_CHAIN_POLICY*
+MICROSOFT_ROOT_CERT*
+TRUST_E*
+CERT_E*
\ No newline at end of file
diff --git a/src/Cli/dotnet/NugetPackageDownloader/LocalizableStrings.resx b/src/Cli/dotnet/NugetPackageDownloader/LocalizableStrings.resx
index bfb61a0a4c16..cb0ad6727fe8 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/LocalizableStrings.resx
+++ b/src/Cli/dotnet/NugetPackageDownloader/LocalizableStrings.resx
@@ -144,4 +144,19 @@
Package Source Mapping is enabled, but no source mapped under the specified package ID: {0}. See the documentation for Package Source Mapping at https://aka.ms/nuget-package-source-mapping for more details.
+
+ A version of {0} of package {1}
+
+
+ Version {0} of package {1}
+
+
+ A version between {0} and {1} of package {2}
+
+
+ A version higher than {0} of package {1}
+
+
+ A version less than {0} of package {1}
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
index 94d2aeeae9bb..3734a57190f1 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
+++ b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
@@ -1,11 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Text.RegularExpressions;
using System.Threading;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ToolPackage;
using Microsoft.DotNet.Tools;
using Microsoft.Extensions.EnvironmentAbstractions;
+using Microsoft.TemplateEngine.Abstractions;
using NuGet.Common;
using NuGet.Configuration;
using NuGet.Credentials;
@@ -162,7 +164,7 @@ public async Task GetPackageUrl(PackageId packageId,
bool includePreview = false)
{
(var source, var resolvedPackageVersion) = await GetPackageSourceAndVersion(packageId, packageVersion, packageSourceLocation, includePreview).ConfigureAwait(false);
-
+
SourceRepository repository = GetSourceRepository(source);
if (repository.PackageSource.IsLocal)
{
@@ -450,15 +452,45 @@ await Task.WhenAll(
throw new NuGetPackageNotFoundException(
string.Format(
LocalizableStrings.IsNotFoundInNuGetFeeds,
- $"{packageIdentifier}::{versionRange}",
+ GenerateVersionRangeErrorDescription(packageIdentifier, versionRange),
string.Join(", ", packageSources.Select(source => source.Source))));
}
+ }
+ private string GenerateVersionRangeErrorDescription(string packageIdentifier, VersionRange versionRange)
+ {
+ if (!string.IsNullOrEmpty(versionRange.OriginalString) && versionRange.OriginalString == "*")
+ {
+ return $"{packageIdentifier}";
+ }
+ else if (versionRange.HasLowerAndUpperBounds && versionRange.MinVersion == versionRange.MaxVersion)
+ {
+ return string.Format(LocalizableStrings.PackageVersionDescriptionForExactVersionMatch,
+ versionRange.MinVersion, packageIdentifier);
+ }
+ else if (versionRange.HasLowerAndUpperBounds)
+ {
+ return string.Format(LocalizableStrings.PackageVersionDescriptionForVersionWithLowerAndUpperBounds,
+ versionRange.MinVersion, versionRange.MaxVersion, packageIdentifier);
+ }
+ else if (versionRange.HasLowerBound)
+ {
+ return string.Format(LocalizableStrings.PackageVersionDescriptionForVersionWithLowerBound,
+ versionRange.MinVersion, packageIdentifier);
+ }
+ else if (versionRange.HasUpperBound)
+ {
+ return string.Format(LocalizableStrings.PackageVersionDescriptionForVersionWithUpperBound,
+ versionRange.MaxVersion, packageIdentifier);
+ }
+
+ // Default message if the format doesn't match any of the expected cases
+ return string.Format(LocalizableStrings.PackageVersionDescriptionDefault, versionRange, packageIdentifier);
}
- private async Task<(PackageSource, IPackageSearchMetadata)> GetLatestVersionInternalAsync(
- string packageIdentifier, IEnumerable packageSources, bool includePreview,
- CancellationToken cancellationToken)
+ private async Task<(PackageSource, IPackageSearchMetadata)> GetLatestVersionInternalAsync(
+ string packageIdentifier, IEnumerable packageSources, bool includePreview,
+ CancellationToken cancellationToken)
{
if (packageSources == null)
{
@@ -527,7 +559,7 @@ public async Task GetBestPackageVersionAsync(PackageId packageId,
VersionRange versionRange,
PackageSourceLocation packageSourceLocation = null)
{
- if(versionRange.MinVersion != null && versionRange.MaxVersion != null && versionRange.MinVersion == versionRange.MaxVersion)
+ if (versionRange.MinVersion != null && versionRange.MaxVersion != null && versionRange.MinVersion == versionRange.MaxVersion)
{
return versionRange.MinVersion;
}
@@ -624,7 +656,8 @@ bool TryGetPackageMetadata(
}
throw new NuGetPackageNotFoundException(string.Format(LocalizableStrings.IsNotFoundInNuGetFeeds,
- $"{packageIdentifier}::{packageVersion}", string.Join(";", sources.Select(s => s.Source))));
+ GenerateVersionRangeErrorDescription(packageIdentifier, new VersionRange(minVersion: packageVersion, maxVersion: packageVersion, includeMaxVersion: true)),
+ string.Join(";", sources.Select(s => s.Source))));
}
private async Task<(PackageSource source, IEnumerable foundPackages)>
diff --git a/src/Cli/dotnet/NugetPackageDownloader/ToolPackageException.cs b/src/Cli/dotnet/NugetPackageDownloader/ToolPackageException.cs
index b2475bdeefcd..8e087629e471 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/ToolPackageException.cs
+++ b/src/Cli/dotnet/NugetPackageDownloader/ToolPackageException.cs
@@ -1,9 +1,11 @@
// 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.Utils;
+
namespace Microsoft.DotNet.Cli.NuGetPackageDownloader
{
- internal class NuGetPackageInstallerException : Exception
+ internal class NuGetPackageInstallerException : GracefulException
{
public NuGetPackageInstallerException()
{
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf
index 911fd33da0d3..6668ef85e22e 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf
@@ -42,6 +42,31 @@
Přeskakuje se ověření podpisu balíčku NuGet.
+
+ A version of {0} of package {1}
+ Verze {0} balíčku {1}
+
+
+
+ Version {0} of package {1}
+ Verze {0} balíčku {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ Verze mezi {0} a {1} balíčku {2}
+
+
+
+ A version higher than {0} of package {1}
+ Verze vyšší než {0} balíčku {1}
+
+
+
+ A version less than {0} of package {1}
+ Verze menší než {0} balíčku {1}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Přeskočit ověřování podepisování balíčku NuGet. Ověřování podepisování balíčku NuGet není k dispozici na Linuxu nebo v macOS https://aka.ms/workloadskippackagevalidation.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf
index 59eb4441ee9b..5dadf0d934f3 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf
@@ -42,6 +42,31 @@
Die Überprüfung der NuGet-Paketsignatur wird übersprungen.
+
+ A version of {0} of package {1}
+ Eine Version von "{0}" des Pakets "{1}"
+
+
+
+ Version {0} of package {1}
+ Version "{0}" des Pakets "{1}"
+
+
+
+ A version between {0} and {1} of package {2}
+ Eine Version zwischen "{0}" und "{1}" des Pakets "{2}"
+
+
+
+ A version higher than {0} of package {1}
+ Eine Version, die höher als "{0}" des Pakets "{1}" ist.
+
+
+
+ A version less than {0} of package {1}
+ Eine Version, die niedriger als "{0}" des Pakets "{1}" ist.
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Überprüfung der NuGet-Paketsignierung überspringen. Die Überprüfung der NuGet-Signierung ist auf Linux- oder macOS nicht verfügbar https://aka.ms/workloadskippackagevalidation.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf
index 92ffef1b484e..cca9fc12e15c 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf
@@ -42,6 +42,31 @@
Omitiendo la comprobación de la firma del paquete NuGet.
+
+ A version of {0} of package {1}
+ Versión de {0} del paquete {1}
+
+
+
+ Version {0} of package {1}
+ Versión {0} del paquete {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ Una versión entre {0} y {1} del paquete {2}
+
+
+
+ A version higher than {0} of package {1}
+ Una versión superior a {0} del paquete {1}
+
+
+
+ A version less than {0} of package {1}
+ Versión anterior a la {0} del paquete {1}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Omitir la validación de firma del paquete NuGet. La validación de firma de NuGet no está disponible en Linux o macOS https://aka.ms/workloadskippackagevalidation.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf
index 3dd83630d84a..2486bfba02c4 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf
@@ -42,6 +42,31 @@
La vérification de la signature du package NuGet est ignorée.
+
+ A version of {0} of package {1}
+ Une version de {0} du package {1}
+
+
+
+ Version {0} of package {1}
+ Une version {0} du package {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ Une version comprise entre {0} et {1} du package {2}
+
+
+
+ A version higher than {0} of package {1}
+ Une version supérieure à {0} du package {1}
+
+
+
+ A version less than {0} of package {1}
+ Une version inférieure à {0} du package {1}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Ignorer la validation de signature de package NuGet. La validation de signature NuGet n’est pas disponible sur Linux ou macOS https://aka.ms/workloadskippackagevalidation.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf
index e62cebfc5365..f8cb87b2bd63 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf
@@ -42,6 +42,31 @@
La verifica della firma del pacchetto NuGet verrà ignorata.
+
+ A version of {0} of package {1}
+ Versione di {0} del pacchetto {1}
+
+
+
+ Version {0} of package {1}
+ Versione {0} del pacchetto {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ Versione compresa tra {0} e {1} del pacchetto {2}
+
+
+
+ A version higher than {0} of package {1}
+ Versione superiore a {0} del pacchetto {1}
+
+
+
+ A version less than {0} of package {1}
+ Versione inferiore a {0} del pacchetto {1}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Ignorare la convalida della firma del pacchetto NuGet. La convalida della firma NuGet non è disponibile in Linux o macOS https://aka.ms/workloadskippackagevalidation.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf
index 2f19c3d49013..9c05afb0a3b4 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf
@@ -42,6 +42,31 @@
NuGet パッケージ署名の認証をスキップしています。
+
+ A version of {0} of package {1}
+ パッケージ {1} の {0} のバージョン
+
+
+
+ Version {0} of package {1}
+ パッケージ {1} のバージョン {0}
+
+
+
+ A version between {0} and {1} of package {2}
+ パッケージ {2} の {0} と {1} の間のバージョン
+
+
+
+ A version higher than {0} of package {1}
+ パッケージ {1} の {0} より上位のバージョン
+
+
+
+ A version less than {0} of package {1}
+ パッケージ {1} の {0} 未満のバージョン
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .NuGet パッケージ署名の検証をスキップします。NuGet 署名の検証は、Linux または macOS https://aka.ms/workloadskippackagevalidation では使用できません。
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf
index 7510fae557a0..4001ca7986f8 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf
@@ -42,6 +42,31 @@
NuGet 패키지 서명 확인을 건너뛰는 중입니다.
+
+ A version of {0} of package {1}
+ {0}의 버전의 패키지 {1}
+
+
+
+ Version {0} of package {1}
+ 버전 {0}의 패키지 {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ {0} 및 {1} 사이의 버전의 패키지 {2}
+
+
+
+ A version higher than {0} of package {1}
+ {0}보다 높은 버전의 패키지 {1}
+
+
+
+ A version less than {0} of package {1}
+ {0}보다 낮은 버전의 패키지 {1}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .NuGet 패키지 서명 유효성 검사를 건너뜁니다. NuGet 서명 유효성 검사는 Linux 또는 macOS https://aka.ms/workloadskippackagevalidation에서 사용할 수 없습니다.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf
index 6dc11d30cf84..c37e1a4a00e0 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf
@@ -42,6 +42,31 @@
Pomijanie weryfikacji podpisu pakietu NuGet.
+
+ A version of {0} of package {1}
+ Wersja {0} pakietu {1}
+
+
+
+ Version {0} of package {1}
+ Wersja {0} pakietu {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ Wersja między {0} i {1} pakietu {2}
+
+
+
+ A version higher than {0} of package {1}
+ Wersja nowsza niż {0} pakietu {1}
+
+
+
+ A version less than {0} of package {1}
+ Wersja mniejsza niż {0} pakietu {1}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Pomiń weryfikację podpisywania pakietu NuGet. Sprawdzanie podpisywania NuGet nie jest dostępne w systemie Linux ani MacOS https://aka.ms/workloadskippackagevalidation .
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf
index 4cd6fd064461..1e7289a6ecb5 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf
@@ -42,6 +42,31 @@
Ignorando a verificação de assinatura do pacote NuGet.
+
+ A version of {0} of package {1}
+ Uma versão do {0} do pacote {1}
+
+
+
+ Version {0} of package {1}
+ Versão {0} do pacote {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ Uma versão entre {0} e {1} do pacote {2}
+
+
+
+ A version higher than {0} of package {1}
+ Uma versão superior a {0} do pacote {1}
+
+
+
+ A version less than {0} of package {1}
+ Uma versão anterior a {0} do pacote {1}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Ignorar a validação da assinatura do pacote NuGet. A validação da assinatura do NuGet não está disponível no Linux ou macOS https://aka.ms/workloadskippackagevalidation .
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf
index 7a8e0b3d4166..b94dffd62b7a 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf
@@ -42,6 +42,31 @@
Пропуск проверки подписи пакета NuGet.
+
+ A version of {0} of package {1}
+ Версия {0} пакета {1}
+
+
+
+ Version {0} of package {1}
+ Версия {0} пакета {1}
+
+
+
+ A version between {0} and {1} of package {2}
+ Версия от {0} до {1} пакета {2}
+
+
+
+ A version higher than {0} of package {1}
+ Версия пакета {1} выше {0}
+
+
+
+ A version less than {0} of package {1}
+ Версия пакета {1} ниже {0}
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .Пропустить проверку подписи пакета NuGet. Проверка подписи NuGet недоступна в Linux или macOS https://aka.ms/workloadskippackagevalidation.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf
index 449b304962f6..fd6d4ff5e9a4 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf
@@ -42,6 +42,31 @@
NuGet paket imzası doğrulaması atlanıyor.
+
+ A version of {0} of package {1}
+ {1} paketinin bir {0} sürümü
+
+
+
+ Version {0} of package {1}
+ {1} paketinin {0} sürümü
+
+
+
+ A version between {0} and {1} of package {2}
+ {2} paketinin {0} ve {1} arasındaki bir sürümü
+
+
+
+ A version higher than {0} of package {1}
+ {1} paketinin {0} sürümünden yüksek bir sürümü
+
+
+
+ A version less than {0} of package {1}
+ {1} paketinin {0} sürümünden düşük bir sürümü
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .NuGet paketi imza doğrulamasını atlayın. NuGet imza doğrulaması Linux veya macOS üzerinde kullanılamıyor. Daha fazla bilgi için bkz. https://aka.ms/workloadskippackagevalidation.
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf
index d8fa4715311c..2df9a0fe0842 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf
@@ -42,6 +42,31 @@
正在跳过 NuGet 包签名验证。
+
+ A version of {0} of package {1}
+ 包 {1} 的版本 {0}
+
+
+
+ Version {0} of package {1}
+ 包 {1} 的版本 {0}
+
+
+
+ A version between {0} and {1} of package {2}
+ 包 {2} 的 {0} 和 {1} 之间的版本
+
+
+
+ A version higher than {0} of package {1}
+ 包 {1} 的高于 {0} 的版本
+
+
+
+ A version less than {0} of package {1}
+ 包 {1} 的低于 {0} 的版本
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .跳过 NuGet 包签名验证。Linux 或 macOS 上不提供 NuGet 签名验证。https://aka.ms/workloadskippackagevalidation。
diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf
index ddafb653bcaf..ff999afa8383 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf
@@ -42,6 +42,31 @@
正在略過 NuGet 套件簽章驗證。
+
+ A version of {0} of package {1}
+ 封裝 {1} 的版本 {0}
+
+
+
+ Version {0} of package {1}
+ 封裝 {1} 的版本 {0}
+
+
+
+ A version between {0} and {1} of package {2}
+ 封裝 {2} 的 {0} 與 {1} 之間的版本
+
+
+
+ A version higher than {0} of package {1}
+ 封裝 {1} 高於 {0} 的版本
+
+
+
+ A version less than {0} of package {1}
+ 封裝 {1} 小於 {0} 的版本
+
+ Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .略過 NuGet 套件簽署驗證。NuGet 套件簽署驗證在 Linux 或 macOS 上無法使用 https://aka.ms/workloadskippackagevalidation。
diff --git a/src/Cli/dotnet/ParseResultExtensions.cs b/src/Cli/dotnet/ParseResultExtensions.cs
index 34194f7ad3d3..0aa61914a318 100644
--- a/src/Cli/dotnet/ParseResultExtensions.cs
+++ b/src/Cli/dotnet/ParseResultExtensions.cs
@@ -4,9 +4,11 @@
using System.CommandLine;
using System.CommandLine.Parsing;
using System.Diagnostics;
+using System.Reflection;
using System.Text.RegularExpressions;
using Microsoft.DotNet.Cli.Utils;
using static Microsoft.DotNet.Cli.Parser;
+using CommandResult = System.CommandLine.Parsing.CommandResult;
namespace Microsoft.DotNet.Cli
{
@@ -123,38 +125,47 @@ public static string[] GetSubArguments(this string[] args)
var subargs = args.ToList();
// Don't remove any arguments that are being passed to the app in dotnet run
- var runArgs = subargs.Contains("--") ? subargs.GetRange(subargs.IndexOf("--"), subargs.Count() - subargs.IndexOf("--")) : new List();
- subargs = subargs.Contains("--") ? subargs.GetRange(0, subargs.IndexOf("--")) : subargs;
+ var dashDashIndex = subargs.IndexOf("--");
- subargs.RemoveAll(arg => DiagOption.Name.Equals(arg) || DiagOption.Aliases.Contains(arg));
- if (subargs[0].Equals("dotnet"))
- {
- subargs.RemoveAt(0);
- }
- subargs.RemoveAt(0); // remove top level command (ex build or publish)
- return subargs.Concat(runArgs).ToArray();
+ var runArgs = dashDashIndex > -1 ? subargs.GetRange(dashDashIndex, subargs.Count() - dashDashIndex) : new List(0);
+ subargs = dashDashIndex > -1 ? subargs.GetRange(0, dashDashIndex) : subargs;
+
+ return subargs
+ .SkipWhile(arg => DiagOption.Name.Equals(arg) || DiagOption.Aliases.Contains(arg) || arg.Equals("dotnet"))
+ .Skip(1) // remove top level command (ex build or publish)
+ .Concat(runArgs)
+ .ToArray();
}
- private static string GetSymbolResultValue(ParseResult parseResult, SymbolResult symbolResult)
+ public static bool DiagOptionPrecedesSubcommand(this string[] args, string subCommand)
{
- if (symbolResult.Token() == default)
- {
- return parseResult.GetResult(DotnetSubCommand)?.GetValueOrDefault();
- }
- else if (symbolResult.Token().Type.Equals(CliTokenType.Command))
- {
- return ((System.CommandLine.Parsing.CommandResult)symbolResult).Command.Name;
- }
- else if (symbolResult.Token().Type.Equals(CliTokenType.Argument))
+ if (string.IsNullOrEmpty(subCommand))
{
- return symbolResult.Token().Value;
+ return true;
}
- else
+
+ for (var i = 0; i < args.Length; i++)
{
- return string.Empty;
+ if (args[i].Equals(subCommand))
+ {
+ return false;
+ }
+ else if (DiagOption.Name.Equals(args) || DiagOption.Aliases.Contains(args[i]))
+ {
+ return true;
+ }
}
+
+ return false;
}
+ private static string GetSymbolResultValue(ParseResult parseResult, SymbolResult symbolResult) => symbolResult switch
+ {
+ CommandResult commandResult => commandResult.Command.Name,
+ ArgumentResult argResult => argResult.Tokens.FirstOrDefault()?.Value ?? string.Empty,
+ _ => parseResult.GetResult(DotnetSubCommand)?.GetValueOrDefault()
+ };
+
public static bool BothArchAndOsOptionsSpecified(this ParseResult parseResult) =>
(parseResult.HasOption(CommonOptions.ArchitectureOption) ||
parseResult.HasOption(CommonOptions.LongFormArchitectureOption)) &&
@@ -207,10 +218,19 @@ public static IEnumerable GetRunCommandPropertyValues(this ParseResult p
private static IEnumerable GetRunPropertyOptions(ParseResult parseResult, bool shorthand)
{
var optionString = shorthand ? "-p" : "--property";
- var options = parseResult.CommandResult.Children.Where(c => c.Token().Type.Equals(CliTokenType.Option));
- var propertyOptions = options.Where(o => o.Token().Value.Equals(optionString));
+ var propertyOptions = parseResult.CommandResult.Children.Where(c => GetOptionTokenOrDefault(c)?.Value.Equals(optionString) ?? false);
var propertyValues = propertyOptions.SelectMany(o => o.Tokens.Select(t => t.Value)).ToArray();
return propertyValues;
+
+ static CliToken GetOptionTokenOrDefault(SymbolResult symbolResult)
+ {
+ if (symbolResult is not OptionResult optionResult)
+ {
+ return null;
+ }
+
+ return optionResult.IdentifierToken ?? new CliToken($"--{optionResult.Option.Name}", CliTokenType.Option, optionResult.Option);
+ }
}
[Conditional("DEBUG")]
diff --git a/src/Cli/dotnet/Parser.cs b/src/Cli/dotnet/Parser.cs
index ad2a369304c2..1502eba12031 100644
--- a/src/Cli/dotnet/Parser.cs
+++ b/src/Cli/dotnet/Parser.cs
@@ -17,7 +17,10 @@ namespace Microsoft.DotNet.Cli
{
public static class Parser
{
- public static readonly CliRootCommand RootCommand = new();
+ public static readonly CliRootCommand RootCommand = new()
+ {
+ Directives = { new DiagramDirective(), new SuggestDirective() }
+ };
internal static Dictionary> HelpDescriptionCustomizations = new();
@@ -38,6 +41,7 @@ public static class Parser
NewCommandParser.GetCommand(),
NuGetCommandParser.GetCommand(),
PackCommandParser.GetCommand(),
+ PackageCommandParser.GetCommand(),
ParseCommandParser.GetCommand(),
PublishCommandParser.GetCommand(),
RemoveCommandParser.GetCommand(),
@@ -162,9 +166,7 @@ public static bool TokenPerLine(string tokenToReplace, out IReadOnlyList
public static CliConfiguration Instance { get; } = new(ConfigureCommandLine(RootCommand))
{
EnableDefaultExceptionHandler = false,
- EnableParseErrorReporting = true,
EnablePosixBundling = false,
- Directives = { new DiagramDirective(), new SuggestDirective() },
ResponseFileTokenReplacer = TokenPerLine
};
diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs
index c3afc0904c52..4506a62aaeed 100644
--- a/src/Cli/dotnet/Program.cs
+++ b/src/Cli/dotnet/Program.cs
@@ -143,9 +143,14 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime, ITelemetry
ToolPathSentinelFileName)));
if (parseResult.GetValue(Parser.DiagOption) && parseResult.IsDotnetBuiltInCommand())
{
- Environment.SetEnvironmentVariable(CommandLoggingContext.Variables.Verbose, bool.TrueString);
- CommandLoggingContext.SetVerbose(true);
- Reporter.Reset();
+ // We found --diagnostic or -d, but we still need to determine whether the option should
+ // be attached to the dotnet command or the subcommand.
+ if (args.DiagOptionPrecedesSubcommand(parseResult.RootSubCommandResult()))
+ {
+ Environment.SetEnvironmentVariable(CommandLoggingContext.Variables.Verbose, bool.TrueString);
+ CommandLoggingContext.SetVerbose(true);
+ Reporter.Reset();
+ }
}
if (parseResult.HasOption(Parser.VersionOption) && parseResult.IsTopLevelDotnetCommand())
{
@@ -238,17 +243,26 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime, ITelemetry
else
{
PerformanceLogEventSource.Log.ExtensibleCommandResolverStart();
- var resolvedCommand = CommandFactoryUsingResolver.Create(
- "dotnet-" + parseResult.GetValue(Parser.DotnetSubCommand),
- args.GetSubArguments(),
- FrameworkConstants.CommonFrameworks.NetStandardApp15);
- PerformanceLogEventSource.Log.ExtensibleCommandResolverStop();
+ try
+ {
+ var resolvedCommand = CommandFactoryUsingResolver.Create(
+ "dotnet-" + parseResult.GetValue(Parser.DotnetSubCommand),
+ args.GetSubArguments(),
+ FrameworkConstants.CommonFrameworks.NetStandardApp15);
+ PerformanceLogEventSource.Log.ExtensibleCommandResolverStop();
- PerformanceLogEventSource.Log.ExtensibleCommandStart();
- var result = resolvedCommand.Execute();
- PerformanceLogEventSource.Log.ExtensibleCommandStop();
+ PerformanceLogEventSource.Log.ExtensibleCommandStart();
+ var result = resolvedCommand.Execute();
+ PerformanceLogEventSource.Log.ExtensibleCommandStop();
- exitCode = result.ExitCode;
+ exitCode = result.ExitCode;
+ }
+ catch (CommandUnknownException e)
+ {
+ Reporter.Error.WriteLine(e.Message.Red());
+ Reporter.Output.WriteLine(e.InstructionMessage);
+ exitCode = 1;
+ }
}
PerformanceLogEventSource.Log.TelemetryClientFlushStart();
diff --git a/src/Cli/dotnet/SlnFileExtensions.cs b/src/Cli/dotnet/SlnFileExtensions.cs
index 3f601caee8c2..0a981b9e2429 100644
--- a/src/Cli/dotnet/SlnFileExtensions.cs
+++ b/src/Cli/dotnet/SlnFileExtensions.cs
@@ -6,6 +6,7 @@
using Microsoft.Build.Execution;
using Microsoft.DotNet.Cli.Sln.Internal;
using Microsoft.DotNet.Cli.Utils;
+using System.Collections.Generic;
namespace Microsoft.DotNet.Tools.Common
{
@@ -258,12 +259,6 @@ private static void AddSolutionFolders(this SlnFile slnFile, SlnProject slnProje
return;
}
- string solutionFoldersWithDuplicateProjects = GetSolutionFolderWithDuplicateProject(slnFile, slnProject, solutionFolders, nestedProjectsSection);
- if (!string.IsNullOrEmpty(solutionFoldersWithDuplicateProjects))
- {
- throw new GracefulException(CommonLocalizableStrings.SolutionFolderAlreadyContainsProject, slnFile.FullPath, slnProject.Name, solutionFoldersWithDuplicateProjects);
- }
-
string parentDirGuid = null;
var solutionFolderHierarchy = string.Empty;
foreach (var dir in solutionFolders)
@@ -275,6 +270,12 @@ private static void AddSolutionFolders(this SlnFile slnFile, SlnProject slnProje
}
else
{
+
+ if(HasDuplicateNameForSameValueOfNestedProjects(nestedProjectsSection, dir, parentDirGuid, slnFile.Projects))
+ {
+ throw new GracefulException(CommonLocalizableStrings.SolutionFolderAlreadyContainsProject, slnFile.FullPath, slnProject.Name, slnFile.Projects.FirstOrDefault(p => p.Id == parentDirGuid).Name);
+ }
+
var solutionFolder = new SlnProject
{
Id = Guid.NewGuid().ToString("B").ToUpper(),
@@ -292,22 +293,29 @@ private static void AddSolutionFolders(this SlnFile slnFile, SlnProject slnProje
parentDirGuid = solutionFolder.Id;
}
}
-
+ if (HasDuplicateNameForSameValueOfNestedProjects(nestedProjectsSection, slnProject.Name, parentDirGuid, slnFile.Projects))
+ {
+ throw new GracefulException(CommonLocalizableStrings.SolutionFolderAlreadyContainsProject, slnFile.FullPath, slnProject.Name, slnFile.Projects.FirstOrDefault(p => p.Id == parentDirGuid).Name);
+ }
nestedProjectsSection.Properties[slnProject.Id] = parentDirGuid;
}
}
- private static string GetSolutionFolderWithDuplicateProject(SlnFile slnFile, SlnProject slnProject, IList solutionFolders, SlnSection nestedProjectsSection)
+ private static bool HasDuplicateNameForSameValueOfNestedProjects(SlnSection nestedProjectsSection, string name, string value, IList projects)
{
- var duplicateProjects = slnFile.Projects.Where(p => string.Equals(p.Name, slnProject.Name, StringComparison.OrdinalIgnoreCase)
- && p.TypeGuid != ProjectTypeGuids.SolutionFolderGuid).ToList();
-
- var existingSolutionFoldersIds = slnFile.GetSolutionFoldersThatContainProjectsInItsHierarchy(nestedProjectsSection.Properties, duplicateProjects);
-
- var existingSolutionFolders = slnFile.Projects.Where(f => existingSolutionFoldersIds.Contains(f.Id)
- && f.TypeGuid == ProjectTypeGuids.SolutionFolderGuid).Select(f => f.Name).ToList();
+ foreach (var property in nestedProjectsSection.Properties)
+ {
+ if (property.Value == value)
+ {
+ var existingProject = projects.FirstOrDefault(p => p.Id == property.Key);
- return existingSolutionFolders.Intersect(solutionFolders).FirstOrDefault();
+ if (existingProject != null && existingProject.Name == name)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
}
private static IDictionary GetSolutionFolderPaths(
@@ -478,21 +486,13 @@ public static void RemoveEmptySolutionFolders(this SlnFile slnFile)
private static HashSet GetSolutionFoldersThatContainProjectsInItsHierarchy(
this SlnFile slnFile,
- SlnPropertySet nestedProjects,
- IEnumerable projectsToSearchFor = null)
+ SlnPropertySet nestedProjects)
{
var solutionFoldersInUse = new HashSet();
IEnumerable nonSolutionFolderProjects;
- if (projectsToSearchFor == null)
- {
- nonSolutionFolderProjects = slnFile.Projects.GetProjectsNotOfType(
- ProjectTypeGuids.SolutionFolderGuid);
- }
- else
- {
- nonSolutionFolderProjects = projectsToSearchFor;
- }
+ nonSolutionFolderProjects = slnFile.Projects.GetProjectsNotOfType(
+ ProjectTypeGuids.SolutionFolderGuid);
foreach (var nonSolutionFolderProject in nonSolutionFolderProjects)
{
diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageException.cs b/src/Cli/dotnet/ToolPackage/ToolPackageException.cs
index 5617dbc72f20..0614f662482e 100644
--- a/src/Cli/dotnet/ToolPackage/ToolPackageException.cs
+++ b/src/Cli/dotnet/ToolPackage/ToolPackageException.cs
@@ -1,9 +1,10 @@
// 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.Utils;
namespace Microsoft.DotNet.ToolPackage
{
- internal class ToolPackageException : Exception
+ internal class ToolPackageException : GracefulException
{
public ToolPackageException()
{
diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs
index d1707b2d8d33..109963ed558b 100644
--- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs
+++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs
@@ -3,8 +3,11 @@
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.NuGetPackageDownloader;
@@ -88,38 +91,10 @@ public InstallingWorkloadCommand(
_workloadManifestUpdaterFromConstructor = workloadManifestUpdater;
}
- protected internal void UpdateInstallState(bool createDefaultJson, IEnumerable manifestVersionUpdates)
- {
- var defaultJsonPath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json");
- if (createDefaultJson)
- {
- var jsonContents = WorkloadSet.FromManifests(
+ protected static Dictionary GetInstallStateContents(IEnumerable manifestVersionUpdates) =>
+ WorkloadSet.FromManifests(
manifestVersionUpdates.Select(update => new WorkloadManifestInfo(update.ManifestId.ToString(), update.NewVersion.ToString(), /* We don't actually use the directory here */ string.Empty, update.NewFeatureBand))
).ToDictionaryForJson();
- Directory.CreateDirectory(Path.GetDirectoryName(defaultJsonPath));
- File.WriteAllLines(defaultJsonPath, ToJsonEnumerable(jsonContents));
- }
- else
- {
- if (File.Exists(defaultJsonPath))
- {
- File.Delete(defaultJsonPath);
- }
- }
- }
-
- private IEnumerable ToJsonEnumerable(Dictionary dict)
- {
- yield return "{";
- yield return "\"manifests\": {";
- foreach (KeyValuePair line in dict)
- {
- yield return $"\"{line.Key}\": \"{line.Value}\",";
- }
- yield return "}";
- yield return "}";
- yield break;
- }
protected async Task> GetDownloads(IEnumerable workloadIds, bool skipManifestUpdate, bool includePreview, string downloadFolder = null,
IReporter reporter = null, INuGetPackageDownloader packageDownloader = null)
@@ -223,6 +198,12 @@ protected IEnumerable GetInstalledWorkloads(bool fromPreviousSdk)
internal static class InstallingWorkloadCommandParser
{
+ public static readonly CliOption WorkloadSetMode = new("--mode")
+ {
+ Description = Strings.WorkloadSetMode,
+ Hidden = true
+ };
+
public static readonly CliOption PrintDownloadLinkOnlyOption = new("--print-download-link-only")
{
Description = Strings.PrintDownloadLinkOnlyDescription,
diff --git a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/ListPackageReferencesCommandParser.cs b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/ListPackageReferencesCommandParser.cs
index 59c5c62463b5..15430fe4e11e 100644
--- a/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/ListPackageReferencesCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/ListPackageReferencesCommandParser.cs
@@ -25,7 +25,7 @@ internal static class ListPackageReferencesCommandParser
Description = LocalizableStrings.CmdVulnerableDescription
}.ForwardAs("--vulnerable");
- public static readonly CliOption FrameworkOption = new ForwardedOption>("--framework")
+ public static readonly CliOption FrameworkOption = new ForwardedOption>("--framework", "-f")
{
Description = LocalizableStrings.CmdFrameworkDescription,
HelpName = LocalizableStrings.CmdFramework
diff --git a/src/Cli/dotnet/commands/dotnet-new/README.md b/src/Cli/dotnet/commands/dotnet-new/README.md
index b7251eaabda2..ec88a11f5f78 100644
--- a/src/Cli/dotnet/commands/dotnet-new/README.md
+++ b/src/Cli/dotnet/commands/dotnet-new/README.md
@@ -14,10 +14,10 @@ Main `muscles` of `dotnet new` are implemented in [`Microsoft.TemplateEngine.Cli
Consider adding unit tests and/or integration tests when contributing.
The unit tests are located in:
-- [`dotnet` unit tests](https://github.com/dotnet/sdk/tree/main/src/Tests/dotnet.Tests/dotnet-new)
-- [`Microsoft.TemplateEngine.Cli`](https://github.com/dotnet/sdk/tree/main/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests)
+- [`dotnet` unit tests](https://github.com/dotnet/sdk/tree/main/test/dotnet.Tests/dotnet-new)
+- [`Microsoft.TemplateEngine.Cli`](https://github.com/dotnet/sdk/tree/main/test/Microsoft.TemplateEngine.Cli.UnitTests)
-The integration tests are located [here](https://github.com/dotnet/sdk/tree/main/src/Tests/dotnet-new.Tests).
+The integration tests are located [here](https://github.com/dotnet/sdk/tree/main/test/dotnet-new.Tests).
Please follow existing tests to see how to run `dotnet new` under different conditions.
Assets for unit and integration tests are defined [here](https://github.com/dotnet/sdk/tree/main/src/Assets/TestPackages/dotnet-new).
diff --git a/src/Cli/dotnet/commands/dotnet-package/PackageCommandParser.cs b/src/Cli/dotnet/commands/dotnet-package/PackageCommandParser.cs
new file mode 100644
index 000000000000..63bf74e8faa3
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/PackageCommandParser.cs
@@ -0,0 +1,21 @@
+// 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;
+
+namespace Microsoft.DotNet.Cli
+{
+ internal class PackageCommandParser
+ {
+ private const string DocsLink = "https://aka.ms/dotnet-package";
+
+ public static CliCommand GetCommand()
+ {
+ CliCommand command = new DocumentedCommand("package", DocsLink);
+ command.SetAction((parseResult) => parseResult.HandleMissingCommand());
+ command.Subcommands.Add(PackageSearchCommandParser.GetCommand());
+
+ return command;
+ }
+ }
+}
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-package/search/LocalizableStrings.resx
new file mode 100644
index 000000000000..de09b2b0ad7f
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/LocalizableStrings.resx
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+ ConfigFile
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+ Format
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+ Include prerelease packages.
+
+
+ SearchTerm
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+ Skip
+
+
+ Number of results to skip, to allow pagination. Default 0.
+
+
+ Source
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+ Take
+
+
+ Number of results to return. Default 20.
+
+
+ Verbosity
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommand.cs b/src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommand.cs
new file mode 100644
index 000000000000..f7a6d4800217
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommand.cs
@@ -0,0 +1,31 @@
+// 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.Tools.NuGet;
+using System.CommandLine;
+
+namespace Microsoft.DotNet.Cli
+{
+ internal class PackageSearchCommand : CommandBase
+ {
+ public PackageSearchCommand(ParseResult parseResult) : base(parseResult) { }
+
+ public override int Execute()
+ {
+ var args = new List
+ {
+ "package",
+ "search"
+ };
+
+ var searchArgument = _parseResult.GetValue(PackageSearchCommandParser.SearchTermArgument);
+ if (searchArgument != null)
+ {
+ args.Add(searchArgument);
+ }
+
+ args.AddRange(_parseResult.OptionValuesToBeForwarded(PackageSearchCommandParser.GetCommand()));
+ return NuGetCommand.Run(args.ToArray());
+ }
+ }
+}
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs b/src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs
new file mode 100644
index 000000000000..5bc951d470c4
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/PackageSearchCommandParser.cs
@@ -0,0 +1,105 @@
+// 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 LocalizableStrings = Microsoft.DotNet.Tools.Package.Search.LocalizableStrings;
+
+namespace Microsoft.DotNet.Cli
+{
+ internal static class PackageSearchCommandParser
+ {
+ public static readonly CliArgument SearchTermArgument = new CliArgument("SearchTerm")
+ {
+ HelpName = LocalizableStrings.SearchTermArgumentName,
+ Description = LocalizableStrings.SearchTermDescription,
+ Arity = ArgumentArity.ZeroOrOne
+ };
+
+ public static readonly CliOption Sources = new ForwardedOption>("--source")
+ {
+ Description = LocalizableStrings.SourceDescription,
+ HelpName = LocalizableStrings.SourceArgumentName
+ }.ForwardAsManyArgumentsEachPrefixedByOption("--source")
+ .AllowSingleArgPerToken();
+
+ public static readonly CliOption Take = new ForwardedOption("--take")
+ {
+ Description = LocalizableStrings.TakeDescription,
+ HelpName = LocalizableStrings.TakeArgumentName
+ }.ForwardAsSingle(o => $"--take:{o}");
+
+ public static readonly CliOption Skip = new ForwardedOption("--skip")
+ {
+ Description = LocalizableStrings.SkipDescription,
+ HelpName = LocalizableStrings.SkipArgumentName
+ }.ForwardAsSingle(o => $"--skip:{o}");
+
+ public static readonly CliOption ExactMatch = new ForwardedOption("--exact-match")
+ {
+ Description = LocalizableStrings.ExactMatchDescription
+ }.ForwardAs("--exact-match");
+
+ public static readonly CliOption Interactive = new ForwardedOption("--interactive")
+ {
+ Description = LocalizableStrings.InteractiveDescription
+ }.ForwardAs("--interactive");
+
+ public static readonly CliOption Prerelease = new ForwardedOption("--prerelease")
+ {
+ Description = LocalizableStrings.PrereleaseDescription
+ }.ForwardAs("--prerelease");
+
+ public static readonly CliOption ConfigFile = new ForwardedOption("--configfile")
+ {
+ Description = LocalizableStrings.ConfigFileDescription,
+ HelpName = LocalizableStrings.ConfigFileArgumentName
+ }.ForwardAsSingle(o => $"--configfile:{o}");
+
+ public static readonly CliOption Format = new ForwardedOption("--format")
+ {
+ Description = LocalizableStrings.FormatDescription,
+ HelpName = LocalizableStrings.FormatArgumentName
+ }.ForwardAsSingle(o => $"--format:{o}");
+
+ public static readonly CliOption Verbosity = new ForwardedOption("--verbosity")
+ {
+ Description = LocalizableStrings.VerbosityDescription,
+ HelpName = LocalizableStrings.VerbosityArgumentName
+ }.ForwardAsSingle(o => $"--verbosity:{o}");
+
+ private static readonly CliCommand Command = ConstructCommand();
+
+ public static CliCommand GetCommand()
+ {
+ return Command;
+ }
+
+ private static CliCommand ConstructCommand()
+ {
+ CliCommand searchCommand = new("search", LocalizableStrings.CommandDescription);
+
+ searchCommand.Arguments.Add(SearchTermArgument);
+ searchCommand.Options.Add(Sources);
+ searchCommand.Options.Add(Take);
+ searchCommand.Options.Add(Skip);
+ searchCommand.Options.Add(ExactMatch);
+ searchCommand.Options.Add(Interactive);
+ searchCommand.Options.Add(Prerelease);
+ searchCommand.Options.Add(ConfigFile);
+ searchCommand.Options.Add(Format);
+ searchCommand.Options.Add(Verbosity);
+
+ searchCommand.SetAction((parseResult) => {
+ var command = new PackageSearchCommand(parseResult);
+ int exitCode = command.Execute();
+
+ if (exitCode == 1)
+ {
+ parseResult.ShowHelp();
+ }
+ });
+
+ return searchCommand;
+ }
+ }
+}
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.cs.xlf
new file mode 100644
index 000000000000..ab95f376c5ef
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.cs.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.de.xlf
new file mode 100644
index 000000000000..25c81c1bd851
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.de.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.es.xlf
new file mode 100644
index 000000000000..e588d1659213
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.es.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.fr.xlf
new file mode 100644
index 000000000000..af84c66837d9
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.fr.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.it.xlf
new file mode 100644
index 000000000000..d11f25fd0541
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.it.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ja.xlf
new file mode 100644
index 000000000000..11c4cb28b221
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ja.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ko.xlf
new file mode 100644
index 000000000000..2920635a01c3
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ko.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.pl.xlf
new file mode 100644
index 000000000000..a9051a7b47fc
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.pl.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.pt-BR.xlf
new file mode 100644
index 000000000000..c5c8365f6a04
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.pt-BR.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ru.xlf
new file mode 100644
index 000000000000..46b1600c3a28
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.ru.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.tr.xlf
new file mode 100644
index 000000000000..4a383e5cda10
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.tr.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.zh-Hans.xlf
new file mode 100644
index 000000000000..dd4e698e80cd
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.zh-Hans.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.zh-Hant.xlf
new file mode 100644
index 000000000000..f66a8fe3c625
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-package/search/xlf/LocalizableStrings.zh-Hant.xlf
@@ -0,0 +1,97 @@
+
+
+
+
+
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+ Searches one or more package sources for packages that match a search term. If no sources are specified, all sources defined in the NuGet.Config are used.
+
+
+
+ ConfigFile
+ ConfigFile
+
+
+
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+ The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
+
+
+
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+ Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.
+
+
+
+ Format
+ Format
+
+
+
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+ Format the output accordingly. Either `table`, or `json`. The default value is `table`.
+
+
+
+ Stop and wait for user input or action (for example to complete authentication).
+ Stop and wait for user input or action (for example to complete authentication).
+
+
+
+ Include prerelease packages.
+ Include prerelease packages.
+
+
+
+ SearchTerm
+ SearchTerm
+
+
+
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+ Search term to filter package names, descriptions, and tags. Used as a literal value. Example: `dotnet package search some.package`. See also `--exact-match`.
+
+
+
+ Skip
+ Skip
+
+
+
+ Number of results to skip, to allow pagination. Default 0.
+ Number of results to skip, to allow pagination. Default 0.
+
+
+
+ Source
+ Source
+
+
+
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+ The package source to search. You can pass multiple `--source` options to search multiple package sources. Example: `--source https://api.nuget.org/v3/index.json`.
+
+
+
+ Take
+ Take
+
+
+
+ Number of results to return. Default 20.
+ Number of results to return. Default 20.
+
+
+
+ Verbosity
+ Verbosity
+
+
+
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+ Display this amount of details in the output: `normal`, `minimal`, `detailed`. The default is `normal`
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-sln/SlnCommandParser.cs b/src/Cli/dotnet/commands/dotnet-sln/SlnCommandParser.cs
index 5466d1aa61cd..927b2d05b940 100644
--- a/src/Cli/dotnet/commands/dotnet-sln/SlnCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-sln/SlnCommandParser.cs
@@ -14,7 +14,7 @@ internal static class SlnCommandParser
{
HelpName = LocalizableStrings.SolutionArgumentName,
Description = LocalizableStrings.SolutionArgumentDescription,
- Arity = ArgumentArity.ExactlyOne
+ Arity = ArgumentArity.ZeroOrOne
}.DefaultToCurrentDirectory();
private static readonly CliCommand Command = ConstructCommand();
diff --git a/src/Cli/dotnet/commands/dotnet-test/Program.cs b/src/Cli/dotnet/commands/dotnet-test/Program.cs
index 52377ea462c0..c441f688e8b6 100644
--- a/src/Cli/dotnet/commands/dotnet-test/Program.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/Program.cs
@@ -2,9 +2,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.CommandLine;
-
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
+using Microsoft.DotNet.Cli.Utils.Extensions;
namespace Microsoft.DotNet.Tools.Test
{
@@ -62,8 +62,28 @@ private static int ForwardToMsbuild(ParseResult parseResult, string[] settings,
string previousNodeWindowSetting = Environment.GetEnvironmentVariable(NodeWindowEnvironmentName);
try
{
- Environment.SetEnvironmentVariable(NodeWindowEnvironmentName, "1");
- int exitCode = FromParseResult(parseResult, settings, testSessionCorrelationId).Execute();
+ var properties = GetUserSpecifiedExplicitMSBuildProperties(parseResult);
+ var hasUserMSBuildOutputProperty = properties.TryGetValue("VsTestUseMSBuildOutput", out var propertyValue);
+
+ string[] additionalBuildProperties;
+ if (!hasUserMSBuildOutputProperty)
+ {
+ additionalBuildProperties = ["--property:VsTestUseMSBuildOutput=true"];
+ }
+ else if (propertyValue.ToLowerInvariant() == "true")
+ {
+ // User specified the property themselves. Do nothing.
+ additionalBuildProperties = Array.Empty();
+ }
+ else
+ {
+ // User explicitly disabled the new logger. Use workarounds needed for old logger.
+ // Workaround for https://github.com/Microsoft/vstest/issues/1503
+ Environment.SetEnvironmentVariable(NodeWindowEnvironmentName, "1");
+ additionalBuildProperties = ["-nodereuse:false"];
+ }
+
+ int exitCode = FromParseResult(parseResult, settings, testSessionCorrelationId, additionalBuildProperties).Execute();
// We run post processing also if execution is failed for possible partial successful result to post process.
exitCode |= RunArtifactPostProcessingIfNeeded(testSessionCorrelationId, parseResult, FeatureFlag.Instance);
@@ -115,20 +135,13 @@ public static TestCommand FromArgs(string[] args, string testSessionCorrelationI
testSessionCorrelationId = $"{Environment.ProcessId}_{Guid.NewGuid()}";
}
- return FromParseResult(parseResult, settings, testSessionCorrelationId, msbuildPath);
+ return FromParseResult(parseResult, settings, testSessionCorrelationId, Array.Empty(), msbuildPath);
}
- private static TestCommand FromParseResult(ParseResult result, string[] settings, string testSessionCorrelationId, string msbuildPath = null)
+ private static TestCommand FromParseResult(ParseResult result, string[] settings, string testSessionCorrelationId, string[] additionalBuildProperties, string msbuildPath = null)
{
result.ShowHelpOrErrorIfAppropriate();
- var msbuildArgs = new List()
- {
- "-target:VSTest",
- "-nodereuse:false", // workaround for https://github.com/Microsoft/vstest/issues/1503
- "-nologo"
- };
-
// Extra msbuild properties won't be parsed and so end up in the UnmatchedTokens list. In addition to those
// properties, all the test settings properties are also considered as unmatched but we don't want to forward
// these as-is to msbuild. So we filter out the test settings properties from the unmatched tokens,
@@ -142,6 +155,13 @@ private static TestCommand FromParseResult(ParseResult result, string[] settings
.Concat(unMatchedNonSettingsArgs); // all tokens that the test-parser doesn't explicitly track (minus the settings tokens)
VSTestTrace.SafeWriteTrace(() => $"MSBuild args from forwarded options: {string.Join(", ", parsedArgs)}");
+
+ var msbuildArgs = new List(additionalBuildProperties)
+ {
+ "-target:VSTest",
+ "-nologo",
+ };
+
msbuildArgs.AddRange(parsedArgs);
if (settings.Any())
@@ -276,5 +296,37 @@ private static void SetEnvironmentVariablesFromParameters(TestCommand testComman
testCommand.EnvironmentVariable(name, value);
}
}
+
+ /// A case-insensitive dictionary of any properties passed from the user and their values.
+ private static Dictionary GetUserSpecifiedExplicitMSBuildProperties(ParseResult parseResult)
+ {
+ Dictionary globalProperties = new(StringComparer.OrdinalIgnoreCase);
+ IEnumerable globalPropEnumerable = parseResult.UnmatchedTokens;
+ foreach (var unmatchedToken in globalPropEnumerable)
+ {
+ var propertyPairs = MSBuildPropertyParser.ParseProperties(unmatchedToken);
+ foreach (var propertyKeyValue in propertyPairs)
+ {
+ string propertyName;
+ if (propertyKeyValue.key.StartsWith("--property:", StringComparison.OrdinalIgnoreCase)
+ || propertyKeyValue.key.StartsWith("/property:", StringComparison.OrdinalIgnoreCase))
+ {
+ propertyName = propertyKeyValue.key.RemovePrefix().Substring("property:".Length);
+ }
+ else if (propertyKeyValue.key.StartsWith("-p:", StringComparison.OrdinalIgnoreCase)
+ || propertyKeyValue.key.StartsWith("/p:", StringComparison.OrdinalIgnoreCase))
+ {
+ propertyName = propertyKeyValue.key.RemovePrefix().Substring("p:".Length);
+ }
+ else
+ {
+ continue;
+ }
+
+ globalProperties[propertyName] = propertyKeyValue.value;
+ }
+ }
+ return globalProperties;
+ }
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs b/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs
index 12a042e399d8..c31983f40ac1 100644
--- a/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs
@@ -142,7 +142,7 @@ private static CliOption CreateBlameHangDumpOption()
public static readonly CliOption NoLogoOption = new ForwardedOption("--nologo")
{
Description = LocalizableStrings.CmdNoLogo
- }.ForwardAs("-property:VSTestNoLogo=nologo");
+ }.ForwardAs("-property:VSTestNoLogo=true");
public static readonly CliOption NoRestoreOption = CommonOptions.NoRestoreOption;
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
index cf87d1bac6c3..bacf2bd43283 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx
@@ -235,4 +235,7 @@ If you would like to create a manifest, use `dotnet new tool-manifest`, usually
Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-needed
+
+ Allow package downgrade when installing a .NET tool package.
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ParseResultExtension.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ParseResultExtension.cs
index 25befc5e7458..88a46d72e734 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ParseResultExtension.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ParseResultExtension.cs
@@ -1,15 +1,9 @@
// 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.Generic;
using System.CommandLine;
-using System.CommandLine.Parsing;
-using System.Linq;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
-using Microsoft.DotNet.NugetSearch;
-using Microsoft.DotNet.ToolPackage;
-using Microsoft.DotNet.Tools.Tool.Search;
using NuGet.Versioning;
namespace Microsoft.DotNet.Tools.Tool.Install
@@ -36,6 +30,13 @@ public static VersionRange GetVersionRange(this ParseResult parseResult)
}
VersionRange versionRange = null;
+
+ // accept 'bare' versions and interpret 'bare' versions as NuGet exact versions
+ if (!string.IsNullOrEmpty(packageVersion) && NuGetVersion.TryParse(packageVersion, out NuGetVersion version2))
+ {
+ return new VersionRange(minVersion: version2, includeMinVersion: true, maxVersion: version2, includeMaxVersion: true, originalString: "[" + packageVersion + "]");
+ }
+
if (!string.IsNullOrEmpty(packageVersion) && !VersionRange.TryParse(packageVersion, out versionRange))
{
throw new GracefulException(
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
index a99180601341..aba19cbf6e54 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs
@@ -48,6 +48,11 @@ internal static class ToolInstallCommandParser
Description = LocalizableStrings.CreateManifestIfNeededOptionDescription
};
+ public static readonly CliOption AllowPackageDowngradeOption = new("--allow-downgrade")
+ {
+ Description = LocalizableStrings.AllowPackageDowngradeOptionDescription
+ };
+
public static readonly CliOption VerbosityOption = CommonOptions.VerbosityOption;
// Don't use the common options version as we don't want this to be a forwarded option
@@ -77,6 +82,19 @@ private static CliCommand ConstructCommand()
{
CliCommand command = new("install", LocalizableStrings.CommandDescription);
+ AddCommandOptions(command);
+
+ command.Options.Add(ArchitectureOption);
+ command.Options.Add(CreateManifestIfNeededOption);
+ command.Options.Add(AllowPackageDowngradeOption);
+
+ command.SetAction((parseResult) => new ToolInstallCommand(parseResult).Execute());
+
+ return command;
+ }
+
+ public static CliCommand AddCommandOptions(CliCommand command)
+ {
command.Arguments.Add(PackageIdArgument);
command.Options.Add(GlobalOption.WithHelpDescription(command, LocalizableStrings.GlobalOptionDescription));
command.Options.Add(LocalOption.WithHelpDescription(command, LocalizableStrings.LocalOptionDescription));
@@ -93,12 +111,7 @@ private static CliCommand ConstructCommand()
command.Options.Add(ToolCommandRestorePassThroughOptions.NoHttpCacheOption);
command.Options.Add(ToolCommandRestorePassThroughOptions.InteractiveRestoreOption);
command.Options.Add(VerbosityOption);
- command.Options.Add(ArchitectureOption);
- command.Options.Add(CreateManifestIfNeededOption);
-
- command.SetAction((parseResult) => new ToolInstallCommand(parseResult).Execute());
-
return command;
- }
+ }
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
index 55101d87e590..9b9a83d40d6e 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs
@@ -11,10 +11,12 @@
using Microsoft.DotNet.ToolPackage;
using Microsoft.DotNet.Tools.Tool.Common;
using Microsoft.DotNet.Tools.Tool.Uninstall;
+using Microsoft.DotNet.Tools.Tool.Update;
using Microsoft.Extensions.EnvironmentAbstractions;
using NuGet.Common;
using NuGet.Frameworks;
using NuGet.Versioning;
+using static System.Formats.Asn1.AsnWriter;
namespace Microsoft.DotNet.Tools.Tool.Install
{
@@ -30,7 +32,7 @@ internal class ToolInstallGlobalOrToolPathCommand : CommandBase
private readonly IReporter _reporter;
private readonly IReporter _errorReporter;
private CreateShellShimRepository _createShellShimRepository;
- private CreateToolPackageStoresAndDownloader _createToolPackageStoresAndDownloader;
+ private readonly CreateToolPackageStoresAndDownloaderAndUninstaller _createToolPackageStoreDownloaderUninstaller;
private readonly ShellShimTemplateFinder _shellShimTemplateFinder;
private readonly PackageId _packageId;
@@ -43,10 +45,11 @@ internal class ToolInstallGlobalOrToolPathCommand : CommandBase
private readonly string _toolPath;
private readonly string _architectureOption;
private IEnumerable _forwardRestoreArguments;
+ private readonly bool _allowPackageDowngrade;
public ToolInstallGlobalOrToolPathCommand(
ParseResult parseResult,
- CreateToolPackageStoresAndDownloader createToolPackageStoreAndDownloader = null,
+ CreateToolPackageStoresAndDownloaderAndUninstaller createToolPackageStoreDownloaderUninstaller = null,
CreateShellShimRepository createShellShimRepository = null,
IEnvironmentPathInstruction environmentPathInstruction = null,
IReporter reporter = null,
@@ -63,8 +66,6 @@ public ToolInstallGlobalOrToolPathCommand(
_toolPath = parseResult.GetValue(ToolAppliedOption.ToolPathOption);
_architectureOption = parseResult.GetValue(ToolInstallCommandParser.ArchitectureOption);
- _createToolPackageStoresAndDownloader = createToolPackageStoreAndDownloader ?? ToolPackageFactory.CreateToolPackageStoresAndDownloader;
-
_forwardRestoreArguments = parseResult.OptionValuesToBeForwarded(ToolInstallCommandParser.GetCommand());
_environmentPathInstruction = environmentPathInstruction
@@ -80,6 +81,9 @@ public ToolInstallGlobalOrToolPathCommand(
Interactive: parseResult.GetValue(ToolCommandRestorePassThroughOptions.InteractiveRestoreOption));
nugetPackageDownloader ??= new NuGetPackageDownloader(tempDir, verboseLogger: new NullLogger(), restoreActionConfig: restoreAction);
_shellShimTemplateFinder = new ShellShimTemplateFinder(nugetPackageDownloader, tempDir, packageSourceLocation);
+ _allowPackageDowngrade = parseResult.GetValue(ToolInstallCommandParser.AllowPackageDowngradeOption);
+ _createToolPackageStoreDownloaderUninstaller = createToolPackageStoreDownloaderUninstaller ??
+ ToolPackageFactory.CreateToolPackageStoresAndDownloaderAndUninstaller;
_reporter = (reporter ?? Reporter.Output);
_errorReporter = (reporter ?? Reporter.Error);
@@ -87,15 +91,7 @@ public ToolInstallGlobalOrToolPathCommand(
public override int Execute()
{
- if (!string.IsNullOrEmpty(_configFilePath) && !File.Exists(_configFilePath))
- {
- throw new GracefulException(
- string.Format(
- LocalizableStrings.NuGetConfigurationFileDoesNotExist,
- Path.GetFullPath(_configFilePath)));
- }
-
- VersionRange versionRange = _parseResult.GetVersionRange();
+ ValidateArguments();
DirectoryPath? toolPath = null;
if (!string.IsNullOrEmpty(_toolPath))
@@ -103,31 +99,39 @@ public override int Execute()
toolPath = new DirectoryPath(_toolPath);
}
- (IToolPackageStore toolPackageStore, IToolPackageStoreQuery toolPackageStoreQuery, IToolPackageDownloader toolPackageDownloader) =
- _createToolPackageStoresAndDownloader(toolPath, _forwardRestoreArguments);
+ VersionRange versionRange = _parseResult.GetVersionRange();
- // Prevent installation if any version of the package is installed
- if (toolPackageStoreQuery.EnumeratePackageVersions(_packageId).FirstOrDefault() != null)
- {
- _errorReporter.WriteLine(string.Format(LocalizableStrings.ToolAlreadyInstalled, _packageId).Red());
- return 1;
- }
+ (IToolPackageStore toolPackageStore,
+ IToolPackageStoreQuery toolPackageStoreQuery,
+ IToolPackageDownloader toolPackageDownloader,
+ IToolPackageUninstaller toolPackageUninstaller) = _createToolPackageStoreDownloaderUninstaller(toolPath, _forwardRestoreArguments);
- FilePath? configFile = null;
- if (!string.IsNullOrEmpty(_configFilePath))
- {
- configFile = new FilePath(_configFilePath);
- }
+ var appHostSourceDirectory = ShellShimTemplateFinder.GetDefaultAppHostSourceDirectory();
+ IShellShimRepository shellShimRepository = _createShellShimRepository(appHostSourceDirectory, toolPath);
- try
+ IToolPackage oldPackageNullable = GetOldPackage(toolPackageStoreQuery);
+
+ using (var scope = new TransactionScope(
+ TransactionScopeOption.Required,
+ TimeSpan.Zero))
{
- IToolPackage package = null;
- using (var scope = new TransactionScope(
- TransactionScopeOption.Required,
- TimeSpan.Zero))
+ if (oldPackageNullable != null)
{
- package = toolPackageDownloader.InstallPackage(
- new PackageLocation(nugetConfig: configFile, additionalFeeds: _source),
+ RunWithHandlingUninstallError(() =>
+ {
+ foreach (RestoredCommand command in oldPackageNullable.Commands)
+ {
+ shellShimRepository.RemoveShim(command.Name);
+ }
+
+ toolPackageUninstaller.Uninstall(oldPackageNullable.PackageDirectory);
+ });
+ }
+
+ RunWithHandlingInstallError(() =>
+ {
+ IToolPackage newInstalledPackage = toolPackageDownloader.InstallPackage(
+ new PackageLocation(nugetConfig: GetConfigFile(), additionalFeeds: _source),
packageId: _packageId,
versionRange: versionRange,
targetFramework: _framework,
@@ -135,10 +139,12 @@ public override int Execute()
isGlobalTool: true
);
+ EnsureVersionIsHigher(oldPackageNullable, newInstalledPackage, _allowPackageDowngrade);
+
NuGetFramework framework;
- if (string.IsNullOrEmpty(_framework) && package.Frameworks.Count() > 0)
+ if (string.IsNullOrEmpty(_framework) && newInstalledPackage.Frameworks.Count() > 0)
{
- framework = package.Frameworks
+ framework = newInstalledPackage.Frameworks
.Where(f => f.Version < (new NuGetVersion(Product.Version)).Version)
.MaxBy(f => f.Version);
}
@@ -148,43 +154,170 @@ public override int Execute()
null :
NuGetFramework.Parse(_framework);
}
-
string appHostSourceDirectory = _shellShimTemplateFinder.ResolveAppHostSourceDirectoryAsync(_architectureOption, framework, RuntimeInformation.ProcessArchitecture).Result;
- IShellShimRepository shellShimRepository = _createShellShimRepository(appHostSourceDirectory, toolPath);
- foreach (var command in package.Commands)
+ foreach (RestoredCommand command in newInstalledPackage.Commands)
{
- shellShimRepository.CreateShim(command.Executable, command.Name, package.PackagedShims);
+ shellShimRepository.CreateShim(command.Executable, command.Name, newInstalledPackage.PackagedShims);
}
- scope.Complete();
- }
+ foreach (string w in newInstalledPackage.Warnings)
+ {
+ _reporter.WriteLine(w.Yellow());
+ }
+ if (_global)
+ {
+ _environmentPathInstruction.PrintAddPathInstructionIfPathDoesNotExist();
+ }
- foreach (string w in package.Warnings)
- {
- _reporter.WriteLine(w.Yellow());
- }
+ PrintSuccessMessage(oldPackageNullable, newInstalledPackage);
+ });
- if (_global)
- {
- _environmentPathInstruction.PrintAddPathInstructionIfPathDoesNotExist();
- }
+ scope.Complete();
+
+ }
+ return 0;
+ }
+
+ private static void EnsureVersionIsHigher(IToolPackage oldPackageNullable, IToolPackage newInstalledPackage, bool allowDowngrade)
+ {
+ if (oldPackageNullable != null && (newInstalledPackage.Version < oldPackageNullable.Version && !allowDowngrade))
+ {
+ throw new GracefulException(
+ new[]
+ {
+ string.Format(Update.LocalizableStrings.UpdateToLowerVersion,
+ newInstalledPackage.Version.ToNormalizedString(),
+ oldPackageNullable.Version.ToNormalizedString())
+ },
+ isUserError: false);
+ }
+ }
- _reporter.WriteLine(
+ private void ValidateArguments()
+ {
+ if (!string.IsNullOrEmpty(_configFilePath) && !File.Exists(_configFilePath))
+ {
+ throw new GracefulException(
string.Format(
- LocalizableStrings.InstallationSucceeded,
- string.Join(", ", package.Commands.Select(c => c.Name)),
- package.Id,
- package.Version.ToNormalizedString()).Green());
- return 0;
+ LocalizableStrings.NuGetConfigurationFileDoesNotExist,
+ Path.GetFullPath(_configFilePath)));
}
- catch (Exception ex) when (InstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
+ }
+
+ private void RunWithHandlingInstallError(Action installAction)
+ {
+ try
+ {
+ installAction();
+ }
+ catch (Exception ex)
+ when (InstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
+ {
+ var message = new List
+ {
+ string.Format(Update.LocalizableStrings.UpdateToolFailed, _packageId)
+ };
+ message.AddRange(
+ InstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId));
+
+
+ throw new GracefulException(
+ messages: message,
+ verboseMessages: new[] { ex.ToString() },
+ isUserError: false);
+ }
+ }
+
+ private void RunWithHandlingUninstallError(Action uninstallAction)
+ {
+ try
{
+ uninstallAction();
+ }
+ catch (Exception ex)
+ when (ToolUninstallCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
+ {
+ var message = new List
+ {
+ string.Format(Update.LocalizableStrings.UpdateToolFailed, _packageId)
+ };
+ message.AddRange(
+ ToolUninstallCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId));
+
throw new GracefulException(
- messages: InstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId),
+ messages: message,
verboseMessages: new[] { ex.ToString() },
isUserError: false);
}
}
+
+ private FilePath? GetConfigFile()
+ {
+ FilePath? configFile = null;
+ if (!string.IsNullOrEmpty(_configFilePath))
+ {
+ configFile = new FilePath(_configFilePath);
+ }
+
+ return configFile;
+ }
+
+ private IToolPackage GetOldPackage(IToolPackageStoreQuery toolPackageStoreQuery)
+ {
+ IToolPackage oldPackageNullable;
+ try
+ {
+ oldPackageNullable = toolPackageStoreQuery.EnumeratePackageVersions(_packageId).SingleOrDefault();
+ }
+ catch (InvalidOperationException)
+ {
+ throw new GracefulException(
+ messages: new[]
+ {
+ string.Format(
+ Update.LocalizableStrings.ToolHasMultipleVersionsInstalled,
+ _packageId),
+ },
+ isUserError: false);
+ }
+
+ return oldPackageNullable;
+ }
+
+ private void PrintSuccessMessage(IToolPackage oldPackage, IToolPackage newInstalledPackage)
+ {
+ if (!_verbosity.IsQuiet())
+ {
+ if (oldPackage == null)
+ {
+ _reporter.WriteLine(
+ string.Format(
+ Install.LocalizableStrings.InstallationSucceeded,
+ string.Join(", ", newInstalledPackage.Commands.Select(c => c.Name)),
+ newInstalledPackage.Id,
+ newInstalledPackage.Version.ToNormalizedString()).Green());
+ }
+ else if (oldPackage.Version != newInstalledPackage.Version)
+ {
+ _reporter.WriteLine(
+ string.Format(
+ Update.LocalizableStrings.UpdateSucceeded,
+ newInstalledPackage.Id,
+ oldPackage.Version.ToNormalizedString(),
+ newInstalledPackage.Version.ToNormalizedString()).Green());
+ }
+ else
+ {
+ _reporter.WriteLine(
+ string.Format(
+ (
+ newInstalledPackage.Version.IsPrerelease ?
+ Update.LocalizableStrings.UpdateSucceededPreVersionNoChange : Update.LocalizableStrings.UpdateSucceededStableVersionNoChange
+ ),
+ newInstalledPackage.Id, newInstalledPackage.Version).Green());
+ }
+ }
+ }
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
index acbe916430e1..e411c948ab33 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallLocalCommand.cs
@@ -19,6 +19,8 @@ internal class ToolInstallLocalCommand : CommandBase
private readonly ILocalToolsResolverCache _localToolsResolverCache;
private readonly ToolInstallLocalInstaller _toolLocalPackageInstaller;
private readonly IReporter _reporter;
+ private readonly PackageId _packageId;
+ private readonly bool _allowPackageDowngrade;
private readonly string _explicitManifestFile;
private readonly bool _createManifestIfNeeded;
@@ -44,15 +46,89 @@ public ToolInstallLocalCommand(
_toolManifestEditor = toolManifestEditor ?? new ToolManifestEditor();
_localToolsResolverCache = localToolsResolverCache ?? new LocalToolsResolverCache();
_toolLocalPackageInstaller = new ToolInstallLocalInstaller(parseResult, toolPackageDownloader);
+ _packageId = new PackageId(parseResult.GetValue(ToolUpdateCommandParser.PackageIdArgument));
+ _allowPackageDowngrade = parseResult.GetValue(ToolInstallCommandParser.AllowPackageDowngradeOption);
}
+
public override int Execute()
{
FilePath manifestFile = GetManifestFilePath();
- return Install(manifestFile);
+
+ (FilePath? manifestFileOptional, string warningMessage) =
+ _toolManifestFinder.ExplicitManifestOrFindManifestContainPackageId(_explicitManifestFile, _packageId);
+
+ if (warningMessage != null)
+ {
+ _reporter.WriteLine(warningMessage.Yellow());
+ }
+
+ manifestFile = manifestFileOptional ?? GetManifestFilePath();
+ var existingPackageWithPackageId = _toolManifestFinder.Find(manifestFile).Where(p => p.PackageId.Equals(_packageId));
+
+ if (!existingPackageWithPackageId.Any())
+ {
+ return InstallNewTool(manifestFile);
+ }
+
+ var existingPackage = existingPackageWithPackageId.Single();
+ var toolDownloadedPackage = _toolLocalPackageInstaller.Install(manifestFile);
+
+ InstallToolUpdate(existingPackage, toolDownloadedPackage, manifestFile);
+
+ _localToolsResolverCache.SaveToolPackage(
+ toolDownloadedPackage,
+ _toolLocalPackageInstaller.TargetFrameworkToInstall);
+
+ return 0;
}
- public int Install(FilePath manifestFile)
+ public int InstallToolUpdate(ToolManifestPackage existingPackage, IToolPackage toolDownloadedPackage, FilePath manifestFile)
+ {
+ if (existingPackage.Version > toolDownloadedPackage.Version && !_allowPackageDowngrade)
+ {
+ throw new GracefulException(new[]
+ {
+ string.Format(
+ Update.LocalizableStrings.UpdateLocalToolToLowerVersion,
+ toolDownloadedPackage.Version.ToNormalizedString(),
+ existingPackage.Version.ToNormalizedString(),
+ manifestFile.Value)
+ },
+ isUserError: false);
+ }
+ else if (existingPackage.Version == toolDownloadedPackage.Version)
+ {
+ _reporter.WriteLine(
+ string.Format(
+ Update.LocalizableStrings.UpdateLocaToolSucceededVersionNoChange,
+ toolDownloadedPackage.Id,
+ existingPackage.Version.ToNormalizedString(),
+ manifestFile.Value));
+ }
+ else
+ {
+ _toolManifestEditor.Edit(
+ manifestFile,
+ _packageId,
+ toolDownloadedPackage.Version,
+ toolDownloadedPackage.Commands.Select(c => c.Name).ToArray());
+ _reporter.WriteLine(
+ string.Format(
+ Update.LocalizableStrings.UpdateLocalToolSucceeded,
+ toolDownloadedPackage.Id,
+ existingPackage.Version.ToNormalizedString(),
+ toolDownloadedPackage.Version.ToNormalizedString(),
+ manifestFile.Value).Green());
+ }
+
+ _localToolsResolverCache.SaveToolPackage(
+ toolDownloadedPackage,
+ _toolLocalPackageInstaller.TargetFrameworkToInstall);
+
+ return 0;
+ }
+ public int InstallNewTool(FilePath manifestFile)
{
IToolPackage toolDownloadedPackage =
_toolLocalPackageInstaller.Install(manifestFile);
@@ -78,7 +154,7 @@ public int Install(FilePath manifestFile)
return 0;
}
- private FilePath GetManifestFilePath()
+ public FilePath GetManifestFilePath()
{
try
{
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
index 1073407eb811..43ef15efbca5 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Při instalaci balíčku nástroje .NET povolte downgrade balíčku.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededVytvořte manifest nástroje, pokud se nějaký nenajde během instalace nástroje. Informace o tom, jak se manifesty nacházejí, najdete v tématu https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
index 8439dc3b3908..e3ca99a38cec 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Paketdowngrade beim Installieren eines .NET-Toolpakets zulassen.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededErstellen Sie ein Toolmanifest, wenn es während der Toolinstallation nicht gefunden wird. Informationen dazu, wie Manifeste gefunden werden, finden Sie unter https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
index 1bea2d9d6a19..86a9057d5377 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Permitir la degradación del paquete al instalar un paquete de herramientas de .NET.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededCree un manifiesto de herramienta si no se encuentra ninguno durante la instalación de la herramienta. Para obtener información sobre cómo se encuentran los manifiestos, consulte https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
index 62b5b8ea09b7..f0b26485df8b 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededCréez un manifeste d'outil si aucun n'est trouvé lors de l'installation de l'outil. Pour plus d'informations sur la localisation des manifestes, voir https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
index 5b79eb906320..18a37a323a37 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededCreare un manifesto dello strumento se non ne viene trovato uno durante l'installazione dello strumento. Per informazioni sulla posizione dei manifesti, vedere https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
index dc9cbe468dfa..e4fb5d830160 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededツールのインストール中にツール マニフェスト見つからない場合は作成します。マニフェストの場所については、https://aka.ms/dotnet/tools/create-manifest-if-needed を参照してください
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
index 09523ab43bdc..312a81ff45ac 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-needed도구 설치 중에 도구 매니페스트를 찾을 수 없는 경우 도구 매니페스트를 만드세요. 매니페스트의 위치는 https://aka.ms/dotnet/tools/create-manifest-if-needed를 참조하세요.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
index 76b632ec7f10..b5a1cef3c5bf 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Zezwalaj na obniżanie wersji pakietu podczas instalowania pakietu narzędzi .NET.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededUtwórz manifest narzędzi, jeśli nie zostanie znaleziony podczas instalacji narzędzia. Aby uzyskać informacje o lokalizacji manifestów, zobacz https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
index 7392c799046c..231fd74d2cbb 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededCrie um manifesto de ferramenta se nenhum for encontrado durante a instalação da ferramenta. Para obter informações sobre como os manifestos estão localizados, consulte https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
index 94c8bd4d3f22..9e06971364c8 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededСоздайте манифест инструмента, если он не найден во время установки инструмента. Сведения о способе размещения манифестов см. на странице https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
index 6977fd232503..de68df203c29 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-neededAraç yüklemesi sırasında bir araç bildirimi bulunmazsa bir araç bildirimi oluşturun. Bildirimlerin nasıl bulunduğu hakkında bilgi edinmek için bkz. https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
index 1687123d06da..740148454acd 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ 安装 .NET 工具包时允许包降级。
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-needed如果在工具安装期间找不到工具清单,请创建一个工具清单。若要了解如何查找清单,请参阅 https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
index 23b08414bf46..3c5ad6c15e28 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf
@@ -2,6 +2,11 @@
+
+ Allow package downgrade when installing a .NET tool package.
+ Allow package downgrade when installing a .NET tool package.
+
+ Create a tool manifest if one isn't found during tool installation. For information on how manifests are located, see https://aka.ms/dotnet/tools/create-manifest-if-needed如果在工具安裝期間找不到工具資訊清單,則建立工具資訊清單。如需如何尋找資訊清單的相關資訊,請參閱 https://aka.ms/dotnet/tools/create-manifest-if-needed
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx
index af3c3cf46ee8..52cbe1ac3ad2 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx
@@ -183,10 +183,10 @@ and the corresponding package Ids for installed tools using the command
'dotnet tool list'.
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').Tool '{0}' failed to update due to the following:
@@ -218,10 +218,10 @@ and the corresponding package Ids for installed tools using the command
Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.Tool '{0}' is up to date (version '{1}' manifest file {2}) .
-
+
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs
index 3525a2d6ef5c..4fda156ac3f7 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs
@@ -32,6 +32,8 @@ internal static class ToolUpdateCommandParser
public static readonly CliOption VerbosityOption = ToolInstallCommandParser.VerbosityOption;
+ public static readonly CliOption AllowPackageDowngradeOption = ToolInstallCommandParser.AllowPackageDowngradeOption;
+
private static readonly CliCommand Command = ConstructCommand();
public static CliCommand GetCommand()
@@ -43,22 +45,8 @@ private static CliCommand ConstructCommand()
{
CliCommand command = new("update", LocalizableStrings.CommandDescription);
- command.Arguments.Add(PackageIdArgument);
- command.Options.Add(GlobalOption.WithHelpDescription(command, LocalizableStrings.GlobalOptionDescription));
- command.Options.Add(ToolPathOption.WithHelpDescription(command, LocalizableStrings.ToolPathOptionDescription));
- command.Options.Add(LocalOption.WithHelpDescription(command, LocalizableStrings.LocalOptionDescription));
- command.Options.Add(ConfigOption);
- command.Options.Add(AddSourceOption);
- command.Options.Add(FrameworkOption);
- command.Options.Add(VersionOption);
- command.Options.Add(ToolManifestOption.WithHelpDescription(command, LocalizableStrings.ManifestPathOptionDescription));
- command.Options.Add(PrereleaseOption);
- command.Options.Add(ToolCommandRestorePassThroughOptions.DisableParallelOption);
- command.Options.Add(ToolCommandRestorePassThroughOptions.IgnoreFailedSourcesOption);
- command.Options.Add(ToolCommandRestorePassThroughOptions.NoCacheOption);
- command.Options.Add(ToolCommandRestorePassThroughOptions.NoHttpCacheOption);
- command.Options.Add(ToolCommandRestorePassThroughOptions.InteractiveRestoreOption);
- command.Options.Add(VerbosityOption);
+ ToolInstallCommandParser.AddCommandOptions(command);
+ command.Options.Add(AllowPackageDowngradeOption);
command.SetAction((parseResult) => new ToolUpdateCommand(parseResult).Execute());
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs
index c51a24226be3..74c034b509c1 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.CommandLine;
-using System.Transactions;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ShellShim;
@@ -10,33 +9,20 @@
using Microsoft.DotNet.Tools.Tool.Install;
using Microsoft.DotNet.Tools.Tool.Uninstall;
using Microsoft.Extensions.EnvironmentAbstractions;
-using NuGet.Versioning;
using Microsoft.DotNet.Cli.ToolPackage;
+using CreateShellShimRepository = Microsoft.DotNet.Tools.Tool.Install.CreateShellShimRepository;
namespace Microsoft.DotNet.Tools.Tool.Update
{
- internal delegate IShellShimRepository CreateShellShimRepository(string appHostSourceDirectory, DirectoryPath? nonGlobalLocation = null);
-
internal delegate (IToolPackageStore, IToolPackageStoreQuery, IToolPackageDownloader, IToolPackageUninstaller) CreateToolPackageStoresAndDownloaderAndUninstaller(
DirectoryPath? nonGlobalLocation = null,
IEnumerable additionalRestoreArguments = null);
internal class ToolUpdateGlobalOrToolPathCommand : CommandBase
{
- private readonly IReporter _reporter;
- private readonly IReporter _errorReporter;
private readonly CreateShellShimRepository _createShellShimRepository;
private readonly CreateToolPackageStoresAndDownloaderAndUninstaller _createToolPackageStoreDownloaderUninstaller;
-
- private readonly PackageId _packageId;
- private readonly string _configFilePath;
- private readonly string _framework;
- private readonly string[] _additionalFeeds;
- private readonly bool _global;
- private readonly VerbosityOptions _verbosity;
- private readonly string _toolPath;
- private readonly IEnumerable _forwardRestoreArguments;
- private readonly string _packageVersion;
+ private readonly ToolInstallGlobalOrToolPathCommand _toolInstallGlobalOrToolPathCommand;
public ToolUpdateGlobalOrToolPathCommand(ParseResult parseResult,
CreateToolPackageStoresAndDownloaderAndUninstaller createToolPackageStoreDownloaderUninstaller = null,
@@ -44,228 +30,24 @@ public ToolUpdateGlobalOrToolPathCommand(ParseResult parseResult,
IReporter reporter = null)
: base(parseResult)
{
- _packageId = new PackageId(parseResult.GetValue(ToolUninstallCommandParser.PackageIdArgument));
- _configFilePath = parseResult.GetValue(ToolUpdateCommandParser.ConfigOption);
- _framework = parseResult.GetValue(ToolUpdateCommandParser.FrameworkOption);
- _additionalFeeds = parseResult.GetValue(ToolUpdateCommandParser.AddSourceOption);
- _packageVersion = parseResult.GetValue(ToolUpdateCommandParser.VersionOption);
- _global = parseResult.GetValue(ToolUpdateCommandParser.GlobalOption);
- _verbosity = parseResult.GetValue(ToolUpdateCommandParser.VerbosityOption);
- _toolPath = parseResult.GetValue(ToolUpdateCommandParser.ToolPathOption);
- _forwardRestoreArguments = parseResult.OptionValuesToBeForwarded(ToolUpdateCommandParser.GetCommand());
-
_createToolPackageStoreDownloaderUninstaller = createToolPackageStoreDownloaderUninstaller ??
ToolPackageFactory.CreateToolPackageStoresAndDownloaderAndUninstaller;
_createShellShimRepository =
createShellShimRepository ?? ShellShimRepositoryFactory.CreateShellShimRepository;
- _reporter = (reporter ?? Reporter.Output);
- _errorReporter = (reporter ?? Reporter.Error);
+ _toolInstallGlobalOrToolPathCommand = new ToolInstallGlobalOrToolPathCommand(
+
+ parseResult,
+ _createToolPackageStoreDownloaderUninstaller,
+ _createShellShimRepository,
+ reporter: reporter);
}
public override int Execute()
{
- ValidateArguments();
-
- DirectoryPath? toolPath = null;
- if (!string.IsNullOrEmpty(_toolPath))
- {
- toolPath = new DirectoryPath(_toolPath);
- }
-
- VersionRange versionRange = _parseResult.GetVersionRange();
-
- (IToolPackageStore toolPackageStore,
- IToolPackageStoreQuery toolPackageStoreQuery,
- IToolPackageDownloader toolPackageDownloader,
- IToolPackageUninstaller toolPackageUninstaller) = _createToolPackageStoreDownloaderUninstaller(toolPath, _forwardRestoreArguments);
-
- var appHostSourceDirectory = ShellShimTemplateFinder.GetDefaultAppHostSourceDirectory();
- IShellShimRepository shellShimRepository = _createShellShimRepository(appHostSourceDirectory, toolPath);
-
- IToolPackage oldPackageNullable = GetOldPackage(toolPackageStoreQuery);
-
- using (var scope = new TransactionScope(
- TransactionScopeOption.Required,
- TimeSpan.Zero))
- {
- if (oldPackageNullable != null)
- {
- RunWithHandlingUninstallError(() =>
- {
- foreach (RestoredCommand command in oldPackageNullable.Commands)
- {
- shellShimRepository.RemoveShim(command.Name);
- }
-
- toolPackageUninstaller.Uninstall(oldPackageNullable.PackageDirectory);
- });
- }
-
- RunWithHandlingInstallError(() =>
- {
- IToolPackage newInstalledPackage = toolPackageDownloader.InstallPackage(
- new PackageLocation(nugetConfig: GetConfigFile(), additionalFeeds: _additionalFeeds),
- packageId: _packageId,
- versionRange: versionRange,
- targetFramework: _framework,
- verbosity: _verbosity,
- isGlobalTool: true
- );
-
- EnsureVersionIsHigher(oldPackageNullable, newInstalledPackage);
-
- foreach (RestoredCommand command in newInstalledPackage.Commands)
- {
- shellShimRepository.CreateShim(command.Executable, command.Name, newInstalledPackage.PackagedShims);
- }
-
- PrintSuccessMessage(oldPackageNullable, newInstalledPackage);
- });
-
- scope.Complete();
- }
-
+ _toolInstallGlobalOrToolPathCommand.Execute();
return 0;
}
-
- private static void EnsureVersionIsHigher(IToolPackage oldPackageNullable, IToolPackage newInstalledPackage)
- {
- if (oldPackageNullable != null && (newInstalledPackage.Version < oldPackageNullable.Version))
- {
- throw new GracefulException(
- new[]
- {
- string.Format(LocalizableStrings.UpdateToLowerVersion,
- newInstalledPackage.Version.ToNormalizedString(),
- oldPackageNullable.Version.ToNormalizedString())
- },
- isUserError: false);
- }
- }
-
- private void ValidateArguments()
- {
- if (!string.IsNullOrEmpty(_configFilePath) && !File.Exists(_configFilePath))
- {
- throw new GracefulException(
- string.Format(
- LocalizableStrings.NuGetConfigurationFileDoesNotExist,
- Path.GetFullPath(_configFilePath)));
- }
- }
-
- private void RunWithHandlingInstallError(Action installAction)
- {
- try
- {
- installAction();
- }
- catch (Exception ex)
- when (InstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
- {
- var message = new List
- {
- string.Format(LocalizableStrings.UpdateToolFailed, _packageId)
- };
- message.AddRange(
- InstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId));
-
-
- throw new GracefulException(
- messages: message,
- verboseMessages: new[] { ex.ToString() },
- isUserError: false);
- }
- }
-
- private void RunWithHandlingUninstallError(Action uninstallAction)
- {
- try
- {
- uninstallAction();
- }
- catch (Exception ex)
- when (ToolUninstallCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex))
- {
- var message = new List
- {
- string.Format(LocalizableStrings.UpdateToolFailed, _packageId)
- };
- message.AddRange(
- ToolUninstallCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId));
-
- throw new GracefulException(
- messages: message,
- verboseMessages: new[] { ex.ToString() },
- isUserError: false);
- }
- }
-
- private FilePath? GetConfigFile()
- {
- FilePath? configFile = null;
- if (!string.IsNullOrEmpty(_configFilePath))
- {
- configFile = new FilePath(_configFilePath);
- }
-
- return configFile;
- }
-
- private IToolPackage GetOldPackage(IToolPackageStoreQuery toolPackageStoreQuery)
- {
- IToolPackage oldPackageNullable;
- try
- {
- oldPackageNullable = toolPackageStoreQuery.EnumeratePackageVersions(_packageId).SingleOrDefault();
- }
- catch (InvalidOperationException)
- {
- throw new GracefulException(
- messages: new[]
- {
- string.Format(
- LocalizableStrings.ToolHasMultipleVersionsInstalled,
- _packageId),
- },
- isUserError: false);
- }
-
- return oldPackageNullable;
- }
-
- private void PrintSuccessMessage(IToolPackage oldPackage, IToolPackage newInstalledPackage)
- {
- if (oldPackage == null)
- {
- _reporter.WriteLine(
- string.Format(
- Install.LocalizableStrings.InstallationSucceeded,
- string.Join(", ", newInstalledPackage.Commands.Select(c => c.Name)),
- newInstalledPackage.Id,
- newInstalledPackage.Version.ToNormalizedString()).Green());
- }
- else if (oldPackage.Version != newInstalledPackage.Version)
- {
- _reporter.WriteLine(
- string.Format(
- LocalizableStrings.UpdateSucceeded,
- newInstalledPackage.Id,
- oldPackage.Version.ToNormalizedString(),
- newInstalledPackage.Version.ToNormalizedString()).Green());
- }
- else
- {
- _reporter.WriteLine(
- string.Format(
- (
- newInstalledPackage.Version.IsPrerelease ?
- LocalizableStrings.UpdateSucceededPreVersionNoChange : LocalizableStrings.UpdateSucceededStableVersionNoChange
- ),
- newInstalledPackage.Id, newInstalledPackage.Version).Green());
- }
- }
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs
index 8118adee5229..5a3f232865b1 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs
@@ -19,13 +19,9 @@ internal class ToolUpdateLocalCommand : CommandBase
private readonly IToolManifestEditor _toolManifestEditor;
private readonly ILocalToolsResolverCache _localToolsResolverCache;
private readonly IToolPackageDownloader _toolPackageDownloader;
- private readonly ToolInstallLocalInstaller _toolLocalPackageInstaller;
private readonly Lazy _toolInstallLocalCommand;
private readonly IReporter _reporter;
- private readonly PackageId _packageId;
- private readonly string _explicitManifestFile;
-
public ToolUpdateLocalCommand(
ParseResult parseResult,
IToolPackageDownloader toolPackageDownloader = null,
@@ -35,9 +31,6 @@ public ToolUpdateLocalCommand(
IReporter reporter = null)
: base(parseResult)
{
- _packageId = new PackageId(parseResult.GetValue(ToolUpdateCommandParser.PackageIdArgument));
- _explicitManifestFile = parseResult.GetValue(ToolUpdateCommandParser.ToolManifestOption);
-
_reporter = (reporter ?? Reporter.Output);
if (toolPackageDownloader == null)
@@ -59,7 +52,6 @@ public ToolUpdateLocalCommand(
_toolManifestEditor = toolManifestEditor ?? new ToolManifestEditor();
_localToolsResolverCache = localToolsResolverCache ?? new LocalToolsResolverCache();
- _toolLocalPackageInstaller = new ToolInstallLocalInstaller(parseResult, toolPackageDownloader);
_toolInstallLocalCommand = new Lazy(
() => new ToolInstallLocalCommand(
parseResult,
@@ -72,73 +64,7 @@ public ToolUpdateLocalCommand(
public override int Execute()
{
- (FilePath? manifestFileOptional, string warningMessage) =
- _toolManifestFinder.ExplicitManifestOrFindManifestContainPackageId(_explicitManifestFile, _packageId);
-
- var manifestFile = manifestFileOptional ?? _toolManifestFinder.FindFirst();
-
- var toolDownloadedPackage = _toolLocalPackageInstaller.Install(manifestFile);
- var existingPackageWithPackageId =
- _toolManifestFinder
- .Find(manifestFile)
- .Where(p => p.PackageId.Equals(_packageId));
-
- if (!existingPackageWithPackageId.Any())
- {
- return _toolInstallLocalCommand.Value.Install(manifestFile);
- }
-
- var existingPackage = existingPackageWithPackageId.Single();
- if (existingPackage.Version > toolDownloadedPackage.Version)
- {
- throw new GracefulException(new[]
- {
- string.Format(
- LocalizableStrings.UpdateLocaToolToLowerVersion,
- toolDownloadedPackage.Version.ToNormalizedString(),
- existingPackage.Version.ToNormalizedString(),
- manifestFile.Value)
- },
- isUserError: false);
- }
-
- if (existingPackage.Version != toolDownloadedPackage.Version)
- {
- _toolManifestEditor.Edit(
- manifestFile,
- _packageId,
- toolDownloadedPackage.Version,
- toolDownloadedPackage.Commands.Select(c => c.Name).ToArray());
- }
-
- _localToolsResolverCache.SaveToolPackage(
- toolDownloadedPackage,
- _toolLocalPackageInstaller.TargetFrameworkToInstall);
-
- if (warningMessage != null)
- {
- _reporter.WriteLine(warningMessage.Yellow());
- }
-
- if (existingPackage.Version == toolDownloadedPackage.Version)
- {
- _reporter.WriteLine(
- string.Format(
- LocalizableStrings.UpdateLocaToolSucceededVersionNoChange,
- toolDownloadedPackage.Id,
- existingPackage.Version.ToNormalizedString(),
- manifestFile.Value));
- }
- else
- {
- _reporter.WriteLine(
- string.Format(
- LocalizableStrings.UpdateLocalToolSucceeded,
- toolDownloadedPackage.Id,
- existingPackage.Version.ToNormalizedString(),
- toolDownloadedPackage.Version.ToNormalizedString(),
- manifestFile.Value).Green());
- }
+ _toolInstallLocalCommand.Value.Execute();
return 0;
}
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf
index 49017f3ead99..60cc43f41a94 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf
@@ -42,24 +42,24 @@
Nástroj {0} je aktuální (verze {1}, soubor manifestu {2}).
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- Požadovaná verze {0} je nižší než stávající verze {1} (soubor manifestu {2}).
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).Nástroj {0} byl úspěšně aktualizován z verze {1} na verzi {2} (soubor manifestu {3}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ Požadovaná verze {0} je nižší než stávající verze {1} (soubor manifestu {2}). Pokud chcete povolit tuto aktualizaci, použijte možnost --allow-downgrade.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- Nástroj{0}byl znovu nainstalován s nejnovější předběžnou verzí (verze{1}).
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Nástroj {0} se přeinstaloval na předběžnou verzi (verze {1}).
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- Nástroj {0} byl přeinstalován nejnovější stabilní verzí (verze {1}).
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Nástroj {0} se přeinstaloval na stabilní verzi (verze {1}).
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf
index 36cf57b95ead..b93c1827fbb7 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf
@@ -42,24 +42,24 @@
Das Tool "{0}" ist auf dem neuesten Stand (Version {1}, Manifestdatei "{2}").
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- Die angeforderte Version {0} ist niedriger als die vorhandene Version {1} (Manifestdatei "{2}").
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).Das Tool "{0}" wurde erfolgreich von Version {1} auf Version {2} aktualisiert (Manifestdatei "{3}").
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ Die angeforderte Version {0} ist niedriger als die vorhandene Version {1} (Manifestdatei {2}). Verwenden Sie die Option --Downgrade zulassen, um dieses Update zuzulassen.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- Das Tool „{0}“ wurde in der neuesten Vorabversion neu installiert (Version „{1}“).
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Das Tool "{0}" wurde mit der Vorabversion (Version "{1}" ) neu installiert.
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- Das Tool "{0}" wurde in der neuesten stabilen Version neu installiert (Version {1}).
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Das Tool "{0}" wurde mit der stabilen Version (Version "{1}" ) neu installiert.
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf
index e57a011b7607..f8fe5b7b2cfb 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf
@@ -42,23 +42,23 @@
La herramienta "{0}" está actualizada (versión "{1}", archivo de manifiesto {2}) .
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- La versión solicitada {0} es anterior a la versión existente {1} (archivo de manifiesto {2}).
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).La herramienta "{0}" se actualizó correctamente de la versión "{1}" a la versión "{2}" (archivo de manifiesto {3}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ La versión solicitada {0} es anterior a la versión existente {1} (archivo de manifiesto {2}). Use la opción --allow-downgrade para permitir esta actualización.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').La herramienta "{0}" se ha reinstalado con la versión preliminar más reciente (versión "{1}").
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').La herramienta "{0}" se reinstaló con la versión estable más reciente (versión "{1}").
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf
index 4bf16511cbb6..af315123267e 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf
@@ -42,24 +42,24 @@
L'outil '{0}' est à jour (version '{1}', fichier manifeste {2}).
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- La version demandée {0} est inférieure à la version existante {1} (fichier manifeste {2}).
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).L'outil '{0}' a été correctement mis à jour de la version '{1}' à la version '{2}' (fichier manifeste {3}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- L'outil '{0}' a été réinstallé avec la dernière version préliminaire (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- L'outil '{0}' a été réinstallé avec la dernière version stable (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf
index 1b64464c6117..650025a24b44 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf
@@ -42,24 +42,24 @@
Lo strumento '{0}' è aggiornato (file manifesto {2} versione '{1}').
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- La versione richiesta {0} è inferiore a quella esistente {1} (file manifesto {2}).
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).Lo strumento '{0}' è stato aggiornato dalla versione '{1}' alla versione '{2}' (file manifesto {3}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- Lo strumento '{0}' è stato reinstallato con l'ultima versione preliminare (versione '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- Lo strumento '{0}' è stato reinstallato con l'ultima versione stabile (versione '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf
index 3d7d560ea2a2..eb6d9b2054b7 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf
@@ -42,24 +42,24 @@
ツール '{0}' は最新の状態です (バージョン '{1}' マニフェスト ファイル {2})。
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- 要求されたバージョン {0} は、既存のバージョン {1} (マニフェスト ファイル {2}) よりも低くなっています。
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).ツール '{0}' がバージョン '{1}' からバージョン '{2}' (マニフェストファイル {3}) に正常に更新されました。
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- ツール '{0}' は、最新のプレリリース バージョン (バージョン '{1}') で再インストールされました。
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- ツール '{0}' が安定した最新バージョン (バージョン '{1}') で再インストールされました。
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf
index e89364423fa2..ffc8e977787b 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf
@@ -42,24 +42,24 @@
'{0}' 도구는 최신 버전(버전 '{1}' 매니페스트 파일 {2})입니다.
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- 요청된 버전 {0}이(가) 기존 버전 {1}(매니페스트 파일 {2})보다 낮습니다.
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).'{0}' 도구가 '{1}' 버전에서 '{2}' 버전(매니페스트 파일 {3})으로 업데이트되었습니다.
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- 도구 '{0}'이(가) 최신 시험판 버전(버전 '{1}')으로 다시 설치되었습니다.
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- '{0}' 도구가 안정적인 최신 버전('{1}' 버전)으로 다시 설치되었습니다.
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf
index d9ebce6c0772..78b6bfddfbcb 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf
@@ -42,23 +42,23 @@
Narzędzie „{0}” jest aktualne (wersja „{1}”, plik manifestu {2}).
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- Żądana wersja {0} jest niższa niż obecna wersja {1} (plik manifestu {2}).
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).Narzędzie „{0}” zostało pomyślnie zaktualizowane z wersji „{1}” do wersji „{2}” (plik manifestu {3}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ Żądana wersja {0} jest niższa niż obecna wersja {1} (plik manifestu {2}). Użyj opcji --allow-downgrade (zezwól na zmianę na starszą lub mniej zaawansowaną wersję), aby zezwolić na tę aktualizację.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- Narzędzie „{0}” zostało ponownie zainstalowane przy użyciu najnowszej stabilnej wersji (wersja „{1}”).
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Narzędzie „{0}” zostało ponownie zainstalowane z wersją wstępną (wersja „{1}”).
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').Narzędzie „{0}” zostało ponownie zainstalowane przy użyciu najnowszej stabilnej wersji (wersja „{1}”).
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf
index 88f0816772ae..f0f32e1f5a0a 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf
@@ -42,24 +42,24 @@
A ferramenta '{0}' está atualizada (versão '{1}' arquivo de manifesto {2}) .
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- A versão solicitada {0} é inferior à versão existente {1} (arquivo de manifesto {2}).
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).A ferramenta '{0}' foi atualizada com êxito da versão '{1}' para a versão '{2}' (arquivo de manifesto {3}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- A ferramenta '{0}' foi reinstalada com a versão de pré-lançamento mais recente (versão '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- A ferramenta '{0}' foi reinstalada com a versão estável mais recente (versão '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf
index 46bf064da5cd..4bc4c939eb6c 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf
@@ -42,24 +42,24 @@
Средство "{0}" обновлено (версия "{1}", файл манифеста {2}).
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- Запрошенная версия {0} ниже существующей версии {1} (файл манифеста {2}).
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).Средство "{0}" обновлено с версии "{1}" до версии "{2}" (файл манифеста {3}).
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- Инструмент "{0}" был переустановлен с последней предварительной версией (версией "{1}").
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- Инструмент "{0}" был переустановлен с последней стабильной версией (версией "{1}").
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf
index 9ae1020925b0..2af93f504e3b 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf
@@ -42,24 +42,24 @@
'{0}' aracı güncel (sürüm '{1}' bildirim dosyası {2}).
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- İstenen sürüm ({0}) mevcut sürümünden ({1}) (bildirim dosyası {2}) düşük.
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).'{0}' aracı, '{1}' sürümünden '{2}' (bildirim dosyası {3}) sürümüne başarıyla güncelleştirildi.
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- '{0}' aracı, en yeni ön sürüm (sürüm '{1}') ile yeniden yüklendi.
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- '{0}' aracı, en son kararlı sürüm (sürüm '{1}') ile yeniden yüklendi.
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf
index a7264b53a603..0580fb08f0b6 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf
@@ -42,24 +42,24 @@
工具“{0}”是最新的(版本“{1}”清单文件 {2})。
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- 请求的版本 {0} 低于现有版本 {1} (清单文件{2})。
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).工具“{0}”已成功从版本“{1}”更新到版本“{2}”(清单文件 {3})。
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ 请求的版本 {0} 低于现有版本 {1} (清单文件 {2})。使用 --allow-downgrade 选项允许此更新。
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- 工具“{0}”已重新安装最新预发行版本(版本“{1}”)。
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ 工具“{0}”已重新安装预发行版本(版本“{1}”)。
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- 工具“{0}”已重新安装最新稳定版本(版本“{1}”)。
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ 工具“{0}”已重新安装稳定版本(版本“{1}”)。
diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf
index 24f4b489a06f..7518993b6404 100644
--- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf
@@ -42,24 +42,24 @@
工具 '{0}' 為最新 (版本 '{1}' 資訊清單檔 {2})。
-
- The requested version {0} is lower than existing version {1} (manifest file {2}).
- 要求的版本 {0} 低於現有版本 {1} (資訊清單檔 {2})。
-
- Tool '{0}' was successfully updated from version '{1}' to version '{2}' (manifest file {3}).已成功將工具 '{0}' 從 '{1}' 版更新為 '{2}' 版 (資訊清單檔 {3})。
+
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+ The requested version {0} is lower than existing version {1} (manifest file {2}). Use the --allow-downgrade option to allow this update.
+
+
- Tool '{0}' was reinstalled with the latest prerelease version (version '{1}').
- 已使用最新搶鮮版 ('{0}' 版) 來重新安裝工具 '{1}'。
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
+ Tool '{0}' was reinstalled with the prerelease version (version '{1}').
- Tool '{0}' was reinstalled with the latest stable version (version '{1}').
- 已使用最新穩定版本 ('{1}' 版) 來重新安裝工具 '{0}'。
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
+ Tool '{0}' was reinstalled with the stable version (version '{1}').
diff --git a/src/Cli/dotnet/commands/dotnet-workload/InstallStateContents.cs b/src/Cli/dotnet/commands/dotnet-workload/InstallStateContents.cs
new file mode 100644
index 000000000000..d6fcc23bf654
--- /dev/null
+++ b/src/Cli/dotnet/commands/dotnet-workload/InstallStateContents.cs
@@ -0,0 +1,33 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Microsoft.DotNet.Workloads.Workload
+{
+ internal class InstallStateContents
+ {
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public bool? UseWorkloadSets { get; set; }
+
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public Dictionary Manifests { get; set; }
+
+ private static readonly JsonSerializerOptions s_options = new()
+ {
+ PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
+ WriteIndented = true,
+ };
+
+ public static InstallStateContents FromString(string contents)
+ {
+ return JsonSerializer.Deserialize(contents, s_options);
+ }
+
+ public override string ToString()
+ {
+ return JsonSerializer.Serialize(this, s_options);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Cli/dotnet/commands/dotnet-workload/SignCheck.cs b/src/Cli/dotnet/commands/dotnet-workload/SignCheck.cs
index 1bd0df8bc8f4..65071af75a9e 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/SignCheck.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/SignCheck.cs
@@ -2,34 +2,57 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Reflection;
+#if !DOT_NET_BUILD_FROM_SOURCE
using Microsoft.DotNet.Installer.Windows.Security;
+#endif
using Microsoft.Win32;
namespace Microsoft.DotNet.Workloads.Workload
{
internal static class SignCheck
{
+ internal static readonly string OnlineRevocationCheckPolicyKeyName = "AllowOnlineRevocationChecks";
+ internal static readonly string VerifySignaturesPolicyKeyName = "VerifySignatures";
+
+ private static readonly string s_WorkloadPolicyKey = @"SOFTWARE\Policies\Microsoft\dotnet\Workloads";
+
private static readonly string s_dotnet = Assembly.GetExecutingAssembly().Location;
///
- /// Determines whether dotnet is signed.
+ /// Determines whether dotnet.dll is signed.
///
- /// if dotnet is signed; otherwise.
- public static bool IsDotNetSigned() => IsSigned(s_dotnet);
+ /// if dotnet is signed; otherwise, .
+ public static bool IsDotNetSigned()
+ {
+ if (OperatingSystem.IsWindows())
+ {
+#if !DOT_NET_BUILD_FROM_SOURCE
+ // API is only available on XP and Server 2003 or later versions. .NET requires Win7 minimum.
+#pragma warning disable CA1416
+ // We don't care about trust in this case, only whether or not the file has a signatue as that determines
+ // whether we'll trigger sign verification for workload operations.
+ return Signature.IsAuthenticodeSigned(s_dotnet, AllowOnlineRevocationChecks()) == 0;
+#pragma warning restore CA1416
+#endif
+ }
+
+ return false;
+ }
///
- /// Determines whether the specified file is signed by a trusted organization.
+ /// Determines whether revocation checks can go online based on the global policy setting in the registry.
///
- /// if file is signed; otherwise.
- internal static bool IsSigned(string path)
+ /// if the policy key is absent or set to a non-zero value; if the policy key is set to 0.
+ public static bool AllowOnlineRevocationChecks()
{
if (OperatingSystem.IsWindows())
{
- return AuthentiCode.IsSigned(path) &&
- AuthentiCode.IsSignedByTrustedOrganization(path, AuthentiCode.TrustedOrganizations);
+ using RegistryKey policyKey = Registry.LocalMachine.OpenSubKey(s_WorkloadPolicyKey);
+
+ return ((int?)policyKey?.GetValue(OnlineRevocationCheckPolicyKeyName) ?? 1) != 0;
}
- return false;
+ return true;
}
///
@@ -40,9 +63,9 @@ public static bool IsWorkloadSignVerificationPolicySet()
{
if (OperatingSystem.IsWindows())
{
- using RegistryKey policyKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\dotnet\Workloads");
+ using RegistryKey policyKey = Registry.LocalMachine.OpenSubKey(s_WorkloadPolicyKey);
- return ((int?)policyKey?.GetValue("VerifySignatures") ?? 0) != 0;
+ return ((int?)policyKey?.GetValue(VerifySignaturesPolicyKeyName) ?? 0) != 0;
}
return false;
diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandParser.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandParser.cs
index 78393c380984..32cba977af82 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandParser.cs
@@ -47,7 +47,7 @@ internal static string GetWorkloadsVersion(WorkloadInfoHelper workloadInfoHelper
return workloadInfoHelper.ManifestProvider.GetWorkloadVersion();
}
- internal static void ShowWorkloadsInfo(ParseResult parseResult = null, WorkloadInfoHelper workloadInfoHelper = null, IReporter reporter = null, string dotnetDir = null)
+ internal static void ShowWorkloadsInfo(ParseResult parseResult = null, WorkloadInfoHelper workloadInfoHelper = null, IReporter reporter = null, string dotnetDir = null, bool showVersion = true)
{
workloadInfoHelper ??= new WorkloadInfoHelper(parseResult != null ? parseResult.HasOption(SharedOptions.InteractiveOption) : false);
IEnumerable installedList = workloadInfoHelper.InstalledSdkWorkloadIds;
@@ -55,7 +55,10 @@ internal static void ShowWorkloadsInfo(ParseResult parseResult = null, WorkloadI
reporter ??= Utils.Reporter.Output;
string dotnetPath = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath);
- reporter.WriteLine($" Workload version: {workloadInfoHelper.ManifestProvider.GetWorkloadVersion()}");
+ if (showVersion)
+ {
+ reporter.WriteLine($" Workload version: {workloadInfoHelper.ManifestProvider.GetWorkloadVersion()}");
+ }
if (installedWorkloads.Count == 0)
{
diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadInfoHelper.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadInfoHelper.cs
index b2f787ff157a..f686d494a53d 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadInfoHelper.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadInfoHelper.cs
@@ -56,7 +56,8 @@ public WorkloadInfoHelper(
userProfileDir,
verifySignatures ?? !SignCheck.IsDotNetSigned(),
restoreActionConfig: restoreConfig,
- elevationRequired: false);
+ elevationRequired: false,
+ shouldLog: false);
WorkloadRecordRepo = workloadRecordRepo ?? Installer.GetWorkloadInstallationRecordRepository();
}
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs
index 22b073f6aa80..08cd93199320 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Text.Json;
-using Microsoft.Deployment.DotNet.Releases;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.NuGetPackageDownloader;
using Microsoft.DotNet.Cli.Utils;
@@ -453,6 +452,36 @@ public void GarbageCollect(Func getResolverForWorkloa
}
+ public void RemoveManifestsFromInstallState(SdkFeatureBand sdkFeatureBand)
+ {
+ string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetDir), "default.json");
+
+ if (File.Exists(path))
+ {
+ var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents();
+ installStateContents.Manifests = null;
+ File.WriteAllText(path, installStateContents.ToString());
+ }
+ }
+
+ public void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary manifestContents)
+ {
+ string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetDir), "default.json");
+ Directory.CreateDirectory(Path.GetDirectoryName(path));
+ var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents();
+ installStateContents.Manifests = manifestContents;
+ File.WriteAllText(path, installStateContents.ToString());
+ }
+
+ public void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode)
+ {
+ string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, _dotnetDir), "default.json");
+ Directory.CreateDirectory(Path.GetDirectoryName(path));
+ var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents();
+ installStateContents.UseWorkloadSets = newMode;
+ File.WriteAllText(path, installStateContents.ToString());
+ }
+
///
/// Remove all workload installation records that aren't from Visual Studio.
///
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs
index 9415fa72f1de..5d388ef8bd21 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs
@@ -33,6 +33,21 @@ internal interface IInstaller : IWorkloadManifestInstaller
void ReplaceWorkloadResolver(IWorkloadResolver workloadResolver);
void Shutdown();
+
+ ///
+ /// Delete the install state file at the specified path.
+ ///
+ /// The SDK feature band of the install state file.
+ void RemoveManifestsFromInstallState(SdkFeatureBand sdkFeatureBand);
+
+ ///
+ /// Writes the specified JSON contents to the install state file.
+ ///
+ /// The SDK feature band of the install state file.
+ /// The JSON contents describing the install state.
+ void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary manifestContents);
+
+ void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode);
}
// Interface to pass to workload manifest updater
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx
index 08f453f48894..b9cd5af6b5dd 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx
@@ -183,6 +183,9 @@
Only print the list of links to download without downloading.
+
+ Control whether future workload operations should use workload sets or loose manifests.
+
Download packages needed to install a workload to a folder that can be used for offline installation.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.cs b/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.cs
index 60928285ed22..a004b1e231f9 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.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 System;
using System.Diagnostics;
using System.Runtime.Versioning;
using Microsoft.DotNet.Cli.Utils;
+using Microsoft.DotNet.Workloads.Workload;
+using Microsoft.DotNet.Workloads.Workload.Install;
using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord;
using Microsoft.NET.Sdk.WorkloadManifestReader;
using Microsoft.Win32;
@@ -26,6 +29,11 @@ internal abstract class MsiInstallerBase : InstallerBase
///
private string _dotNetHome;
+ ///
+ /// Full path to the root directory for storing workload data.
+ ///
+ public static readonly string WorkloadDataRoot = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads");
+
///
/// Default reinstall mode (equivalent to VOMUS).
///
@@ -96,7 +104,7 @@ public MsiInstallerBase(InstallElevationContextBase elevationContext, ISetupLogg
bool verifySignatures, IReporter reporter = null) : base(elevationContext, logger, verifySignatures)
{
Cache = new MsiPackageCache(elevationContext, logger, verifySignatures);
- RecordRepository = new RegistryWorkloadInstallationRecordRepository(elevationContext, logger, VerifySignatures);
+ RecordRepository = new RegistryWorkloadInstallationRecordRepository(elevationContext, logger, verifySignatures);
UpdateAgent = new WindowsUpdateAgent(logger);
Reporter = reporter;
}
@@ -267,6 +275,40 @@ protected uint RepairMsi(string productCode, string logFile)
throw new InvalidOperationException($"Invalid configuration: elevated: {IsElevated}, client: {IsClient}");
}
+ ///
+ /// Instructs future workload operations to use workload sets or loose manifests, per newMode.
+ ///
+ /// The feature band to update
+ /// Where to use loose manifests or workload sets
+ /// Full path of the log file
+ /// Error code indicating the result of the operation
+ ///
+ protected void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode)
+ {
+ Elevate();
+
+ if (IsElevated)
+ {
+ string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
+ // Create the parent folder for the state file and set up all required ACLs
+ SecurityUtils.CreateSecureDirectory(Path.GetDirectoryName(path));
+ var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents();
+ installStateContents.UseWorkloadSets = newMode;
+ File.WriteAllText(path, installStateContents.ToString());
+
+ SecurityUtils.SecureFile(path);
+ }
+ else if (IsClient)
+ {
+ InstallResponseMessage response = Dispatcher.SendUpdateWorkloadModeRequest(sdkFeatureBand, newMode);
+ ExitOnFailure(response, "Failed to update install mode.");
+ }
+ else
+ {
+ throw new InvalidOperationException($"Invalid configuration: elevated: {IsElevated}, client: {IsClient}");
+ }
+ }
+
///
/// Installs the specified MSI.
///
@@ -487,5 +529,65 @@ protected void UpdateDependent(InstallRequestType requestType, string providerKe
ExitOnFailure(response, $"Failed to update dependent, providerKey: {providerKeyName}, dependent: {dependent}.");
}
}
+
+ ///
+ /// Deletes manifests from the install state file for the specified feature band.
+ ///
+ /// The feature band of the install state file.
+ public void RemoveManifestsFromInstallState(SdkFeatureBand sdkFeatureBand)
+ {
+ string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
+
+ if (!File.Exists(path))
+ {
+ Log?.LogMessage($"Install state file does not exist: {path}");
+ return;
+ }
+
+ Elevate();
+
+ if (IsElevated)
+ {
+ if (File.Exists(path))
+ {
+ var installStateContents = InstallStateContents.FromString(File.ReadAllText(path));
+ installStateContents.Manifests = null;
+ File.WriteAllText(path, installStateContents.ToString());
+ }
+ }
+ else if (IsClient)
+ {
+ InstallResponseMessage response = Dispatcher.SendRemoveManifestsFromInstallStateFileRequest(sdkFeatureBand);
+ ExitOnFailure(response, $"Failed to remove install state file: {path}");
+ }
+ }
+
+ ///
+ /// Writes the contents of the install state JSON file.
+ ///
+ /// The path of the isntall state file to write.
+ /// The contents of the JSON file, formatted as a single line.
+ public void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary manifestContents)
+ {
+ string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
+ Elevate();
+
+ if (IsElevated)
+ {
+ // Create the parent folder for the state file and set up all required ACLs
+ SecurityUtils.CreateSecureDirectory(Path.GetDirectoryName(path));
+
+ var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents();
+ installStateContents.Manifests = manifestContents;
+ File.WriteAllText(path, installStateContents.ToString());
+
+ SecurityUtils.SecureFile(path);
+ }
+ else if (IsClient)
+ {
+ InstallResponseMessage respone = Dispatcher.SendSaveInstallStateManifestVersions(sdkFeatureBand, manifestContents);
+ ExitOnFailure(respone, $"Failed to write install state file: {path}");
+ }
+ }
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs
index 9cb96ad1a914..00fde1059151 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs
@@ -52,7 +52,7 @@ public NetSdkMsiInstallerClient(InstallElevationContextBase elevationContext,
AppDomain.CurrentDomain.ProcessExit += OnProcessExit;
- Log?.LogMessage($"Executing: {Windows.GetProcessCommandLine()}, PID: {CurrentProcess.Id}, PPID: {ParentProcess.Id}");
+ Log?.LogMessage($"Executing: {Microsoft.DotNet.Cli.Utils.Windows.GetProcessCommandLine()}, PID: {CurrentProcess.Id}, PPID: {ParentProcess.Id}");
Log?.LogMessage($"{nameof(IsElevated)}: {IsElevated}");
Log?.LogMessage($"{nameof(Is64BitProcess)}: {Is64BitProcess}");
Log?.LogMessage($"{nameof(RebootPending)}: {RebootPending}");
@@ -1019,9 +1019,12 @@ public static NetSdkMsiInstallerClient Create(
PackageSourceLocation packageSourceLocation = null,
IReporter reporter = null,
string tempDirPath = null,
- RestoreActionConfig restoreActionConfig = null)
+ RestoreActionConfig restoreActionConfig = null,
+ bool shouldLog = true)
{
- TimestampedFileLogger logger = new(Path.Combine(Path.GetTempPath(), $"Microsoft.NET.Workload_{Environment.ProcessId}_{DateTime.Now:yyyyMMdd_HHmmss_fff}.log"));
+ ISynchronizingLogger logger =
+ shouldLog ? new TimestampedFileLogger(Path.Combine(Path.GetTempPath(), $"Microsoft.NET.Workload_{Environment.ProcessId}_{DateTime.Now:yyyyMMdd_HHmmss_fff}.log"))
+ : new NullInstallerLogger();
InstallClientElevationContext elevationContext = new(logger);
if (nugetPackageDownloader == null)
@@ -1064,9 +1067,14 @@ private void OnProcessExit(object sender, EventArgs e)
}
finally
{
- ((TimestampedFileLogger)Log).Dispose();
+ if (Log is IDisposable tfl)
+ {
+ tfl.Dispose();
+ }
}
}
}
+
+ void IInstaller.UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode) => UpdateInstallMode(sdkFeatureBand, newMode);
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs
index ed156cfbf058..600db9e051c5 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs
@@ -93,6 +93,22 @@ public void Run()
Dispatcher.ReplySuccess($"Updated dependent '{request.Dependent}' for provider key '{request.ProviderKeyName}'");
break;
+ case InstallRequestType.SaveInstallStateManifestVersions:
+ SaveInstallStateManifestVersions(new SdkFeatureBand(request.SdkFeatureBand), request.InstallStateManifestVersions);
+ Dispatcher.ReplySuccess($"Created install state file for {request.SdkFeatureBand}.");
+ break;
+
+ case InstallRequestType.RemoveManifestsFromInstallStateFile:
+ RemoveManifestsFromInstallState(new SdkFeatureBand(request.SdkFeatureBand));
+ Dispatcher.ReplySuccess($"Deleted install state file for {request.SdkFeatureBand}.");
+ break;
+
+ case InstallRequestType.AdjustWorkloadMode:
+ UpdateInstallMode(new SdkFeatureBand(request.SdkFeatureBand), request.UseWorkloadSets);
+ string newMode = request.ProductCode.Equals("true", StringComparison.OrdinalIgnoreCase) ? "workload sets" : "loose manifests";
+ Dispatcher.ReplySuccess($"Updated install mode to use {newMode}.");
+ break;
+
default:
throw new InvalidOperationException($"Unknown message request: {(int)request.RequestType}");
}
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs
index 0a6887cb383e..1e17a3ac558a 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs
@@ -107,7 +107,6 @@ public override int Execute()
else if (_skipManifestUpdate && usedRollback)
{
throw new GracefulException(string.Format(LocalizableStrings.CannotCombineSkipManifestAndRollback,
- WorkloadInstallCommandParser.SkipManifestUpdateOption.Name, InstallingWorkloadCommandParser.FromRollbackFileOption.Name,
WorkloadInstallCommandParser.SkipManifestUpdateOption.Name, InstallingWorkloadCommandParser.FromRollbackFileOption.Name), isUserError: true);
}
else
@@ -135,7 +134,7 @@ public void InstallWorkloads(IEnumerable workloadIds, bool skipManif
{
Reporter.WriteLine();
- var manifestsToUpdate = Enumerable.Empty ();
+ var manifestsToUpdate = Enumerable.Empty();
var useRollback = false;
if (!skipManifestUpdate)
@@ -236,7 +235,7 @@ private void InstallWorkloadsWithInstallRecord(
if (usingRollback)
{
- UpdateInstallState(true, manifestsToUpdate);
+ installer.SaveInstallStateManifestVersions(sdkFeatureBand, GetInstallStateContents(manifestsToUpdate));
}
},
rollback: () =>
diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallerFactory.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallerFactory.cs
index e1a379a01e50..2b9f3f530098 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallerFactory.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallerFactory.cs
@@ -23,7 +23,8 @@ public static IInstaller GetWorkloadInstaller(
string tempDirPath = null,
PackageSourceLocation packageSourceLocation = null,
RestoreActionConfig restoreActionConfig = null,
- bool elevationRequired = true)
+ bool elevationRequired = true,
+ bool shouldLog = true)
{
dotnetDir = string.IsNullOrWhiteSpace(dotnetDir) ? Path.GetDirectoryName(Environment.ProcessPath) : dotnetDir;
var installType = WorkloadInstallType.GetWorkloadInstallType(sdkFeatureBand, dotnetDir);
@@ -34,9 +35,9 @@ public static IInstaller GetWorkloadInstaller(
{
throw new InvalidOperationException(LocalizableStrings.OSDoesNotSupportMsi);
}
-
+ // TODO: should restoreActionConfig be flowed through to the client here as well like it is for the FileBasedInstaller below?
return NetSdkMsiInstallerClient.Create(verifySignatures, sdkFeatureBand, workloadResolver,
- nugetPackageDownloader, verbosity, packageSourceLocation, reporter, tempDirPath);
+ nugetPackageDownloader, verbosity, packageSourceLocation, reporter, tempDirPath, shouldLog: shouldLog);
}
if (elevationRequired && !WorkloadFileBasedInstall.IsUserLocal(dotnetDir, sdkFeatureBand.ToString()) && !CanWriteToDotnetRoot(dotnetDir))
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 9f8d6f8e2699..720a2aefe836 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
@@ -362,6 +362,11 @@
CESTA
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Určete, jestli by budoucí operace úloh měly používat sady úloh nebo volné manifesty.
+
+ Workload updates are available. Run `dotnet workload list` for more information.Jsou k dispozici aktualizace úloh. Pokud chcete získat další informace, spusťte `dotnet workload list`.
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 23d61efe36f7..f412e4e21584 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
@@ -362,6 +362,11 @@
PFAD
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Hiermit wird gesteuert, ob zukünftige Workloadvorgänge Workloadsätze oder lose Manifeste verwenden sollen.
+
+ Workload updates are available. Run `dotnet workload list` for more information.Es sind Workloadupdates verfügbar. Um weitere Informationen zu erhalten, führen Sie `dotnet workload list` aus.
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 056fb8cbeeaf..661379832a29 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
@@ -362,6 +362,11 @@
RUTA DE ACCESO
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Controle si las operaciones de carga de trabajo futuras deben usar conjuntos de cargas de trabajo o manifiestos flexibles.
+
+ Workload updates are available. Run `dotnet workload list` for more information.Hay actualizaciones de carga de trabajo disponibles. Ejecute "dotnet workload list" para obtener más información.
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 879b2659c9fd..1462fa793077 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
@@ -362,6 +362,11 @@
PATH
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Contrôlez si les futures opérations de charge de travail doivent utiliser des ensembles de charges de travail ou des manifestes lâches.
+
+ Workload updates are available. Run `dotnet workload list` for more information.Des mises à jour de la charge de travail sont disponibles. Exécutez `dotnet workload list` pour plus d’informations.
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 b7ba22c5001c..2f9f807b9fa6 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
@@ -362,6 +362,11 @@
PERCORSO
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Controllare se le operazioni future del carico di lavoro devono usare set di carichi di lavoro o manifesti separati.
+
+ Workload updates are available. Run `dotnet workload list` for more information.Sono disponibili aggiornamenti del carico di lavoro. Per altre informazioni, eseguire `dotnet workload list`.
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 ed50daa56103..93aa4172e61b 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
@@ -362,6 +362,11 @@
パス
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ 将来のワークロード操作でワークロード セットを使用するか、ルーズ マニフェストを使用するかを制御します。
+
+ Workload updates are available. Run `dotnet workload list` for more information.ワークロードの更新が利用可能です。詳細については、`dotnet workload list` を実行してください。
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 a46019514be2..dcfa49035630 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
@@ -362,6 +362,11 @@
경로
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ 향후 워크로드 작업에서 워크로드 집합을 사용할지, 매니페스트를 완화할지를 제어합니다.
+
+ Workload updates are available. Run `dotnet workload list` for more information.워크로드 업데이트를 사용할 수 있습니다. 자세한 내용을 보려면 `dotnet workload list`을 실행하세요.
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 94697cd0040d..6325acdc4b93 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
@@ -362,6 +362,11 @@
ŚCIEŻKA
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Określ, czy przyszłe operacje związane z obciążeniami powinny wykorzystywać zestawy obciążeń, czy luźne manifesty.
+
+ Workload updates are available. Run `dotnet workload list` for more information.Dostępne są aktualizacje obciążenia. Uruchom polecenie `dotnet workload list`, aby uzyskać więcej informacji.
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 a3f860528e7e..8c03cca867d1 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
@@ -362,6 +362,11 @@
CAMINHO
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Controle se as operações de carga de trabalho futuras devem usar conjuntos de carga de trabalho ou manifestos flexíveis.
+
+ Workload updates are available. Run `dotnet workload list` for more information.As atualizações de carga de trabalho estão disponíveis. Execute `dotnet workload list` para obter mais informações.
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 bc3ec05f6d96..b4940992ccc1 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
@@ -362,6 +362,11 @@
PATH
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Укажите, должны ли будущие операции рабочей нагрузки использовать наборы рабочей нагрузки или свободные манифесты.
+
+ Workload updates are available. Run `dotnet workload list` for more information.Доступны обновления рабочей нагрузки. Для получения дополнительных сведений запустите `dotnet workload list`.
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 c2cd403c021b..3691d8eb871c 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
@@ -362,6 +362,11 @@
YOL
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ Gelecekteki iş yükü işlemlerinin iş yükü kümelerini mi yoksa gevşek bildirimleri mi kullanması gerektiğini kontrol edin.
+
+ Workload updates are available. Run `dotnet workload list` for more information.İş yükü güncelleştirmeleri var. Daha fazla bilgi için `dotnet workload list` çalıştırın.
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 58ce764a255c..60dce47d2925 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
@@ -362,6 +362,11 @@
路径
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ 控制未来的工作负载操作应该使用工作负载集还是松散清单。
+
+ Workload updates are available. Run `dotnet workload list` for more information.有可用的工作负载更新。有关详细信息,请运行 `dotnet workload list`。
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 d1e4bc9f6655..4921d99e1aab 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
@@ -362,6 +362,11 @@
路徑
+
+ Control whether future workload operations should use workload sets or loose manifests.
+ 控制未來的工作負載作業應該使用工作負載集合還是鬆散資訊清單。
+
+ Workload updates are available. Run `dotnet workload list` for more information.有可用的工作負載更新。如需詳細資訊,請執行 `dotnet workload list`。
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx
index 41d8c0db27ee..77709f82d798 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx
@@ -138,6 +138,9 @@
Workload update failed: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+
Include workloads installed with earlier SDK versions in update.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs
index b77352d4aae6..bc4c4a7b063b 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs
@@ -20,6 +20,7 @@ internal class WorkloadUpdateCommand : InstallingWorkloadCommand
private readonly bool _adManifestOnlyOption;
private readonly bool _printRollbackDefinitionOnly;
private readonly bool _fromPreviousSdk;
+ private readonly string _workloadSetMode;
public WorkloadUpdateCommand(
ParseResult parseResult,
@@ -38,6 +39,7 @@ public WorkloadUpdateCommand(
_adManifestOnlyOption = parseResult.GetValue(WorkloadUpdateCommandParser.AdManifestOnlyOption);
_printRollbackDefinitionOnly = parseResult.GetValue(WorkloadUpdateCommandParser.PrintRollbackOption);
var resolvedReporter = _printDownloadLinkOnly || _printRollbackDefinitionOnly ? NullReporter.Instance : Reporter;
+ _workloadSetMode = parseResult.GetValue(InstallingWorkloadCommandParser.WorkloadSetMode);
_workloadInstaller = _workloadInstallerFromConstructor ?? WorkloadInstallerFactory.GetWorkloadInstaller(resolvedReporter,
_sdkFeatureBand, _workloadResolver, Verbosity, _userProfileDir, VerifySignatures, PackageDownloader,
@@ -86,6 +88,22 @@ public override int Execute()
var workloadSet = WorkloadSet.FromManifests(_workloadResolver.GetInstalledManifests());
Reporter.WriteLine(workloadSet.ToJson());
}
+ else if (!string.IsNullOrWhiteSpace(_workloadSetMode))
+ {
+ if (_workloadSetMode.Equals("workloadset", StringComparison.OrdinalIgnoreCase))
+ {
+ _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, true);
+ }
+ else if (_workloadSetMode.Equals("loosemanifest", StringComparison.OrdinalIgnoreCase) ||
+ _workloadSetMode.Equals("auto", StringComparison.OrdinalIgnoreCase))
+ {
+ _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, false);
+ }
+ else
+ {
+ throw new GracefulException(string.Format(LocalizableStrings.WorkloadSetModeTakesWorkloadSetLooseManifestOrAuto, _workloadSetMode), isUserError: true);
+ }
+ }
else
{
try
@@ -150,11 +168,9 @@ private void UpdateWorkloadsWithInstallRecord(
transaction.Run(
action: context =>
{
- bool rollback = !string.IsNullOrWhiteSpace(_fromRollbackDefinition);
-
foreach (var manifestUpdate in manifestsToUpdate)
{
- _workloadInstaller.InstallWorkloadManifest(manifestUpdate, context, offlineCache, rollback);
+ _workloadInstaller.InstallWorkloadManifest(manifestUpdate, context, offlineCache, useRollback);
}
_workloadResolver.RefreshWorkloadManifests();
@@ -163,7 +179,14 @@ private void UpdateWorkloadsWithInstallRecord(
_workloadInstaller.InstallWorkloads(workloads, sdkFeatureBand, context, offlineCache);
- UpdateInstallState(useRollback, manifestsToUpdate);
+ if (useRollback)
+ {
+ _workloadInstaller.SaveInstallStateManifestVersions(sdkFeatureBand, GetInstallStateContents(manifestsToUpdate));
+ }
+ else
+ {
+ _workloadInstaller.RemoveManifestsFromInstallState(sdkFeatureBand);
+ }
},
rollback: () =>
{
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommandParser.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommandParser.cs
index 496c49697e59..fe068fc74b70 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommandParser.cs
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommandParser.cs
@@ -47,6 +47,7 @@ private static CliCommand ConstructCommand()
command.Options.Add(CommonOptions.VerbosityOption);
command.Options.Add(PrintRollbackOption);
command.Options.Add(WorkloadInstallCommandParser.SkipSignCheckOption);
+ command.Options.Add(InstallingWorkloadCommandParser.WorkloadSetMode);
command.SetAction((parseResult) => new WorkloadUpdateCommand(parseResult).Execute());
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf
index 11b89e60bc76..0d57937d6b65 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf
@@ -52,6 +52,11 @@
Nepovedlo se stáhnout balíčky aktualizace úlohy do mezipaměti: {0}.
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Neplatný argument „{0}“ argumentu --mode pro aktualizaci úlohy dotnet. Jediné podporované režimy jsou workloadset, loosemanifest a auto.
+
+ Successfully updated advertising manifests.Manifesty reklamy se úspěšně aktualizovaly.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf
index d2a0c6c462bf..7fe3755912f5 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf
@@ -52,6 +52,11 @@
Fehler beim Herunterladen von Paketen zur Workloadaktualisierung in den Cache: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Ungültiges Argument "{0}" zum Argument --mode für das Dotnet Workload-Update. Es werden nur die Modi "workloadset", "loosemanifest" und "auto" unterstützt.
+
+ Successfully updated advertising manifests.Werbemanifeste wurden erfolgreich aktualisiert.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf
index 8662a5c2a22b..61eacfcb2be0 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf
@@ -52,6 +52,11 @@
No se pudieron descargar los paquetes de actualización de la carga de trabajo en caché: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Argumento "{0}" no válido para el argumento --mode para la actualización de la carga de trabajo de dotnet. Solo los modos admitidos son "workloadset", "loosemanifest" y "auto".
+
+ Successfully updated advertising manifests.Los manifiestos de publicidad se han actualizado correctamente.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf
index b5a33d8a6244..ffa504cef235 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf
@@ -52,6 +52,11 @@
Échec du téléchargement des packages de mise à jour de charge de travail dans le cache : {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Argument «{0}» non valide à l’argument --mode pour la mise à jour de charge de travail dotnet. Seuls les modes pris en charge sont « workloadset », « loosemanifest » et « auto ».
+
+ Successfully updated advertising manifests.Les manifestes de publicité ont été mis à jour.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf
index 72fc4b08f96d..0d9403d54fe4 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf
@@ -52,6 +52,11 @@
Non è stato possibile scaricare i pacchetti di aggiornamento del carico di lavoro nella cache: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Argomento non valido "{0}" per l'argomento --mode per l'aggiornamento del carico di lavoro dotnet. Le uniche modalità supportate sono "workloadset", "loosemanifest" e "auto".
+
+ Successfully updated advertising manifests.I manifesti pubblicitari sono stati aggiornati.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf
index 0fd3558e55b9..a3555167d604 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf
@@ -52,6 +52,11 @@
ワークロード更新パッケージをキャッシュにダウンロードできませんでした: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ .NET ワークロード更新の --mode 引数に対する引数 "{0}" が無効です。サポートされているモードは、"workloadset"、"loosemanifest"、および "auto" のみです。
+
+ Successfully updated advertising manifests.広告マニフェストを正常に更新しました。
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf
index 5496e044b69e..1f9d499812c4 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf
@@ -52,6 +52,11 @@
캐시할 워크로드 업데이트 패키지를 다운로드하지 못했습니다. {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ dotnet 워크로드 업데이트의 --mode 인수에 대한 "{0}" 인수가 잘못되었습니다. "workloadset", "loosemanifest", "auto" 모드만 지원됩니다.
+
+ Successfully updated advertising manifests.알림 매니페스트를 업데이트했습니다.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf
index b1248dedd4f5..222d233a4c10 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf
@@ -52,6 +52,11 @@
Nie można pobrać pakietów aktualizacji pakietów roboczych do pamięci podręcznej: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Nieprawidłowy argument „{0}” argumentu --mode dla aktualizacji obciążenia dotnet. Obsługiwane tryby to „workloadset”, „loosemanifest” i „auto”.
+
+ Successfully updated advertising manifests.Pomyślnie zaktualizowano manifesty reklam.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf
index 5b743a470c8e..c5db7d56ba3e 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf
@@ -52,6 +52,11 @@
Falha ao baixar pacotes de atualização de carga de trabalho para o cache: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Argumento "{0}" inválido para o argumento --mode para atualização de carga de trabalho dotnet. Os únicos modos com suporte são "workloadset", "loosemanifest" e "auto".
+
+ Successfully updated advertising manifests.Manifestos de anúncio atualizados com êxito.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf
index 6049ae860032..f65de634659b 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf
@@ -52,6 +52,11 @@
Не удалось скачать пакеты обновления рабочей нагрузки в кэш: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Недопустимый аргумент "{0}" для аргумента --mode для обновления рабочей нагрузки dotnet. Поддерживаются только режимы "workloadset", "loosemanifest" и "auto".
+
+ Successfully updated advertising manifests.Манифесты рекламы успешно обновлены.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf
index fe08c6c5f1b8..6c7f77da9566 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf
@@ -52,6 +52,11 @@
İş yükü güncelleştirme paketleri önbelleğe yüklenemedi: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ Dotnet iş yükü güncelleştirmesi için --mod bağımsız değişkeninde geçersiz "{0}" bağımsız değişkeni. Yalnızca "workloadset", "loosemanifest" ve "auto" modları desteklenir.
+
+ Successfully updated advertising manifests.Reklam bildirimleri başarıyla güncelleştirildi.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf
index 844cad9451c3..3c981c1c23c4 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf
@@ -52,6 +52,11 @@
未能将工作负载更新程序包下载到缓存: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ dotnet 工作负载更新的 --mode 参数的参数“{0}”无效。仅支持“workloadset”、“loosemanifest”和“auto”模式。
+
+ Successfully updated advertising manifests.成功更新广告清单。
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf
index cbde1607649d..20dab178f25e 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf
@@ -52,6 +52,11 @@
無法將工作負載更新套件下載到快取: {0}
+
+ Invalid argument "{0}" to the --mode argument for dotnet workload update. Only supported modes are "workloadset", "loosemanifest", and "auto".
+ dotnet 工作負載更新的 --mode 引數之引數 "{0}" 無效。僅支援 "workloadset"、"loosemanifest" 和 "auto" 模式。
+
+ Successfully updated advertising manifests.已成功更新廣告資訊清單。
diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj
index 847bac7ab3a6..de27955804a3 100644
--- a/src/Cli/dotnet/dotnet.csproj
+++ b/src/Cli/dotnet/dotnet.csproj
@@ -12,6 +12,7 @@
Microsoft.DotNet.Clifalsetrue
+ true
@@ -22,6 +23,7 @@
+
@@ -42,6 +44,7 @@
+
@@ -85,7 +88,7 @@
-
+
@@ -98,6 +101,7 @@
+
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs
index 788943051653..53f397fc840f 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs
@@ -30,7 +30,8 @@ public static void Run(Func logFactory,
string? baselinePackagePath,
string? runtimeGraph,
IReadOnlyDictionary>? packageAssemblyReferences,
- IReadOnlyDictionary>? baselinePackageAssemblyReferences)
+ IReadOnlyDictionary>? baselinePackageAssemblyReferences,
+ string[]? baselinePackageFrameworksToIgnore)
{
// Initialize the service provider
ApiCompatServiceProvider serviceProvider = new(logFactory,
@@ -70,7 +71,8 @@ public static void Run(Func logFactory,
enableStrictMode: enableStrictModeForBaselineValidation,
enqueueApiCompatWorkItems: runApiCompat,
executeApiCompatWorkItems: false,
- baselinePackage: Package.Create(baselinePackagePath, baselinePackageAssemblyReferences)));
+ Package.Create(baselinePackagePath, baselinePackageAssemblyReferences),
+ baselinePackageFrameworksToIgnore));
}
if (runApiCompat)
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/Microsoft.DotNet.ApiCompat.Task.csproj b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/Microsoft.DotNet.ApiCompat.Task.csproj
index 1208d3e51498..b25c6ceeac1c 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/Microsoft.DotNet.ApiCompat.Task.csproj
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/Microsoft.DotNet.ApiCompat.Task.csproj
@@ -1,7 +1,7 @@
- net8.0;net472
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)truetruefalse
@@ -37,7 +37,16 @@
-
+
+
+
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/ValidatePackageTask.cs b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/ValidatePackageTask.cs
index 8fe35a179cf7..7c71e7a28d63 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/ValidatePackageTask.cs
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/ValidatePackageTask.cs
@@ -118,6 +118,12 @@ public class ValidatePackageTask : TaskBase
///
public ITaskItem[]? BaselinePackageAssemblyReferences { get; set; }
+ ///
+ /// A set of target frameworks to ignore from the baseline package.
+ /// The framework string must exactly match the folder name in the baseilne package.
+ ///
+ public string[]? BaselinePackageFrameworksToIgnore { get; set; }
+
public override bool Execute()
{
RoslynResolver roslynResolver = RoslynResolver.Register(RoslynAssembliesPath!);
@@ -153,15 +159,16 @@ protected override void ExecuteCore()
BaselinePackageTargetPath,
RuntimeGraph,
ParsePackageAssemblyReferences(PackageAssemblyReferences),
- ParsePackageAssemblyReferences(BaselinePackageAssemblyReferences));
+ ParsePackageAssemblyReferences(BaselinePackageAssemblyReferences),
+ BaselinePackageFrameworksToIgnore);
}
private static Dictionary>? ParsePackageAssemblyReferences(ITaskItem[]? packageAssemblyReferences)
{
- if (packageAssemblyReferences == null || packageAssemblyReferences.Length == 0)
+ if (packageAssemblyReferences is null || packageAssemblyReferences.Length == 0)
return null;
- Dictionary>? packageAssemblyReferencesDict = new(packageAssemblyReferences.Length);
+ Dictionary> packageAssemblyReferencesDict = new(packageAssemblyReferences.Length);
foreach (ITaskItem taskItem in packageAssemblyReferences)
{
string targetFrameworkMoniker = taskItem.GetMetadata("TargetFrameworkMoniker");
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.Task.targets b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.Task.targets
index 961eea9d33ba..4114fb214b03 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.Task.targets
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.Task.targets
@@ -1,8 +1,10 @@
+
$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.ApiCompat.Task.dll
- $(MSBuildThisFileDirectory)..\tools\net8.0\Microsoft.DotNet.ApiCompat.Task.dll
+ $(MSBuildThisFileDirectory)..\tools\net9.0\Microsoft.DotNet.ApiCompat.Task.dll
+ $(MSBuildThisFileDirectory)..\tools\net8.0\Microsoft.DotNet.ApiCompat.Task.dlltruetrue
@@ -16,4 +18,5 @@
+
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets
index 6d44d7558c91..2b386b274a88 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets
@@ -1,7 +1,7 @@
- $(IntermediateOutputPath)$(MSBuildThisFileName).semaphore
+ <_ApiCompatValidateAssembliesSemaphoreFile>$(IntermediateOutputPath)$(MSBuildThisFileName).semaphore
CollectApiCompatInputs;$(ApiCompatValidateAssembliesDependsOn)
@@ -10,7 +10,7 @@
@(ApiCompatRightAssemblies);
@(ApiCompatSuppressionFile);
$(ApiCompatSuppressionOutputFile)"
- Outputs="$(ApiCompatValidateAssembliesSemaphoreFile)"
+ Outputs="$(_ApiCompatValidateAssembliesSemaphoreFile)"
Condition="'@(ApiCompatLeftAssemblies)' != '' and '@(ApiCompatRightAssemblies)' != ''"
DependsOnTargets="$(ApiCompatValidateAssembliesDependsOn)">
+ SemaphoreFile="$(_ApiCompatValidateAssembliesSemaphoreFile)" />
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Microsoft.DotNet.ApiCompat.Tool.csproj b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Microsoft.DotNet.ApiCompat.Tool.csproj
index c581480deb81..f85dfbb77f37 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Microsoft.DotNet.ApiCompat.Tool.csproj
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Microsoft.DotNet.ApiCompat.Tool.csproj
@@ -1,7 +1,7 @@
- net8.0
+ $(NetToolCurrent)Exetruetrue
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Program.cs b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Program.cs
index b6d0140e9f50..1474f687718f 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Program.cs
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tool/Program.cs
@@ -270,6 +270,12 @@ static int Main(string[] args)
Arity = ArgumentArity.ZeroOrMore,
HelpName = "tfm=file1,file2,..."
};
+ CliOption baselinePackageFrameworksToIgnoreOption = new("--baseline-package-frameworks-to-ignore")
+ {
+ Description = "A set of target frameworks to ignore from the baseline package. The framework string must exactly match the folder name in the baseline package.",
+ AllowMultipleArgumentsPerToken = true,
+ Arity = ArgumentArity.ZeroOrMore,
+ };
CliCommand packageCommand = new("package", "Validates the compatibility of package assets");
packageCommand.Arguments.Add(packageArgument);
@@ -281,6 +287,7 @@ static int Main(string[] args)
packageCommand.Options.Add(baselinePackageOption);
packageCommand.Options.Add(packageAssemblyReferencesOption);
packageCommand.Options.Add(baselinePackageAssemblyReferencesOption);
+ packageCommand.Options.Add(baselinePackageFrameworksToIgnoreOption);
packageCommand.SetAction((ParseResult parseResult) =>
{
// If a roslyn assemblies path isn't provided, use the compiled against version from a subfolder.
@@ -309,6 +316,7 @@ static int Main(string[] args)
string? runtimeGraph = parseResult.GetValue(runtimeGraphOption);
Dictionary>? packageAssemblyReferences = parseResult.GetValue(packageAssemblyReferencesOption);
Dictionary>? baselinePackageAssemblyReferences = parseResult.GetValue(baselinePackageAssemblyReferencesOption);
+ string[]? baselinePackageFrameworksToIgnore = parseResult.GetValue(baselinePackageFrameworksToIgnoreOption);
SuppressibleConsoleLog logFactory(ISuppressionEngine suppressionEngine) => new(suppressionEngine, verbosity);
ValidatePackage.Run(logFactory,
@@ -330,7 +338,8 @@ static int Main(string[] args)
baselinePackage,
runtimeGraph,
packageAssemblyReferences,
- baselinePackageAssemblyReferences);
+ baselinePackageAssemblyReferences,
+ baselinePackageFrameworksToIgnore);
roslynResolver.Unregister();
});
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj
index ce9044e15552..27d5b585b476 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj
@@ -1,7 +1,7 @@
- net8.0;net472
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)$(NoWarn);RS1024
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs
index 5fc59f4441be..8865bf8c0509 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs
@@ -62,7 +62,7 @@ informational message to prevent user errors (i.e. wrong input to the frontend).
leftMetadata,
rightMetadata,
DiagnosticIds.MatchingAssemblyDoesNotExist,
- string.Format(Resources.AssemblyNameDoesNotExist, rightMetadata, left.Identity.Name),
+ string.Format(Resources.AssemblyNameDoesNotExist, left.Identity.Name, rightMetadata),
DifferenceType.Added,
left.Identity.GetDisplayName()));
return;
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj b/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj
index 0b882d49cef2..6e626261e5e3 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj
@@ -1,7 +1,7 @@
- net8.0;net472
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/BaselinePackageValidator.cs b/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/BaselinePackageValidator.cs
index e599ad805bb3..6f3e113862f6 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/BaselinePackageValidator.cs
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/BaselinePackageValidator.cs
@@ -28,9 +28,15 @@ public void Validate(PackageValidatorOption options)
ApiCompatRunnerOptions apiCompatOptions = new(options.EnableStrictMode, isBaselineComparison: true);
- // Iterate over all target frameworks in the package.
foreach (NuGetFramework baselineTargetFramework in options.BaselinePackage.FrameworksInPackage)
{
+ // Skip target frameworks excluded from the baseline package.
+ if (options.BaselinePackageFrameworksToIgnore is not null &&
+ options.BaselinePackageFrameworksToIgnore.Contains(baselineTargetFramework.GetShortFolderName()))
+ {
+ continue;
+ }
+
// Retrieve the compile time assets from the baseline package
IReadOnlyList? baselineCompileAssets = options.BaselinePackage.FindBestCompileAssetForFramework(baselineTargetFramework);
if (baselineCompileAssets != null)
diff --git a/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/PackageValidatorOption.cs b/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/PackageValidatorOption.cs
index d1224551e13a..0ccd34afaea9 100644
--- a/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/PackageValidatorOption.cs
+++ b/src/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation/Validators/PackageValidatorOption.cs
@@ -13,7 +13,8 @@ public readonly struct PackageValidatorOption(Package package,
bool enableStrictMode = false,
bool enqueueApiCompatWorkItems = true,
bool executeApiCompatWorkItems = true,
- Package? baselinePackage = null)
+ Package? baselinePackage = null,
+ string[]? baselinePackageFrameworksToIgnore = null)
{
///
/// The latest package that should be validated.
@@ -39,5 +40,14 @@ public readonly struct PackageValidatorOption(Package package,
/// The baseline package to validate the latest package.
///
public Package? BaselinePackage { get; } = baselinePackage;
+
+ ///
+ /// A set of frameworks to ignore from the baseline package.
+ /// Entries are stored with invariant culture and ignored casing.
+ ///
+ public HashSet? BaselinePackageFrameworksToIgnore { get; } =
+ baselinePackageFrameworksToIgnore is not null ?
+ new HashSet(baselinePackageFrameworksToIgnore, StringComparer.InvariantCultureIgnoreCase) :
+ null;
}
}
diff --git a/src/Compatibility/ApiCompat/apicompat.slnf b/src/Compatibility/ApiCompat/apicompat.slnf
index 5d7c737d22f6..620623b90d3e 100644
--- a/src/Compatibility/ApiCompat/apicompat.slnf
+++ b/src/Compatibility/ApiCompat/apicompat.slnf
@@ -11,12 +11,12 @@
"src\\Compatibility\\ApiCompat\\Microsoft.DotNet.PackageValidation\\Microsoft.DotNet.PackageValidation.csproj",
"src\\Compatibility\\Microsoft.DotNet.ApiSymbolExtensions\\Microsoft.DotNet.ApiSymbolExtensions.csproj",
"src\\Layout\\toolset-tasks\\toolset-tasks.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiCompat.IntegrationTests\\Microsoft.DotNet.ApiCompat.IntegrationTests.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiCompat.Tests\\Microsoft.DotNet.ApiCompat.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiCompatibility.Tests\\Microsoft.DotNet.ApiCompatibility.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.PackageValidation.Tests\\Microsoft.DotNet.PackageValidation.Tests.csproj",
- "src\\Tests\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj"
+ "test\\Microsoft.DotNet.ApiCompat.IntegrationTests\\Microsoft.DotNet.ApiCompat.IntegrationTests.csproj",
+ "test\\Microsoft.DotNet.ApiCompat.Tests\\Microsoft.DotNet.ApiCompat.Tests.csproj",
+ "test\\Microsoft.DotNet.ApiCompatibility.Tests\\Microsoft.DotNet.ApiCompatibility.Tests.csproj",
+ "test\\Microsoft.DotNet.ApiSymbolExtensions.Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj",
+ "test\\Microsoft.DotNet.PackageValidation.Tests\\Microsoft.DotNet.PackageValidation.Tests.csproj",
+ "test\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj"
]
}
}
\ No newline at end of file
diff --git a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/Microsoft.DotNet.GenAPI.Task.csproj b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/Microsoft.DotNet.GenAPI.Task.csproj
index 4a2daf6b28ae..0ab12d1c48d0 100644
--- a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/Microsoft.DotNet.GenAPI.Task.csproj
+++ b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/Microsoft.DotNet.GenAPI.Task.csproj
@@ -1,7 +1,7 @@
- net8.0;net472
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)truefalsetrue
diff --git a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/build/Microsoft.DotNet.GenAPI.Task.targets b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/build/Microsoft.DotNet.GenAPI.Task.targets
index 44e8249f90a7..e779b7363060 100644
--- a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/build/Microsoft.DotNet.GenAPI.Task.targets
+++ b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/build/Microsoft.DotNet.GenAPI.Task.targets
@@ -3,8 +3,8 @@
$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.GenAPI.Task.dll
- $(MSBuildThisFileDirectory)..\tools\net8.0\Microsoft.DotNet.GenAPI.Task.dll
- $(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.DotNet.GenAPI.Task.dll
+ $(MSBuildThisFileDirectory)..\tools\net9.0\Microsoft.DotNet.GenAPI.Task.dll
+ $(MSBuildThisFileDirectory)..\tools\net8.0\Microsoft.DotNet.GenAPI.Task.dll
diff --git a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tool/Microsoft.DotNet.GenAPI.Tool.csproj b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tool/Microsoft.DotNet.GenAPI.Tool.csproj
index 4196899f5310..cd3b868e0762 100644
--- a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tool/Microsoft.DotNet.GenAPI.Tool.csproj
+++ b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tool/Microsoft.DotNet.GenAPI.Tool.csproj
@@ -1,7 +1,7 @@
- net8.0
+ $(NetToolCurrent)Exetruetrue
diff --git a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj
index c2aced225987..c4248d040fdd 100644
--- a/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj
+++ b/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj
@@ -1,7 +1,7 @@
- net8.0;net472
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
diff --git a/src/Compatibility/GenAPI/genapi.slnf b/src/Compatibility/GenAPI/genapi.slnf
index 430676a5e1ff..aa944adf090d 100644
--- a/src/Compatibility/GenAPI/genapi.slnf
+++ b/src/Compatibility/GenAPI/genapi.slnf
@@ -9,9 +9,9 @@
"src\\Compatibility\\GenAPI\\Microsoft.DotNet.GenAPI\\Microsoft.DotNet.GenAPI.csproj",
"src\\Compatibility\\Microsoft.DotNet.ApiSymbolExtensions\\Microsoft.DotNet.ApiSymbolExtensions.csproj",
"src\\Layout\\toolset-tasks\\toolset-tasks.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.GenAPI.Tests\\Microsoft.DotNet.GenAPI.Tests.csproj",
- "src\\Tests\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj"
+ "test\\Microsoft.DotNet.ApiSymbolExtensions.Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj",
+ "test\\Microsoft.DotNet.GenAPI.Tests\\Microsoft.DotNet.GenAPI.Tests.csproj",
+ "test\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj"
]
}
}
\ No newline at end of file
diff --git a/src/Compatibility/Microsoft.DotNet.ApiSymbolExtensions/Microsoft.DotNet.ApiSymbolExtensions.csproj b/src/Compatibility/Microsoft.DotNet.ApiSymbolExtensions/Microsoft.DotNet.ApiSymbolExtensions.csproj
index b92ffd1ef125..77eacae3cd31 100644
--- a/src/Compatibility/Microsoft.DotNet.ApiSymbolExtensions/Microsoft.DotNet.ApiSymbolExtensions.csproj
+++ b/src/Compatibility/Microsoft.DotNet.ApiSymbolExtensions/Microsoft.DotNet.ApiSymbolExtensions.csproj
@@ -1,10 +1,10 @@
- net8.0;net472
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
-
+
$(DefaultItemExcludes);Logging\MSBuildLog.cs
diff --git a/src/Compatibility/compatibility.slnf b/src/Compatibility/compatibility.slnf
index 8f227c881b9e..ab10435bc0e9 100644
--- a/src/Compatibility/compatibility.slnf
+++ b/src/Compatibility/compatibility.slnf
@@ -13,13 +13,13 @@
"src\\Compatibility\\GenAPI\\Microsoft.DotNet.GenAPI.Tool\\Microsoft.DotNet.GenAPI.Tool.csproj",
"src\\Compatibility\\GenAPI\\Microsoft.DotNet.GenAPI\\Microsoft.DotNet.GenAPI.csproj",
"src\\Compatibility\\Microsoft.DotNet.ApiSymbolExtensions\\Microsoft.DotNet.ApiSymbolExtensions.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiCompat.IntegrationTests\\Microsoft.DotNet.ApiCompat.IntegrationTests.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiCompat.Tests\\Microsoft.DotNet.ApiCompat.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiCompatibility.Tests\\Microsoft.DotNet.ApiCompatibility.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.GenAPI.Tests\\Microsoft.DotNet.GenAPI.Tests.csproj",
- "src\\Tests\\Microsoft.DotNet.PackageValidation.Tests\\Microsoft.DotNet.PackageValidation.Tests.csproj",
- "src\\Tests\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj"
+ "test\\Microsoft.DotNet.ApiCompat.IntegrationTests\\Microsoft.DotNet.ApiCompat.IntegrationTests.csproj",
+ "test\\Microsoft.DotNet.ApiCompat.Tests\\Microsoft.DotNet.ApiCompat.Tests.csproj",
+ "test\\Microsoft.DotNet.ApiCompatibility.Tests\\Microsoft.DotNet.ApiCompatibility.Tests.csproj",
+ "test\\Microsoft.DotNet.ApiSymbolExtensions.Tests\\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj",
+ "test\\Microsoft.DotNet.GenAPI.Tests\\Microsoft.DotNet.GenAPI.Tests.csproj",
+ "test\\Microsoft.DotNet.PackageValidation.Tests\\Microsoft.DotNet.PackageValidation.Tests.csproj",
+ "test\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj"
]
}
}
\ No newline at end of file
diff --git a/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs b/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs
index f070555a1b01..10ff6c46a554 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs
@@ -31,6 +31,8 @@ internal sealed partial class AuthHandshakeMessageHandler : DelegatingHandler
/// Valid characters for this clientID are in the unicode range 20-7E
///
private const string ClientID = "netsdkcontainers";
+ private const string BasicAuthScheme = "Basic";
+ private const string BearerAuthScheme = "Bearer";
private sealed record AuthInfo(string Realm, string? Service, string? Scope);
@@ -62,18 +64,28 @@ private static bool TryParseAuthenticationInfo(HttpResponseMessage msg, [NotNull
}
AuthenticationHeaderValue header = authenticateHeader.First();
- if (header is { Scheme: "Bearer" or "Basic", Parameter: string bearerArgs })
+
+ if (header.Scheme is not null)
{
scheme = header.Scheme;
- var keyValues = ParseBearerArgs(bearerArgs);
+ var keyValues = ParseBearerArgs(header.Parameter);
+ if (keyValues is null)
+ {
+ return false;
+ }
- var result = scheme switch
+ if (header.Scheme.Equals(BasicAuthScheme, StringComparison.OrdinalIgnoreCase))
+ {
+ return TryParseBasicAuthInfo(keyValues, msg.RequestMessage!.RequestUri!, out bearerAuthInfo);
+ }
+ else if (header.Scheme.Equals(BearerAuthScheme, StringComparison.OrdinalIgnoreCase))
+ {
+ return TryParseBearerAuthInfo(keyValues, out bearerAuthInfo);
+ }
+ else
{
- "Bearer" => TryParseBearerAuthInfo(keyValues, out bearerAuthInfo),
- "Basic" => TryParseBasicAuthInfo(keyValues, msg.RequestMessage!.RequestUri!, out bearerAuthInfo),
- _ => false
- };
- return result;
+ return false;
+ }
}
return false;
@@ -101,8 +113,12 @@ static bool TryParseBasicAuthInfo(Dictionary authValues, Uri req
return true;
}
- static Dictionary ParseBearerArgs(string bearerHeaderArgs)
+ static Dictionary? ParseBearerArgs(string? bearerHeaderArgs)
{
+ if (bearerHeaderArgs is null)
+ {
+ return null;
+ }
Dictionary keyValues = new();
foreach (Match match in BearerParameterSplitter().Matches(bearerHeaderArgs))
{
@@ -121,10 +137,12 @@ static Dictionary ParseBearerArgs(string bearerHeaderArgs)
private sealed record TokenResponse(string? token, string? access_token, int? expires_in, DateTimeOffset? issued_at)
{
public string ResolvedToken => token ?? access_token ?? throw new ArgumentException(Resource.GetString(nameof(Strings.InvalidTokenResponse)));
- public DateTimeOffset ResolvedExpiration {
- get {
- var issueTime = issued_at ?? DateTimeOffset.UtcNow; // per spec, if no issued_at use the current time
- var validityDuration = expires_in ?? 60; // per spec, if no expires_in use 60 seconds
+ public DateTimeOffset ResolvedExpiration
+ {
+ get
+ {
+ var issueTime = this.issued_at ?? DateTimeOffset.UtcNow; // per spec, if no issued_at use the current time
+ var validityDuration = this.expires_in ?? 60; // per spec, if no expires_in use 60 seconds
var expirationTime = issueTime.AddSeconds(validityDuration);
return expirationTime;
}
@@ -154,12 +172,12 @@ public DateTimeOffset ResolvedExpiration {
privateRepoCreds = await GetLoginCredentials(registry).ConfigureAwait(false);
}
- if (scheme is "Basic")
+ if (scheme.Equals(BasicAuthScheme, StringComparison.OrdinalIgnoreCase))
{
- var authValue = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}")));
- return new (authValue, DateTimeOffset.MaxValue);
+ var authValue = new AuthenticationHeaderValue(BasicAuthScheme, Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}")));
+ return new(authValue, DateTimeOffset.MaxValue);
}
- else if (scheme is "Bearer")
+ else if (scheme.Equals(BearerAuthScheme, StringComparison.OrdinalIgnoreCase))
{
Debug.Assert(bearerAuthInfo is not null);
@@ -226,7 +244,7 @@ public DateTimeOffset ResolvedExpiration {
TokenResponse? tokenResponse = JsonSerializer.Deserialize(postResponse.Content.ReadAsStream(cancellationToken));
if (tokenResponse is { } tokenEnvelope)
{
- var authValue = new AuthenticationHeaderValue("Bearer", tokenResponse.ResolvedToken);
+ var authValue = new AuthenticationHeaderValue(BearerAuthScheme, tokenResponse.ResolvedToken);
return (authValue, tokenResponse.ResolvedExpiration);
}
else
@@ -242,39 +260,39 @@ public DateTimeOffset ResolvedExpiration {
///
private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryTokenGetAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, CancellationToken cancellationToken)
{
- // this doesn't seem to be called out in the spec, but actual username/password auth information should be converted into Basic auth here,
- // even though the overall Scheme we're authenticating for is Bearer
- var header = privateRepoCreds.Username == ""
- ? new AuthenticationHeaderValue("Bearer", privateRepoCreds.Password)
- : new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}")));
- var builder = new UriBuilder(new Uri(bearerAuthInfo.Realm));
-
- _logger.LogTrace("Attempting to authenticate on {uri} using GET.", bearerAuthInfo.Realm);
- var queryDict = System.Web.HttpUtility.ParseQueryString("");
- if (bearerAuthInfo.Service is string svc)
- {
- queryDict["service"] = svc;
- }
- if (bearerAuthInfo.Scope is string s)
- {
- queryDict["scope"] = s;
- }
- builder.Query = queryDict.ToString();
- var message = new HttpRequestMessage(HttpMethod.Get, builder.ToString());
- message.Headers.Authorization = header;
+ // this doesn't seem to be called out in the spec, but actual username/password auth information should be converted into Basic auth here,
+ // even though the overall Scheme we're authenticating for is Bearer
+ var header = privateRepoCreds.Username == ""
+ ? new AuthenticationHeaderValue(BearerAuthScheme, privateRepoCreds.Password)
+ : new AuthenticationHeaderValue(BasicAuthScheme, Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}")));
+ var builder = new UriBuilder(new Uri(bearerAuthInfo.Realm));
+
+ _logger.LogTrace("Attempting to authenticate on {uri} using GET.", bearerAuthInfo.Realm);
+ var queryDict = System.Web.HttpUtility.ParseQueryString("");
+ if (bearerAuthInfo.Service is string svc)
+ {
+ queryDict["service"] = svc;
+ }
+ if (bearerAuthInfo.Scope is string s)
+ {
+ queryDict["scope"] = s;
+ }
+ builder.Query = queryDict.ToString();
+ var message = new HttpRequestMessage(HttpMethod.Get, builder.ToString());
+ message.Headers.Authorization = header;
- using var tokenResponse = await base.SendAsync(message, cancellationToken).ConfigureAwait(false);
- if (!tokenResponse.IsSuccessStatusCode)
- {
- throw new UnableToAccessRepositoryException(_registryName);
- }
+ using var tokenResponse = await base.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ if (!tokenResponse.IsSuccessStatusCode)
+ {
+ throw new UnableToAccessRepositoryException(_registryName);
+ }
- TokenResponse? token = JsonSerializer.Deserialize(tokenResponse.Content.ReadAsStream(cancellationToken));
- if (token is null)
- {
- throw new ArgumentException(Resource.GetString(nameof(Strings.CouldntDeserializeJsonToken)));
- }
- return (new AuthenticationHeaderValue("Bearer", token.ResolvedToken), token.ResolvedExpiration);
+ TokenResponse? token = JsonSerializer.Deserialize(tokenResponse.Content.ReadAsStream(cancellationToken));
+ if (token is null)
+ {
+ throw new ArgumentException(Resource.GetString(nameof(Strings.CouldntDeserializeJsonToken)));
+ }
+ return (new AuthenticationHeaderValue(BearerAuthScheme, token.ResolvedToken), token.ResolvedExpiration);
}
private static async Task GetLoginCredentials(string registry)
diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs
index ec546487ed62..4a0ae6848596 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs
@@ -59,11 +59,12 @@ public static async Task ContainerizeAsync(
{
try
{
+ var ridGraphPicker = new RidGraphManifestPicker(ridGraphPath);
imageBuilder = await registry.GetImageManifestAsync(
baseImageName,
baseImageTag,
containerRuntimeIdentifier,
- ridGraphPath,
+ ridGraphPicker,
cancellationToken).ConfigureAwait(false);
}
catch (RepositoryNotFoundException)
diff --git a/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs
index 532717340f4f..8b1834caa6b3 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs
@@ -110,7 +110,7 @@ internal void AddLayer(Layer l)
///
/// Sets the USER for the image.
///
- internal void SetUser(string user) => _baseImageConfig.SetUser(user);
+ internal void SetUser(string user, bool isExplicitUserInteraction = true) => _baseImageConfig.SetUser(user, isExplicitUserInteraction);
internal static (string[] entrypoint, string[] cmd) DetermineEntrypointAndCmd(
string[] entrypoint,
@@ -227,7 +227,7 @@ internal void AssignUserFromEnvironment()
if (_baseImageConfig.EnvironmentVariables.TryGetValue(EnvironmentVariables.APP_UID, out string? appUid))
{
_logger.LogTrace("Setting user from APP_UID environment variable");
- SetUser(appUid);
+ SetUser(appUid, isExplicitUserInteraction: false);
}
}
@@ -237,8 +237,27 @@ internal void AssignUserFromEnvironment()
///
internal void AssignPortsFromEnvironment()
{
- // asp.net images control port bindings via three environment variables. we should check for those variables and ensure that ports are created for them
+ // asp.net images control port bindings via three environment variables. we should check for those variables and ensure that ports are created for them.
+ // precendence is captured at https://github.com/dotnet/aspnetcore/blob/f49c1c7f7467c184ffb630086afac447772096c6/src/Hosting/Hosting/src/GenericHost/GenericWebHostService.cs#L68-L119
+ // ASPNETCORE_URLS is the most specific and is the only one used if present, followed by ASPNETCORE_HTTPS_PORT and ASPNETCORE_HTTP_PORT together
+ // https://learn.microsoft.com//aspnet/core/fundamentals/host/web-host?view=aspnetcore-8.0#server-urls - the format of ASPNETCORE_URLS has been stable for many years now
+ if (_baseImageConfig.EnvironmentVariables.TryGetValue(EnvironmentVariables.ASPNETCORE_URLS, out string? urls))
+ {
+ foreach (var url in Split(urls))
+ {
+ _logger.LogTrace("Setting ports from ASPNETCORE_URLS environment variable");
+ var match = aspnetPortRegex.Match(url);
+ if (match.Success && int.TryParse(match.Groups["port"].Value, out int port))
+ {
+ _logger.LogTrace("Added port {port}", port);
+ ExposePort(port, PortType.tcp);
+ }
+ }
+ return; // we're done here - ASPNETCORE_URLS is the most specific and overrides the other two
+ }
+
+ // port-specific
// https://learn.microsoft.com/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-8.0#specify-ports-only - new for .NET 8 - allows just changing port(s) easily
if (_baseImageConfig.EnvironmentVariables.TryGetValue(EnvironmentVariables.ASPNETCORE_HTTP_PORTS, out string? httpPorts))
{
@@ -274,21 +293,6 @@ internal void AssignPortsFromEnvironment()
}
}
- // https://learn.microsoft.com//aspnet/core/fundamentals/host/web-host?view=aspnetcore-8.0#server-urls - the format of ASPNETCORE_URLS has been stable for many years now
- if (_baseImageConfig.EnvironmentVariables.TryGetValue(EnvironmentVariables.ASPNETCORE_URLS, out string? urls))
- {
- foreach (var url in Split(urls))
- {
- _logger.LogTrace("Setting ports from ASPNETCORE_URLS environment variable");
- var match = aspnetPortRegex.Match(url);
- if (match.Success && int.TryParse(match.Groups["port"].Value, out int port))
- {
- _logger.LogTrace("Added port {port}", port);
- ExposePort(port, PortType.tcp);
- }
- }
- }
-
static string[] Split(string input)
{
return input.Split(';', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
diff --git a/src/Containers/Microsoft.NET.Build.Containers/ImageConfig.cs b/src/Containers/Microsoft.NET.Build.Containers/ImageConfig.cs
index 4dbec524a217..d16563c052db 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/ImageConfig.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/ImageConfig.cs
@@ -20,6 +20,7 @@ internal sealed class ImageConfig
private string[]? _newEntrypoint;
private string[]? _newCmd;
private string? _user;
+ private bool _userHasBeenExplicitlySet;
///
/// Models the file system of the image. Typically has a key 'type' with value 'layers' and a key 'diff_ids' with a list of layer digests.
@@ -216,7 +217,16 @@ internal void AddLayer(Layer l)
_rootFsLayers.Add(l.Descriptor.UncompressedDigest!);
}
- internal void SetUser(string user) => _user = user;
+ internal void SetUser(string user, bool isUserInteraction = false) {
+ // we don't let automatic/inferred user settings overwrite an explicit user request
+ if (_userHasBeenExplicitlySet && !isUserInteraction)
+ {
+ return;
+ }
+
+ _user = user;
+ _userHasBeenExplicitlySet = isUserInteraction;
+ }
private HashSet GetExposedPorts()
{
diff --git a/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs b/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs
index 2580a4238175..466619a63f8e 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs
@@ -25,7 +25,6 @@ public static class Properties
public static readonly string ContainerEnvironmentVariable = nameof(ContainerEnvironmentVariable);
public static readonly string ComputeContainerBaseImage = nameof(ComputeContainerBaseImage);
- public static readonly string _ComputeContainerBaseImageTag = nameof(_ComputeContainerBaseImageTag);
public static readonly string ComputeContainerConfig = nameof(ComputeContainerConfig);
public static readonly string AssemblyName = nameof(AssemblyName);
public static readonly string ContainerBaseRegistry = nameof(ContainerBaseRegistry);
@@ -35,6 +34,10 @@ public static class Properties
public static readonly string ContainerGenerateLabels = nameof(ContainerGenerateLabels);
public static readonly string ContainerRuntimeIdentifier = nameof(ContainerRuntimeIdentifier);
+ public static readonly string RuntimeIdentifier = nameof(RuntimeIdentifier);
+ public static readonly string PublishAot = nameof(PublishAot);
+ public static readonly string PublishSelfContained = nameof(PublishSelfContained);
+ public static readonly string InvariantGlobalization = nameof(InvariantGlobalization);
}
public static class ErrorCodes
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj b/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj
index 3142bdd1eaf1..6d7041c4c4f5 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj
+++ b/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj
@@ -47,7 +47,7 @@
-
+
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 49ce9afe58c0..89caa7583181 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
@@ -21,15 +21,6 @@ override Microsoft.NET.Build.Containers.Port.GetHashCode() -> int
Microsoft.NET.Build.Containers.PortType
Microsoft.NET.Build.Containers.PortType.tcp = 0 -> Microsoft.NET.Build.Containers.PortType
Microsoft.NET.Build.Containers.PortType.udp = 1 -> Microsoft.NET.Build.Containers.PortType
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ComputedBaseImageTag.get -> string?
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ComputeDotnetBaseImageTag() -> void
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ContainerFamily.get -> string!
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ContainerFamily.set -> void
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.SdkVersion.get -> string!
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.SdkVersion.set -> void
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.TargetFrameworkVersion.get -> string!
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.TargetFrameworkVersion.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.set -> void
@@ -86,7 +77,6 @@ Microsoft.NET.Build.Containers.Tasks.CreateNewImage.RuntimeIdentifierGraphPath.g
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.RuntimeIdentifierGraphPath.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.WorkingDirectory.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.WorkingDirectory.set -> void
-override Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.Execute() -> bool
override Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ToolName.get -> string!
override Microsoft.NET.Build.Containers.Tasks.CreateNewImage.GenerateCommandLineCommands() -> string!
override Microsoft.NET.Build.Containers.Tasks.CreateNewImage.GenerateFullPathToTool() -> string!
@@ -115,3 +105,23 @@ Microsoft.NET.Build.Containers.Tasks.ParseContainerProperties.ParsedContainerTag
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
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ComputedContainerBaseImage.get -> string?
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.FrameworkReferences.get -> Microsoft.Build.Framework.ITaskItem![]!
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.FrameworkReferences.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsAotPublished.get -> bool
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsAotPublished.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsSelfContained.get -> bool
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsSelfContained.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.TargetRuntimeIdentifier.get -> string!
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.TargetRuntimeIdentifier.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.UsesInvariantGlobalization.get -> bool
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.UsesInvariantGlobalization.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ComputeDotnetBaseImageAndTag() -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ContainerFamily.get -> string!
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ContainerFamily.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.SdkVersion.get -> string!
+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
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 9b5a7e701d2d..3b6d27ca2c1e 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
@@ -2,7 +2,17 @@
const Microsoft.NET.Build.Containers.KnownLocalRegistryTypes.Podman = "Podman" -> string!
Microsoft.NET.Build.Containers.BaseImageNotFoundException
Microsoft.NET.Build.Containers.Constants
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ComputeDotnetBaseImageTag() -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ComputedContainerBaseImage.get -> string?
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.FrameworkReferences.get -> Microsoft.Build.Framework.ITaskItem![]!
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.FrameworkReferences.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsAotPublished.get -> bool
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsAotPublished.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsSelfContained.get -> bool
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.IsSelfContained.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.TargetRuntimeIdentifier.get -> string!
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.TargetRuntimeIdentifier.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.UsesInvariantGlobalization.get -> bool
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.UsesInvariantGlobalization.set -> void
static Microsoft.NET.Build.Containers.ContainerBuilder.ContainerizeAsync(System.IO.DirectoryInfo! publishDirectory, string! workingDir, string! baseRegistry, string! baseImageName, string! baseImageTag, string![]! entrypoint, string![]! entrypointArgs, string![]! defaultArgs, string![]! appCommand, string![]! appCommandArgs, string! appCommandInstruction, string! imageName, string![]! imageTags, string? outputRegistry, System.Collections.Generic.Dictionary! labels, Microsoft.NET.Build.Containers.Port[]? exposedPorts, System.Collections.Generic.Dictionary! envVars, string! containerRuntimeIdentifier, string! ridGraphPath, string! localRegistry, string? containerUser, string? archiveOutputPath, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
static readonly Microsoft.NET.Build.Containers.Constants.Version -> string!
Microsoft.NET.Build.Containers.ContainerBuilder
@@ -111,14 +121,15 @@ override Microsoft.NET.Build.Containers.Port.GetHashCode() -> int
Microsoft.NET.Build.Containers.PortType
Microsoft.NET.Build.Containers.PortType.tcp = 0 -> Microsoft.NET.Build.Containers.PortType
Microsoft.NET.Build.Containers.PortType.udp = 1 -> Microsoft.NET.Build.Containers.PortType
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ContainerFamily.get -> string!
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ContainerFamily.set -> void
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.SdkVersion.get -> string!
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.SdkVersion.set -> void
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.TargetFrameworkVersion.get -> string!
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.TargetFrameworkVersion.set -> void
-Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.ComputedBaseImageTag.get -> string?
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ComputeDotnetBaseImageAndTag() -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ContainerFamily.get -> string!
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.ContainerFamily.set -> void
+Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.SdkVersion.get -> string!
+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
Microsoft.NET.Build.Containers.Tasks.CreateNewImage
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseImageName.set -> void
@@ -202,7 +213,6 @@ 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!
-override Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageTag.Execute() -> bool
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
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultBlobOperations.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultBlobOperations.cs
index fd5898fedd59..d258ebfc0886 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultBlobOperations.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultBlobOperations.cs
@@ -36,7 +36,7 @@ public async Task ExistsAsync(string repositoryName, string digest, Cancel
{
HttpStatusCode.OK => true,
HttpStatusCode.NotFound => false,
- HttpStatusCode.Unauthorized => throw new UnableToAccessRepositoryException(_registryName, repositoryName),
+ HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden => throw new UnableToAccessRepositoryException(_registryName, repositoryName),
_ => await LogAndThrowContainerHttpException(response, cancellationToken).ConfigureAwait(false)
};
}
@@ -68,7 +68,7 @@ private async Task GetAsync(string repositoryName, string d
return response.StatusCode switch
{
HttpStatusCode.OK => response,
- HttpStatusCode.Unauthorized => throw new UnableToAccessRepositoryException(_registryName, repositoryName),
+ HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden => throw new UnableToAccessRepositoryException(_registryName, repositoryName),
_ => await LogAndThrowContainerHttpException(response, cancellationToken).ConfigureAwait(false)
};
}
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs
index 55cf8bf93b6f..c34426d10af3 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs
@@ -33,7 +33,7 @@ public async Task GetAsync(string repositoryName, string re
{
HttpStatusCode.OK => response,
HttpStatusCode.NotFound => throw new RepositoryNotFoundException(_registryName, repositoryName, reference),
- HttpStatusCode.Unauthorized => throw new UnableToAccessRepositoryException(_registryName, repositoryName),
+ HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden => throw new UnableToAccessRepositoryException(_registryName, repositoryName),
_ => await LogAndThrowContainerHttpException(response, cancellationToken).ConfigureAwait(false)
};
}
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs
index e83a4da029b3..22d4d333c4bf 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs
@@ -30,7 +30,10 @@ internal DefaultRegistryAPI(string registryName, Uri baseUri, ILogger logger)
private static HttpClient CreateClient(string registryName, Uri baseUri, ILogger logger, bool isAmazonECRRegistry = false)
{
- var innerHandler = new SocketsHttpHandler();
+ var innerHandler = new SocketsHttpHandler()
+ {
+ UseCookies = false,
+ };
// Ignore certificate for https localhost repository.
if (baseUri.Host == "localhost" && baseUri.Scheme == "https")
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs
index 4530c43314bb..79656b92e83e 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs
@@ -4,12 +4,52 @@
using System.Diagnostics;
using System.Net.Http.Json;
using System.Text.Json.Nodes;
+using System.Text.RegularExpressions;
using Microsoft.Extensions.Logging;
using Microsoft.NET.Build.Containers.Resources;
using NuGet.RuntimeModel;
namespace Microsoft.NET.Build.Containers;
+internal interface IManifestPicker {
+ public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier);
+}
+
+internal sealed class RidGraphManifestPicker : IManifestPicker
+{
+ private readonly RuntimeGraph _runtimeGraph;
+
+ public RidGraphManifestPicker(string runtimeIdentifierGraphPath)
+ {
+ _runtimeGraph = GetRuntimeGraphForDotNet(runtimeIdentifierGraphPath);
+ }
+ public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary ridManifestDict, string runtimeIdentifier)
+ {
+ var bestManifestRid = GetBestMatchingRid(_runtimeGraph, runtimeIdentifier, ridManifestDict.Keys);
+ if (bestManifestRid is null) {
+ return null;
+ }
+ return ridManifestDict[bestManifestRid];
+ }
+
+ private static string? GetBestMatchingRid(RuntimeGraph runtimeGraph, string runtimeIdentifier, IEnumerable availableRuntimeIdentifiers)
+ {
+ HashSet availableRids = new HashSet(availableRuntimeIdentifiers, StringComparer.Ordinal);
+ foreach (var candidateRuntimeIdentifier in runtimeGraph.ExpandRuntime(runtimeIdentifier))
+ {
+ if (availableRids.Contains(candidateRuntimeIdentifier))
+ {
+ return candidateRuntimeIdentifier;
+ }
+ }
+
+ return null;
+ }
+
+ private static RuntimeGraph GetRuntimeGraphForDotNet(string ridGraphPath) => JsonRuntimeFormat.ReadRuntimeGraph(ridGraphPath);
+
+}
+
internal sealed class Registry
{
private const string DockerHubRegistry1 = "registry-1.docker.io";
@@ -103,7 +143,7 @@ public bool IsGoogleArtifactRegistry
///
private bool SupportsParallelUploads => !IsAmazonECRRegistry && _settings.ParallelUploadEnabled;
- public async Task GetImageManifestAsync(string repositoryName, string reference, string runtimeIdentifier, string runtimeIdentifierGraphPath, CancellationToken cancellationToken)
+ public async Task GetImageManifestAsync(string repositoryName, string reference, string runtimeIdentifier, IManifestPicker manifestPicker, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
using HttpResponseMessage initialManifestResponse = await _registryAPI.Manifest.GetAsync(repositoryName, reference, cancellationToken).ConfigureAwait(false);
@@ -119,7 +159,7 @@ await initialManifestResponse.Content.ReadFromJsonAsync(cancellation
reference,
await initialManifestResponse.Content.ReadFromJsonAsync(cancellationToken: cancellationToken).ConfigureAwait(false),
runtimeIdentifier,
- runtimeIdentifierGraphPath,
+ manifestPicker,
cancellationToken).ConfigureAwait(false),
var unknownMediaType => throw new NotImplementedException(Resource.FormatString(
nameof(Strings.UnknownMediaType),
@@ -130,6 +170,18 @@ await initialManifestResponse.Content.ReadFromJsonAsync(cancella
};
}
+ internal async Task GetManifestListAsync(string repositoryName, string reference, CancellationToken cancellationToken)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ using HttpResponseMessage initialManifestResponse = await _registryAPI.Manifest.GetAsync(repositoryName, reference, cancellationToken).ConfigureAwait(false);
+
+ return initialManifestResponse.Content.Headers.ContentType?.MediaType switch
+ {
+ SchemaTypes.DockerManifestListV2 => await initialManifestResponse.Content.ReadFromJsonAsync(cancellationToken: cancellationToken).ConfigureAwait(false),
+ _ => null
+ };
+ }
+
private async Task ReadSingleImageAsync(string repositoryName, ManifestV2 manifest, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -142,34 +194,8 @@ private async Task ReadSingleImageAsync(string repositoryName, Man
return new ImageBuilder(manifest, new ImageConfig(configDoc), _logger);
}
- private async Task PickBestImageFromManifestListAsync(
- string repositoryName,
- string reference,
- ManifestListV2 manifestList,
- string runtimeIdentifier,
- string runtimeIdentifierGraphPath,
- CancellationToken cancellationToken)
- {
- cancellationToken.ThrowIfCancellationRequested();
- var runtimeGraph = GetRuntimeGraphForDotNet(runtimeIdentifierGraphPath);
- var ridManifestDict = GetManifestsByRid(manifestList);
- var bestManifestRid = GetBestMatchingRid(runtimeGraph, runtimeIdentifier, ridManifestDict.Keys);
- if (bestManifestRid is null)
- {
- throw new BaseImageNotFoundException(runtimeIdentifier, repositoryName, reference, ridManifestDict.Keys);
- }
- PlatformSpecificManifest matchingManifest = ridManifestDict[bestManifestRid];
- using HttpResponseMessage manifestResponse = await _registryAPI.Manifest.GetAsync(repositoryName, matchingManifest.digest, cancellationToken).ConfigureAwait(false);
-
- cancellationToken.ThrowIfCancellationRequested();
-
- return await ReadSingleImageAsync(
- repositoryName,
- await manifestResponse.Content.ReadFromJsonAsync(cancellationToken: cancellationToken).ConfigureAwait(false),
- cancellationToken).ConfigureAwait(false);
- }
-
- IReadOnlyDictionary GetManifestsByRid(ManifestListV2 manifestList)
+
+ private static IReadOnlyDictionary GetManifestsByRid(ManifestListV2 manifestList)
{
var ridDict = new Dictionary();
foreach (var manifest in manifestList.manifests)
@@ -182,21 +208,7 @@ IReadOnlyDictionary GetManifestsByRid(Manifest
return ridDict;
}
-
- private static string? GetBestMatchingRid(RuntimeGraph runtimeGraph, string runtimeIdentifier, IEnumerable availableRuntimeIdentifiers)
- {
- HashSet availableRids = new(availableRuntimeIdentifiers, StringComparer.Ordinal);
- foreach (var candidateRuntimeIdentifier in runtimeGraph.ExpandRuntime(runtimeIdentifier))
- {
- if (availableRids.Contains(candidateRuntimeIdentifier))
- {
- return candidateRuntimeIdentifier;
- }
- }
-
- return null;
- }
-
+
private static string? CreateRidForPlatform(PlatformInformation platform)
{
// we only support linux and windows containers explicitly, so anything else we should skip past.
@@ -221,6 +233,7 @@ IReadOnlyDictionary GetManifestsByRid(Manifest
"arm64" => "arm64",
"ppc64le" => "ppc64le",
"s390x" => "s390x",
+ "riscv64" => "riscv64",
_ => null
};
@@ -228,7 +241,32 @@ IReadOnlyDictionary GetManifestsByRid(Manifest
return $"{osPart}{versionPart ?? ""}-{platformPart}";
}
- private static RuntimeGraph GetRuntimeGraphForDotNet(string ridGraphPath) => JsonRuntimeFormat.ReadRuntimeGraph(ridGraphPath);
+
+ private async Task PickBestImageFromManifestListAsync(
+ string repositoryName,
+ string reference,
+ ManifestListV2 manifestList,
+ string runtimeIdentifier,
+ IManifestPicker manifestPicker,
+ CancellationToken cancellationToken)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ var ridManifestDict = GetManifestsByRid(manifestList);
+ if (manifestPicker.PickBestManifestForRid(ridManifestDict, runtimeIdentifier) is PlatformSpecificManifest matchingManifest)
+ {
+ using HttpResponseMessage manifestResponse = await _registryAPI.Manifest.GetAsync(repositoryName, matchingManifest.digest, cancellationToken).ConfigureAwait(false);
+
+ cancellationToken.ThrowIfCancellationRequested();
+
+ return await ReadSingleImageAsync(
+ repositoryName,
+ await manifestResponse.Content.ReadFromJsonAsync(cancellationToken: cancellationToken).ConfigureAwait(false),
+ cancellationToken).ConfigureAwait(false);
+ } else
+ {
+ throw new BaseImageNotFoundException(runtimeIdentifier, repositoryName, reference, ridManifestDict.Keys);
+ }
+ }
///
/// Ensure a blob associated with from the registry is available locally.
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/ComputeDotnetBaseImageAndTag.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/ComputeDotnetBaseImageAndTag.cs
new file mode 100644
index 000000000000..458c7b55195a
--- /dev/null
+++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/ComputeDotnetBaseImageAndTag.cs
@@ -0,0 +1,245 @@
+// 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.CodeAnalysis;
+using System.Security.Cryptography;
+using Microsoft.Build.Framework;
+using NuGet.Versioning;
+#if NETFRAMEWORK
+using System.Linq;
+#endif
+
+namespace Microsoft.NET.Build.Containers.Tasks;
+
+///
+/// Computes the base image and Tag for a Microsoft-authored container image based on the project properties and tagging scheme from various SDK versions.
+///
+public sealed class ComputeDotnetBaseImageAndTag : Microsoft.Build.Utilities.Task
+{
+ // starting in .NET 8, the container tagging scheme started incorporating the
+ // 'channel' (rc/preview) and the channel increment (the numeric value after the channel name)
+ // into the container tags.
+ private const int FirstVersionWithNewTaggingScheme = 8;
+
+ ///
+ /// When in preview, this influences which preview image tag is used, since previews can have compatibility problems across versions.
+ ///
+ [Required]
+ public string SdkVersion { get; set; }
+
+ ///
+ /// Used to determine which `tag` of an image should be used by default.
+ ///
+ [Required]
+ public string TargetFrameworkVersion { get; set; }
+
+ ///
+ /// Used to inspect the project to see if it references ASP.Net Core, which causes a change in base image to dotnet/aspnet.
+ ///
+ [Required]
+ public ITaskItem[] FrameworkReferences { get; set; }
+
+ ///
+ /// If this is set to linux-ARCH then we use jammy-chiseled for the AOT/Extra/etc decisions.
+ /// If this is set to linux-musl-ARCH then we need to use `alpine` for all containers, and tag on `aot` or `extra` as necessary.
+ ///
+ [Required]
+ public string TargetRuntimeIdentifier { get; set; }
+
+
+ ///
+ /// If a project is self-contained then it includes a runtime, and so the runtime-deps image should be used.
+ ///
+ public bool IsSelfContained { get; set; }
+
+ ///
+ /// If a project is AOT-published then not only is it self-contained, but it can also remove some other deps - we can use the dotnet/nightly/runtime-deps variant here aot
+ ///
+ public bool IsAotPublished { get; set; }
+
+ ///
+ /// If the project is AOT'd the aot image variant doesn't contain ICU and TZData, so we use this flag to see if we need to use the `-extra` variant that does contain those packages.
+ ///
+ public bool UsesInvariantGlobalization { get; set; }
+
+ ///
+ /// If set, this expresses a preference for a variant of the container image that we infer for a project.
+ /// e.g. 'alpine', or 'jammy-chiseled'
+ ///
+ public string ContainerFamily { get; set; }
+
+ ///
+ /// The final base image computed from the inputs (or explicitly set by the user if IsUsingMicrosoftDefaultImages is true)
+ ///
+ [Output]
+ public string? ComputedContainerBaseImage { get; private set; }
+
+ private bool IsAspNetCoreProject => FrameworkReferences.Length > 0 && FrameworkReferences.Any(x => x.ItemSpec.Equals("Microsoft.AspnetCore.App", StringComparison.Ordinal));
+ private bool IsMuslRid => TargetRuntimeIdentifier.StartsWith("linux-musl", StringComparison.Ordinal);
+ private bool IsBundledRuntime => IsSelfContained;
+ private bool NeedsNightlyImages => IsAotPublished;
+ private bool AllowsExperimentalTagInference => String.IsNullOrEmpty(ContainerFamily);
+
+ public ComputeDotnetBaseImageAndTag()
+ {
+ SdkVersion = "";
+ TargetFrameworkVersion = "";
+ ContainerFamily = "";
+ FrameworkReferences = [];
+ TargetRuntimeIdentifier = "";
+ }
+
+ public override bool Execute()
+ {
+ var defaultRegistry = "mcr.microsoft.com";
+ if (ComputeRepositoryAndTag(out var repository, out var tag))
+ {
+ ComputedContainerBaseImage = $"{defaultRegistry}/{repository}:{tag}";
+ }
+ return !Log.HasLoggedErrors;
+ }
+
+ private bool ComputeRepositoryAndTag([NotNullWhen(true)] out string? repository, [NotNullWhen(true)] out string? tag)
+ {
+ if (ComputeVersionPart() is (string baseVersionPart, bool versionAllowsUsingAOTAndExtrasImages))
+ {
+ Log.LogMessage("Computed base version tag of {0} from TFM {1} and SDK {2}", baseVersionPart, TargetFrameworkVersion, SdkVersion);
+ if (baseVersionPart is null)
+ {
+ repository = null;
+ tag = null;
+ return false;
+ }
+
+ var detectedRepository = (NeedsNightlyImages, IsSelfContained, IsAspNetCoreProject) switch
+ {
+ (true, true, _) when AllowsExperimentalTagInference && versionAllowsUsingAOTAndExtrasImages => "dotnet/nightly/runtime-deps",
+ (_, true, _) => "dotnet/runtime-deps",
+ (_, _, true) => "dotnet/aspnet",
+ (_, _, false) => "dotnet/runtime"
+ };
+ Log.LogMessage("Chose base image repository {0}", detectedRepository);
+ repository = detectedRepository;
+ tag = baseVersionPart;
+
+ if (!string.IsNullOrWhiteSpace(ContainerFamily))
+ {
+ // for the inferred image tags, 'family' aka 'flavor' comes after the 'version' portion (including any preview/rc segments).
+ // so it's safe to just append here
+ tag += $"-{ContainerFamily}";
+ return true;
+ }
+ else
+ {
+ if (!versionAllowsUsingAOTAndExtrasImages)
+ {
+ tag += IsMuslRid switch
+ {
+ true => "-alpine",
+ false => "" // TODO: should we default here to chiseled iamges for < 8 apps?
+ };
+ Log.LogMessage("Selected base image tag {0}", tag);
+ return true;
+ }
+ else
+ {
+ // chose the base OS
+ tag += IsMuslRid switch
+ {
+ true => "-alpine",
+ // default to chiseled for AOT, non-musl Apps
+ false when IsAotPublished => "-jammy-chiseled", // TODO: should we default here to jammy-chiseled for non-musl RIDs?
+ // default to jammy for non-AOT, non-musl Apps
+ false => ""
+ };
+
+ // now choose the variant, if any - if globalization then -extra, else -aot
+ tag += (IsAotPublished, UsesInvariantGlobalization) switch
+ {
+ (true, false) => "-extra",
+ (true, true) => "-aot",
+ _ => ""
+ };
+ Log.LogMessage("Selected base image tag {0}", tag);
+ return true;
+ }
+ }
+ }
+ else
+ {
+ repository = null;
+ tag = null;
+ return false;
+ }
+ }
+
+ private (string, bool)? ComputeVersionPart()
+ {
+ if (SemanticVersion.TryParse(TargetFrameworkVersion, out var tfm) && tfm.Major < FirstVersionWithNewTaggingScheme)
+ {
+ // < 8 TFMs don't support the -aot and -extras images
+ return ($"{tfm.Major}.{tfm.Minor}", false);
+ }
+ else if (SemanticVersion.TryParse(SdkVersion, out var version))
+ {
+ if (ComputeVersionInternal(version, tfm) is string majMinor)
+ {
+ return (majMinor, true);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ else
+ {
+ Log.LogError(Resources.Strings.InvalidSdkVersion, SdkVersion);
+ return null;
+ }
+ }
+
+ private string? ComputeVersionInternal(SemanticVersion version, SemanticVersion? tfm)
+ {
+ if (tfm != null && (tfm.Major < version.Major || tfm.Minor < version.Minor))
+ {
+ // in this case the TFM is earlier, so we are assumed to be in a stable scenario
+ return $"{tfm.Major}.{tfm.Minor}";
+ }
+ // otherwise if we're in a scenario where we're using the TFM for the given SDK version,
+ // and that SDK version may be a prerelease, so we need to handle
+ var baseImageTag = version switch
+ {
+ // all stable versions or prereleases with majors before the switch get major/minor tags
+ { IsPrerelease: false } or { Major: < FirstVersionWithNewTaggingScheme } => $"{version.Major}.{version.Minor}",
+ // prereleases after the switch for the first SDK version get major/minor-channel.bump tags
+ { IsPrerelease: true, Major: >= FirstVersionWithNewTaggingScheme, Patch: 100 } => DetermineLabelBasedOnChannel(version.Major, version.Minor, version.ReleaseLabels.ToArray()),
+ // prereleases of subsequent SDK versions still get to use the stable tags
+ { IsPrerelease: true, Major: >= FirstVersionWithNewTaggingScheme } => $"{version.Major}.{version.Minor}",
+ };
+ return baseImageTag;
+ }
+
+ private string? DetermineLabelBasedOnChannel(int major, int minor, string[] releaseLabels)
+ {
+ var channel = releaseLabels.Length > 0 ? releaseLabels[0] : null;
+ switch (channel)
+ {
+ case null or "rtm" or "servicing":
+ return $"{major}.{minor}";
+ case "rc" or "preview":
+ if (releaseLabels.Length > 1)
+ {
+ // Per the dotnet-docker team, the major.minor preview tag format is a fluke and the major.minor.0 form
+ // should be used for all previews going forward.
+ return $"{major}.{minor}.0-{channel}.{releaseLabels[1]}";
+ }
+ Log.LogError(Resources.Strings.InvalidSdkPrereleaseVersion, channel);
+ return null;
+ case "alpha" or "dev" or "ci":
+ return $"{major}.{minor}-preview";
+ default:
+ Log.LogError(Resources.Strings.InvalidSdkPrereleaseVersion, channel);
+ return null;
+ };
+ }
+}
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/ComputeDotnetBaseImageTag.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/ComputeDotnetBaseImageTag.cs
deleted file mode 100644
index 72bf60bc775e..000000000000
--- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/ComputeDotnetBaseImageTag.cs
+++ /dev/null
@@ -1,110 +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 Microsoft.Build.Framework;
-using NuGet.Versioning;
-#if NETFRAMEWORK
-using System.Linq;
-#endif
-
-namespace Microsoft.NET.Build.Containers.Tasks;
-
-///
-/// Computes the base image Tag for a Microsoft-authored container image based on the tagging scheme from various SDK versions.
-///
-public sealed class ComputeDotnetBaseImageTag : Microsoft.Build.Utilities.Task
-{
- // starting in .NET 8, the container tagging scheme started incorporating the
- // 'channel' (rc/preview) and the channel increment (the numeric value after the channel name)
- // into the container tags.
- private const int FirstVersionWithNewTaggingScheme = 8;
-
- [Required]
- public string SdkVersion { get; set; }
-
- [Required]
- public string TargetFrameworkVersion { get; set; }
-
- public string ContainerFamily { get; set; }
-
- [Output]
- public string? ComputedBaseImageTag { get; private set; }
-
- public ComputeDotnetBaseImageTag()
- {
- SdkVersion = "";
- TargetFrameworkVersion = "";
- ContainerFamily = "";
- }
-
- public override bool Execute()
- {
- if (SemanticVersion.TryParse(TargetFrameworkVersion, out var tfm) && tfm.Major < FirstVersionWithNewTaggingScheme)
- {
- ComputedBaseImageTag = $"{tfm.Major}.{tfm.Minor}";
- }
- else if (SemanticVersion.TryParse(SdkVersion, out var version))
- {
- ComputedBaseImageTag = ComputeVersionInternal(version, tfm);
- }
- else
- {
- Log.LogError(Resources.Strings.InvalidSdkVersion, SdkVersion);
- return !Log.HasLoggedErrors;
- }
-
- if (!string.IsNullOrWhiteSpace(ContainerFamily))
- {
- // for the inferred image tags, 'family' aka 'flavor' comes after the 'version' portion (including any preview/rc segments).
- // so it's safe to just append here
- ComputedBaseImageTag += $"-{ContainerFamily}";
- }
- return true;
- }
-
-
- private string? ComputeVersionInternal(SemanticVersion version, SemanticVersion? tfm)
- {
- if (tfm != null && (tfm.Major < version.Major || tfm.Minor < version.Minor))
- {
- // in this case the TFM is earlier, so we are assumed to be in a stable scenario
- return $"{tfm.Major}.{tfm.Minor}";
- }
- // otherwise if we're in a scenario where we're using the TFM for the given SDK version,
- // and that SDK version may be a prerelease, so we need to handle
- var baseImageTag = (version) switch
- {
- // all stable versions or prereleases with majors before the switch get major/minor tags
- { IsPrerelease: false } or { Major: < FirstVersionWithNewTaggingScheme } => $"{version.Major}.{version.Minor}",
- // prereleases after the switch for the first SDK version get major/minor-channel.bump tags
- { IsPrerelease: true, Major: >= FirstVersionWithNewTaggingScheme, Patch: 100 } => DetermineLabelBasedOnChannel(version.Major, version.Minor, version.ReleaseLabels.ToArray()),
- // prereleases of subsequent SDK versions still get to use the stable tags
- { IsPrerelease: true, Major: >= FirstVersionWithNewTaggingScheme } => $"{version.Major}.{version.Minor}",
- };
- return baseImageTag;
- }
-
- private string? DetermineLabelBasedOnChannel(int major, int minor, string[] releaseLabels)
- {
- var channel = releaseLabels.Length > 0 ? releaseLabels[0] : null;
- switch (channel)
- {
- case null or "rtm" or "servicing":
- return $"{major}.{minor}";
- case "rc" or "preview":
- if (releaseLabels.Length > 1)
- {
- // Per the dotnet-docker team, the major.minor preview tag format is a fluke and the major.minor.0 form
- // should be used for all previews going forward.
- return $"{major}.{minor}.0-{channel}.{releaseLabels[1]}";
- }
- Log.LogError(Resources.Strings.InvalidSdkPrereleaseVersion, channel);
- return null;
- case "alpha" or "dev" or "ci":
- return $"{major}.{minor}-preview";
- default:
- Log.LogError(Resources.Strings.InvalidSdkPrereleaseVersion, channel);
- return null;
- };
- }
-}
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs
index ffe30386de2e..6e3b7b5fa795 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs
@@ -31,7 +31,19 @@ public sealed partial class CreateNewImage : Microsoft.Build.Utilities.Task, ICa
public override bool Execute()
{
- return Task.Run(() => ExecuteAsync(_cancellationTokenSource.Token)).GetAwaiter().GetResult();
+ try
+ {
+ Task.Run(() => ExecuteAsync(_cancellationTokenSource.Token)).GetAwaiter().GetResult();
+ }
+ catch (TaskCanceledException ex)
+ {
+ Log.LogWarningFromException(ex);
+ }
+ catch (OperationCanceledException ex)
+ {
+ Log.LogWarningFromException(ex);
+ }
+ return !Log.HasLoggedErrors;
}
internal async Task ExecuteAsync(CancellationToken cancellationToken)
@@ -64,11 +76,12 @@ internal async Task ExecuteAsync(CancellationToken cancellationToken)
{
try
{
+ var picker = new RidGraphManifestPicker(RuntimeIdentifierGraphPath);
imageBuilder = await registry.GetImageManifestAsync(
BaseImageName,
BaseImageTag,
ContainerRuntimeIdentifier,
- RuntimeIdentifierGraphPath,
+ picker,
cancellationToken).ConfigureAwait(false);
}
catch (RepositoryNotFoundException)
diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs
index 748b6d9fcf51..5691be543614 100644
--- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs
+++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs
@@ -187,6 +187,11 @@ internal string GenerateCommandLineCommandsInt()
builder.AppendSwitchIfNotNull("--container-user ", ContainerUser);
}
+ if (!string.IsNullOrWhiteSpace(ArchiveOutputPath))
+ {
+ builder.AppendSwitchIfNotNull("--archiveoutputpath ", ArchiveOutputPath);
+ }
+
return builder.ToString();
void AppendSwitchIfNotNullSantized(CommandLineBuilder builder, string commandArgName, string propertyName, ITaskItem[] value)
diff --git a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props
index 5f3f8efbfcf4..4abb098d7c82 100644
--- a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props
+++ b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props
@@ -16,5 +16,5 @@
-
+
diff --git a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets
index e0dc4c70ac02..ff0b034dba94 100644
--- a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets
+++ b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets
@@ -13,6 +13,7 @@
)">true
<_ContainerIsTargetingNet8TFM>false
<_ContainerIsTargetingNet8TFM Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '8.0'))">true
+ <_ContainerIsSelfContained>false
<_ContainerIsSelfContained Condition="'$(SelfContained)' == 'true' or '$(PublishSelfContained)' == 'true'">true
@@ -30,33 +31,29 @@
-
-
-
-
-
-
+ Returns="$(ContainerBaseImage)">
- <_IsAspNet Condition="@(FrameworkReference->Count()) > 0 and @(FrameworkReference->AnyHaveMetadataValue('Identity', 'Microsoft.AspnetCore.App'))">true
-
-
- <_ContainerBaseRegistry>mcr.microsoft.com
- <_ContainerBaseImageName Condition="'$(_ContainerIsSelfContained)' == 'true'">dotnet/runtime-deps
- <_ContainerBaseImageName Condition="'$(_ContainerBaseImageName)' == '' and '$(_IsAspNet)' == 'true'">dotnet/aspnet
- <_ContainerBaseImageName Condition="'$(_ContainerBaseImageName)' == ''">dotnet/runtime
-
-
- <_ContainerIsUsingMicrosoftDefaultImages Condition="'$(ContainerBaseImage)' != ''">false
+
+ $(RuntimeIdentifier)
+ linux-$(NETCoreSdkPortableRuntimeIdentifier.Split('-')[1])
<_ContainerIsUsingMicrosoftDefaultImages Condition="'$(ContainerBaseImage)' == ''">true
-
- $(_ContainerBaseRegistry)/$(_ContainerBaseImageName):$(_ContainerBaseImageTag)
+ <_ContainerIsUsingMicrosoftDefaultImages Condition="'$(ContainerBaseImage)' != ''">false
+
+
+
+
@@ -91,8 +88,6 @@
- $(RuntimeIdentifier)
- linux-$(NETCoreSdkPortableRuntimeIdentifier.Split('-')[1])
<_ContainerIsTargetingWindows>false
<_ContainerIsTargetingWindows Condition="$(ContainerRuntimeIdentifier.StartsWith('win'))">true
@@ -184,14 +179,27 @@
_ContainerVerifySDKVersion;
- ComputeContainerConfig
+ ComputeContainerConfig;
+ _CheckContainersPackage
-
+
+
+ Microsoft.NET.Build.Containers
+
+
+
+
+
+
+ true
+
+
+
+ Condition="'$(IsPublishable)' == 'true' AND '$(EnableSdkContainerSupport)' == 'true'">
$(NetCoreRoot)
diff --git a/src/Layout/redist/minimumMSBuildVersion b/src/Layout/redist/minimumMSBuildVersion
index 3dff47639e32..616f65ff5653 100644
--- a/src/Layout/redist/minimumMSBuildVersion
+++ b/src/Layout/redist/minimumMSBuildVersion
@@ -1 +1 @@
-17.7.2
+17.8.3
diff --git a/src/Layout/redist/redist.csproj b/src/Layout/redist/redist.csproj
index 843561432c6e..ebdfd9e7ef94 100644
--- a/src/Layout/redist/redist.csproj
+++ b/src/Layout/redist/redist.csproj
@@ -51,15 +51,20 @@
+
-
+
+
-
-
+
+
diff --git a/src/Layout/redist/targets/GenerateLayout.targets b/src/Layout/redist/targets/GenerateLayout.targets
index 2bee160bf9a9..922b9595317b 100644
--- a/src/Layout/redist/targets/GenerateLayout.targets
+++ b/src/Layout/redist/targets/GenerateLayout.targets
@@ -178,7 +178,7 @@
BeforeTargets="Build">
netcoreapp3.1
- net8.0
+ net9.0$(NuGetPackageRoot)/microsoft.testplatform.cli/$(MicrosoftTestPlatformCLIPackageVersion)/contentFiles/any/$(TestCliNuGetDirectoryTargetFramework)/
diff --git a/src/Layout/redist/targets/OverlaySdkOnLKG.targets b/src/Layout/redist/targets/OverlaySdkOnLKG.targets
index 8db1c99bd5d1..48340b184fe7 100644
--- a/src/Layout/redist/targets/OverlaySdkOnLKG.targets
+++ b/src/Layout/redist/targets/OverlaySdkOnLKG.targets
@@ -96,7 +96,7 @@
diff --git a/src/Layout/redist/targets/PublishDotnetWatch.targets b/src/Layout/redist/targets/PublishDotnetWatch.targets
index 71c633552f01..be9cf2b38d6f 100644
--- a/src/Layout/redist/targets/PublishDotnetWatch.targets
+++ b/src/Layout/redist/targets/PublishDotnetWatch.targets
@@ -14,12 +14,17 @@
To reduce the size of the SDK, we use the compiler dependencies that are located in the `Roslyn/bincore` location
instead of shipping our own copies in the dotnet-watch tool. These assemblies will be resolved by path in the
dotnet-watch executable.
+
+ We make an exception for the Microsoft.CodeAnalysis binaries deployed with the MSBuildWorkspace BuildHosts, since those don't
+ have any logic to pick up Roslyn from another location. Those can be addressed a different way which tracked in
+ https://github.com/dotnet/roslyn/issues/70945.
-->
<_DotnetWatchInputFile Include="@(_DotnetWatchBuildOutput)"
- Condition="'%(Filename)' != 'Microsoft.CodeAnalysis' and
- '%(Filename)' != 'Microsoft.CodeAnalysis.resources' and
- '%(Filename)' != 'Microsoft.CodeAnalysis.CSharp' and
- '%(Filename)' != 'Microsoft.CodeAnalysis.CSharp.resources'"/>
+ Condition="('%(Filename)' != 'Microsoft.CodeAnalysis' and
+ '%(Filename)' != 'Microsoft.CodeAnalysis.resources' and
+ '%(Filename)' != 'Microsoft.CodeAnalysis.CSharp' and
+ '%(Filename)' != 'Microsoft.CodeAnalysis.CSharp.resources') or
+ $([MSBuild]::ValueOrDefault('%(FullPath)', '').Contains('BuildHost'))" />
diff --git a/src/Layout/redist/trustedroots/codesignctl.pem b/src/Layout/redist/trustedroots/codesignctl.pem
index d6635511755a..11978a9a649f 100644
--- a/src/Layout/redist/trustedroots/codesignctl.pem
+++ b/src/Layout/redist/trustedroots/codesignctl.pem
@@ -8571,3 +8571,52 @@ ADBmAjEA5gVYaWHlLcoNy/EZCL3W/VGSGn5jVASQkZo1kTmZ+gepZpO6yGjUij/6
vmjkI6TZraE3
-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFmzCCA4OgAwIBAgIQEJfEnIwlQyi7pui5m6tPoTANBgkqhkiG9w0BAQsFADBX
+MQswCQYDVQQGEwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMS4wLAYDVQQD
+DCVTU0wuY29tIENvZGUgU2lnbmluZyBSU0EgUm9vdCBDQSAyMDIyMB4XDTIyMDgy
+NTE2MzIwOFoXDTQ2MDgxOTE2MzIwN1owVzELMAkGA1UEBhMCVVMxGDAWBgNVBAoM
+D1NTTCBDb3Jwb3JhdGlvbjEuMCwGA1UEAwwlU1NMLmNvbSBDb2RlIFNpZ25pbmcg
+UlNBIFJvb3QgQ0EgMjAyMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
+AIx1IMiM3E6RUQa1W+9Fu9n+YOtKk4fs/5ePYJOecWFA6u9Ly5JY2GsW3N4tiPLz
+0wSWwCVnIeUd259SgfYAK2aQ8aweqE9hJN12LwPHNcg2rIFTYCLAUZKZ7+gmLplU
+zQmPX1w88KvnO7OnqwbGMZe+TO30BoExgktQELWgEXncWMvA5R6zwW9IXK2XCrMe
+rC5X2L2+OFBE4zP918G1v6JO+3i0OziYKOlWLVSAi2t+HeOVhqeeF1RGW17/n+Zr
+NYpRpaZ7XAoiDcLXgy/aPD3yih79Hj6h2BxPbghSbk+sH8n+n5lNu1JUsZKDW0AT
+7xS1M5E8gqSr9apIaum4+4BABvzlHn4/vAqrJuLFqwcE1014tevaa1NbU4qm8tde
+USJNH8yqi7rADoLZFLrZ8i33JbjLqUPSTEQeFnXMteRwHymBVTSyPv7/0XgaQJIn
+KmgltdKe77z4FEtvUiMWaxCJ1N+63MwYWXGp5svYkHG9IPSkaiZJlZ1GGEUWiR8V
+XahDsGCXntc22jqyb0tyTpl21zA396adu9tdpu58GOxC+RXoDrjbbEJrEF1EDNbU
+zoKM7yswi3HhCPJBkWPj/uDAqKWNmQBBYs5CRqGdyuWanFHbYHpEVQ4qKnCkmf8q
+fmC0HZZXujv827/GMYCqOgAZL4gfSaTrd0D3TIPugpEvAgMBAAGjYzBhMA8GA1Ud
+EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUx/bIC2LtFAyjF7aquR7R4INWoV0wHQYD
+VR0OBBYEFMf2yAti7RQMoxe2qrke0eCDVqFdMA4GA1UdDwEB/wQEAwIBhjANBgkq
+hkiG9w0BAQsFAAOCAgEAYlDeMj/rNjV4jYl3SA8Po10HqLr2Uj82Us61wHlM610r
++BKsQ9vne4wpKp9rOtN89RV3lzv9If3zyFzJPgWUr3ur6I3irw3AoBvfrwu6qrRF
+VYHIYZlhuLCa6FnMCRPZp1YHhu7toOyNAWWamcwjosCRHV0G3Q2n+jzExFkixps6
+wB1pPSy2sR6Kvj2CD2sxcmBXkAtUit5VCh51SQBstkoz70bY1svE8XxsCZbpqeEY
+/a//tM9nb38HpUiNBRCWOZB5Wpa34+Y3ODKxxjEBJHQCxMsLz7p2vlyKIMPpdGfr
+bRKcOT3gitUrSyTjeYxInJGr14IhOL/Es8EH7pA9rfqivilbUjGqbLMcdfPmoNiM
+A5aIuvjKUTNhCx3Va5wTGS4Wz88Nh0uXxAfZC6uYkeq6B4OYkkAKIM24a5r3gP47
+yeL5Q8go502XF8B38zDqJoQb1VO8MIVfae48tAnosZukOIK668BqjG0rKDB45DKr
+txvhUiQAkedLGtuhiAxu6l0cR5mNcU293t5AmQSzQOHDi6rEkhiXe/zMg4A82iny
+f87EaQCbYX1tltYVgoz1gyoc91N2ciXwKYDEMmRTD09U9FcN1gvc/nKItF9L2R4/
+A4YvORA2pzHFJgeVi0hx8assBurSHE6VjecX6q2xRkXTNv3LxGFvCSJEMiena2g=
+-----END CERTIFICATE-----
+
+-----BEGIN CERTIFICATE-----
+MIICSzCCAdKgAwIBAgIQbo7kWxBMyQx+tNiIj+XsZDAKBggqhkjOPQQDAzBXMQsw
+CQYDVQQGEwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMS4wLAYDVQQDDCVT
+U0wuY29tIENvZGUgU2lnbmluZyBFQ0MgUm9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2
+MzEzNVoXDTQ2MDgxOTE2MzEzNFowVzELMAkGA1UEBhMCVVMxGDAWBgNVBAoMD1NT
+TCBDb3Jwb3JhdGlvbjEuMCwGA1UEAwwlU1NMLmNvbSBDb2RlIFNpZ25pbmcgRUND
+IFJvb3QgQ0EgMjAyMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABHbIrNTWlZJ8FzLl
+y2tB+Sm7seuidrU22GxLjeU+SlcmJsefO19GZidRwCxjHHTdrDnTbz0OlL6+KzCS
+zqJCVg1Q1KQscfQnYduggT/VTVYWtcwcN8szNBFoxzx7DemUzaNjMGEwDwYDVR0T
+AQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRYXhbDLbPm6qNJs6W+1t6ueZVrjTAdBgNV
+HQ4EFgQUWF4Wwy2z5uqjSbOlvtbernmVa40wDgYDVR0PAQH/BAQDAgGGMAoGCCqG
+SM49BAMDA2cAMGQCMFOMczFOgFy3njsPCFgTvtlA9vG/ffeZoOvMgAANqnA27TYj
+e0G4FBVWdtOW4xWFZAIwJOT2+L0Tbjq3P9y/zXjfJoBXEq9oZ0//8iuxoqGZtMOT
+G456y3y/FI7r6rj+4QNf
+-----END CERTIFICATE-----
+
diff --git a/src/Layout/redist/trustedroots/timestampctl.pem b/src/Layout/redist/trustedroots/timestampctl.pem
index e97ea2f009c5..592079fa33ae 100644
--- a/src/Layout/redist/trustedroots/timestampctl.pem
+++ b/src/Layout/redist/trustedroots/timestampctl.pem
@@ -9141,3 +9141,119 @@ G4fSJZP29CmjjLEg1BHz4PzxZ7F++iAbKdOwSalNVNmqduMnYFkKE1M3LjVxiJ5R
wyY+yw0SA2BnkQyMAdxv+8ALpRv5xI+OAegoZPS/BHLZ3NH0iv/K
-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFlTCCA32gAwIBAgIQQAE0jMIAAAAAAAAAAZdY9DANBgkqhkiG9w0BAQwFADBU
+MQswCQYDVQQGEwJUVzESMBAGA1UEChMJVEFJV0FOLUNBMRAwDgYDVQQLEwdSb290
+IENBMR8wHQYDVQQDExZUV0NBIEdsb2JhbCBSb290IENBIEcyMB4XDTIyMTEyMjA2
+NDIyMVoXDTQ3MTEyMjE1NTk1OVowVDELMAkGA1UEBhMCVFcxEjAQBgNVBAoTCVRB
+SVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEfMB0GA1UEAxMWVFdDQSBHbG9iYWwg
+Um9vdCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKoO1SCS
+Aa2C+QwIkTRrihbQRhb/A7jYjeqTNPv/K739bqrcm/KGgVX1iRzEjXVqWHiREx4C
+E3A9774K5wCPuDHldMUwvv991pnlwkKjzyHWswh/kdVh5qKVEA3vXpcLSTjVIrDX
+i1lvnzWbf9KRzHp/u6Cf3lUz9kuNCup9CcB53L1E4v4c52QhKM8ESuK0v4Z5KrsO
+k8mPXqwwOVKQB7nqnCZCFMRnRv7RGmihPlAZoyYKJymQwva063OaeB7hmPRlDDUh
+BvgL3mLlTcGzXdm5+mGXKuPqx0RVJJL+Eqc/xHfgLQKBB9X7feYQnjq0qO/s+1Dq
+Nc/MfrtCuURsUum/KnIfP96bcOncWsU7u7/wWYWvL8GwFHkFrHWfJfURJwZgIcdt
+Zb6oiZzlrEbf+F1EA41gvfexDcwv70FUL+5rlblOfDTfO/l3nX3NBz0cBjMSgOxy
+nPItgtrVO8TH+QTDZAJ89TVgp7RGKS4b76VYgC56iVE4Njz9oXe4gDDQit6NpzQm
+7CO7GFUYNkXu7QEGqk2/ZAzKmJcaMQJm+HhoW4jfCajnm/o0bXAcIa0Ii/Khtqx2
+ar/xgCUAvjweTa65PLaVY71rfkcSkFVFEY3sFx/BvieBk1djaQAmd4vDWeV70Q1E
+8qjw94WaBffCLnCak4XYlZAxkFSm7AufN0UPAgMBAAGjYzBhMA4GA1UdDwEB/wQE
+AwIBBjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFJKM1DbRW0dTxHENhN1k
+KvU2ZEDnMB0GA1UdDgQWBBSSjNQ20VtHU8RxDYTdZCr1NmRA5zANBgkqhkiG9w0B
+AQwFAAOCAgEAJfxL2pC02nXnQTqB0ab+oGrzGHFiaiQIi6l6TclVzs8QKC4EGZYF
+z10CICo7s1U/Ac1CzbJ37f9183x325alz4xnBvSkm3L2IUkJmKMyXndaYwnvYkOX
+Aji16jwYUGj8WVvZedTx5FZIE1bY03ELXniUOBFF+gUX9Q51HmJSYUa6LhmthrSI
+D7FQ5kAANBqVnZPgUfnUVUbplTwlhi6X1wExGETsHGDpfWmvMviXQCUkto0aVTzF
+t/e8BlI7cTBwPnEXfvFmBF5dvIoxQ6aSHXtU0qU2i2+N1l7a1MMuHd85VWCCMJ4n
+/46A3WNMplU12NAzqYBtPl6dzKhngGb6mVcMUsoZdbA4NVUqgcWMHlbXX5DyINja
+4GZx6bJ4q2e5JG5rNnL8b439f3I5KGdSkQUfV2XSo6cNYfqh59U1RpXJBof2MOwy
+UamsVsAhTqMUdAU6vOO/bT1OP16lpG0pv4RRdVOOhhr1UXAqDRxOQOH9o+OlK2eQ
+ksdsroW/OpsXFcqcKpPUTTkNvCAIo42IbAkNjK5EIU3JcezYJtcXni0RGDyjIn24
+J1S/aMg7QsyPXk7n3MLF+mpED41WiHrfiYRsoLM+PfFlAAmI6irrQM6zXawyF67B
+m+nQwfVJlN2nznxaB+uuIJwXMJJpk3Lzmltxm/5q33owaY6zLtsPLN0=
+-----END CERTIFICATE-----
+
+-----BEGIN CERTIFICATE-----
+MIIFmzCCA4OgAwIBAgIQEJfEnIwlQyi7pui5m6tPoTANBgkqhkiG9w0BAQsFADBX
+MQswCQYDVQQGEwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMS4wLAYDVQQD
+DCVTU0wuY29tIENvZGUgU2lnbmluZyBSU0EgUm9vdCBDQSAyMDIyMB4XDTIyMDgy
+NTE2MzIwOFoXDTQ2MDgxOTE2MzIwN1owVzELMAkGA1UEBhMCVVMxGDAWBgNVBAoM
+D1NTTCBDb3Jwb3JhdGlvbjEuMCwGA1UEAwwlU1NMLmNvbSBDb2RlIFNpZ25pbmcg
+UlNBIFJvb3QgQ0EgMjAyMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
+AIx1IMiM3E6RUQa1W+9Fu9n+YOtKk4fs/5ePYJOecWFA6u9Ly5JY2GsW3N4tiPLz
+0wSWwCVnIeUd259SgfYAK2aQ8aweqE9hJN12LwPHNcg2rIFTYCLAUZKZ7+gmLplU
+zQmPX1w88KvnO7OnqwbGMZe+TO30BoExgktQELWgEXncWMvA5R6zwW9IXK2XCrMe
+rC5X2L2+OFBE4zP918G1v6JO+3i0OziYKOlWLVSAi2t+HeOVhqeeF1RGW17/n+Zr
+NYpRpaZ7XAoiDcLXgy/aPD3yih79Hj6h2BxPbghSbk+sH8n+n5lNu1JUsZKDW0AT
+7xS1M5E8gqSr9apIaum4+4BABvzlHn4/vAqrJuLFqwcE1014tevaa1NbU4qm8tde
+USJNH8yqi7rADoLZFLrZ8i33JbjLqUPSTEQeFnXMteRwHymBVTSyPv7/0XgaQJIn
+KmgltdKe77z4FEtvUiMWaxCJ1N+63MwYWXGp5svYkHG9IPSkaiZJlZ1GGEUWiR8V
+XahDsGCXntc22jqyb0tyTpl21zA396adu9tdpu58GOxC+RXoDrjbbEJrEF1EDNbU
+zoKM7yswi3HhCPJBkWPj/uDAqKWNmQBBYs5CRqGdyuWanFHbYHpEVQ4qKnCkmf8q
+fmC0HZZXujv827/GMYCqOgAZL4gfSaTrd0D3TIPugpEvAgMBAAGjYzBhMA8GA1Ud
+EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUx/bIC2LtFAyjF7aquR7R4INWoV0wHQYD
+VR0OBBYEFMf2yAti7RQMoxe2qrke0eCDVqFdMA4GA1UdDwEB/wQEAwIBhjANBgkq
+hkiG9w0BAQsFAAOCAgEAYlDeMj/rNjV4jYl3SA8Po10HqLr2Uj82Us61wHlM610r
++BKsQ9vne4wpKp9rOtN89RV3lzv9If3zyFzJPgWUr3ur6I3irw3AoBvfrwu6qrRF
+VYHIYZlhuLCa6FnMCRPZp1YHhu7toOyNAWWamcwjosCRHV0G3Q2n+jzExFkixps6
+wB1pPSy2sR6Kvj2CD2sxcmBXkAtUit5VCh51SQBstkoz70bY1svE8XxsCZbpqeEY
+/a//tM9nb38HpUiNBRCWOZB5Wpa34+Y3ODKxxjEBJHQCxMsLz7p2vlyKIMPpdGfr
+bRKcOT3gitUrSyTjeYxInJGr14IhOL/Es8EH7pA9rfqivilbUjGqbLMcdfPmoNiM
+A5aIuvjKUTNhCx3Va5wTGS4Wz88Nh0uXxAfZC6uYkeq6B4OYkkAKIM24a5r3gP47
+yeL5Q8go502XF8B38zDqJoQb1VO8MIVfae48tAnosZukOIK668BqjG0rKDB45DKr
+txvhUiQAkedLGtuhiAxu6l0cR5mNcU293t5AmQSzQOHDi6rEkhiXe/zMg4A82iny
+f87EaQCbYX1tltYVgoz1gyoc91N2ciXwKYDEMmRTD09U9FcN1gvc/nKItF9L2R4/
+A4YvORA2pzHFJgeVi0hx8assBurSHE6VjecX6q2xRkXTNv3LxGFvCSJEMiena2g=
+-----END CERTIFICATE-----
+
+-----BEGIN CERTIFICATE-----
+MIICSzCCAdKgAwIBAgIQbo7kWxBMyQx+tNiIj+XsZDAKBggqhkjOPQQDAzBXMQsw
+CQYDVQQGEwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMS4wLAYDVQQDDCVT
+U0wuY29tIENvZGUgU2lnbmluZyBFQ0MgUm9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2
+MzEzNVoXDTQ2MDgxOTE2MzEzNFowVzELMAkGA1UEBhMCVVMxGDAWBgNVBAoMD1NT
+TCBDb3Jwb3JhdGlvbjEuMCwGA1UEAwwlU1NMLmNvbSBDb2RlIFNpZ25pbmcgRUND
+IFJvb3QgQ0EgMjAyMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABHbIrNTWlZJ8FzLl
+y2tB+Sm7seuidrU22GxLjeU+SlcmJsefO19GZidRwCxjHHTdrDnTbz0OlL6+KzCS
+zqJCVg1Q1KQscfQnYduggT/VTVYWtcwcN8szNBFoxzx7DemUzaNjMGEwDwYDVR0T
+AQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRYXhbDLbPm6qNJs6W+1t6ueZVrjTAdBgNV
+HQ4EFgQUWF4Wwy2z5uqjSbOlvtbernmVa40wDgYDVR0PAQH/BAQDAgGGMAoGCCqG
+SM49BAMDA2cAMGQCMFOMczFOgFy3njsPCFgTvtlA9vG/ffeZoOvMgAANqnA27TYj
+e0G4FBVWdtOW4xWFZAIwJOT2+L0Tbjq3P9y/zXjfJoBXEq9oZ0//8iuxoqGZtMOT
+G456y3y/FI7r6rj+4QNf
+-----END CERTIFICATE-----
+
+-----BEGIN CERTIFICATE-----
+MIIFpjCCA46gAwIBAgIUbHPJNrGF5QuATVvOwp+D0hpRwaMwDQYJKoZIhvcNAQEN
+BQAwazELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xRDBCBgNV
+BAMTO0VudHJ1c3QgRGlnaXRhbCBTaWduaW5nIFJvb3QgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkgLSBEU1IxMB4XDTIxMTExMjE4Mjg0N1oXDTQwMTIzMDE4Mjg0N1ow
+azELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xRDBCBgNVBAMT
+O0VudHJ1c3QgRGlnaXRhbCBTaWduaW5nIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRo
+b3JpdHkgLSBEU1IxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqS2C
+6cK4I00zul2xjk6mWjsefTLMd9VRNwOxHEqwrNe39xjzzum6Fi64AUqED5EsHVzt
+KqeoDlWjwzyjIvTxgIaCLBsDDKFdkXIg9buMl3ENopcTgz5Sbta4/0GxSCzgeb9L
+fMLsDMdbOEZYwP6wcmJCSmWLJ/lEbO0HZVFktUoEilsUxHq9ErSUjFEAg9C0Phh7
+ihJ1YM3XyM0Cr3XT3CtNx2PAy6Ticoxp2S2JA9botrxQ+ebLVnNjz/yTwYGG6Tqv
++QdNRoLmVwPye8X8NNGc5j13PeNeWwXXxZIWIX9mnMyugAcyonNX5MQ+hsp/72UH
+rbbQbtEzaZI0SBHx5Ee3o65S2QymhHuIWBWKQRaDbu/nhdqRtzLyaybx1enpkl1w
+i4hqz7v1xEcpMu3FS1AlfoexFRSh0NoWGlj10EIkDO8IdDpTH5PghV6qYeVeg7i+
+2Zrb1vcMHQ5JRWbT6WDAEb1KMN0vuaZdWOkvP7EsRJlKxPtktOq3NcNwvmkhd3Bw
+8IC0HbX8eT5v8mHlDHGlpvbSQH82j8EUW7ZD8aMvcB1X+ReNv6bTRloBF54kPxjS
+XcV9ruHPQ/oRWPaKXYUXrciJy/uE7naIAHHqxUrqdy38g6NSiQL4S+qUE4eOfU+U
+Kojit2ezLVkfifk5px4roxgQ7ha03SMC5sftT0cCAwEAAaNCMEAwHQYDVR0OBBYE
+FKZlQYHyW4cFat39ilROj5h73CO4MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
+BAQDAgGGMA0GCSqGSIb3DQEBDQUAA4ICAQCi6KUmCrRRytbVPFjX33uEW1Ny8j5R
+xqpvLZ2H1/j9sAhmYdRYNSzJsedQCcFWoqFHBS7Oba+mk7vZPuZToldy27TqT/u2
+x81nvzjcjGijtWkidwwnCqLyj3EeieMJnOjceMoZ/7NSg9GM5Hz49C511DBXKY1O
+gl+x4RgHMnM39GbAngPPlFDiM76sOP2NxEIlSja/judxsWm2Eh/tOHBnVJu+g6kw
+Md7Oum1nG5RkUaHcUbUnJ5mlFsTUHAC0c85ky8CwX8uLoZ9Zk39ZLJYMpMtIhi5P
+qCEaJkvxmDD9EXLlohH58EfV8s98aAQy3GOtkugHapntfbMHjSmPNPUDZo+RYq2s
+OudOMnsm5FTkW83BDIgPeoLnxBZZHOVy4Yh6gdhpey0cuU5xD++mToxOKAv16LVT
+WQv0Oifp/L+p7dbvsmndApaLGW4MnHSnn+9YIJav8WOo/zvKah0U4//xdaHWPQp8
+6Fv4hSWv67uF22v0leAA6fyhN86br750PIv7UR2kBZOfCnF8Fli7fAIzBOK20QTK
+sEn9loiN7TPb5cHvtvLTRX9Dvr82zadlqpFiHzd/7Uvv7nMXbi8LgNW1asp98aib
+0wGLtsZCwk7heIOOyen6mlJ9TQJsQZsN6QC9SFMjQ4DRRwSQ6ZxkSl1EwOIeFYBf
+oTM3VxKKcl+Yqg==
+-----END CERTIFICATE-----
+
diff --git a/src/Layout/tool_msbuild/tool_msbuild.csproj b/src/Layout/tool_msbuild/tool_msbuild.csproj
index ce1500ce853a..799d057f115c 100644
--- a/src/Layout/tool_msbuild/tool_msbuild.csproj
+++ b/src/Layout/tool_msbuild/tool_msbuild.csproj
@@ -13,6 +13,7 @@
+
diff --git a/src/Layout/toolset-tasks/OverrideAndCreateBundledNETCoreAppPackageVersion.cs b/src/Layout/toolset-tasks/OverrideAndCreateBundledNETCoreAppPackageVersion.cs
index 07684e9cfe30..7afddc804509 100644
--- a/src/Layout/toolset-tasks/OverrideAndCreateBundledNETCoreAppPackageVersion.cs
+++ b/src/Layout/toolset-tasks/OverrideAndCreateBundledNETCoreAppPackageVersion.cs
@@ -51,9 +51,7 @@ public static string ExecuteInternal(
var ns = projectXml.Root.Name.Namespace;
- var propertyGroup = projectXml.Root.Elements(ns + "PropertyGroup").First();
-
- var isSDKServicing = IsSDKServicing(propertyGroup.Element(ns + "NETCoreSdkVersion").Value);
+ var propertyGroup = projectXml.Root.Elements(ns + "PropertyGroup").First();
propertyGroup.Element(ns + "NETCoreSdkVersion").Value = newSDKVersion;
@@ -76,6 +74,8 @@ public static string ExecuteInternal(
propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;
+ var isNETServicing = IsNETServicing(originalBundledNETCoreAppPackageVersion);
+
void CheckAndReplaceElement(XElement element)
{
if (element.Value != originalBundledNETCoreAppPackageVersion)
@@ -101,14 +101,14 @@ void CheckAndReplaceAttribute(XAttribute attribute)
attribute.Value = newBundledPackageVersion;
}
- if (!isSDKServicing)
+ if (!isNETServicing)
{
CheckAndReplaceElement(propertyGroup.Element(ns + "BundledNETCorePlatformsPackageVersion"));
}
var itemGroup = projectXml.Root.Elements(ns + "ItemGroup").First();
- if (!isSDKServicing)
+ if (!isNETServicing)
{
CheckAndReplaceAttribute(itemGroup
.Elements(ns + "KnownFrameworkReference").First().Attribute("DefaultRuntimeFrameworkVersion"));
@@ -138,11 +138,11 @@ void CheckAndReplaceAttribute(XAttribute attribute)
/// so there is no need to replace them.
///
///
- private static bool IsSDKServicing(string sdkVersion)
+ private static bool IsNETServicing(string netVersion)
{
- var parsedSdkVersion = NuGetVersion.Parse(sdkVersion);
+ var parsedSdkVersion = NuGet.Versioning.NuGetVersion.Parse(netVersion);
- return parsedSdkVersion.Patch % 100 != 0;
+ return !parsedSdkVersion.IsPrerelease;
}
}
}
diff --git a/src/RazorSdk/Razor.slnf b/src/RazorSdk/Razor.slnf
index d7b24d0d520d..c29dba3946f8 100644
--- a/src/RazorSdk/Razor.slnf
+++ b/src/RazorSdk/Razor.slnf
@@ -10,10 +10,10 @@
"src\\RazorSdk\\Tool\\Microsoft.NET.Sdk.Razor.Tool.csproj",
"src\\Resolvers\\Microsoft.DotNet.NativeWrapper\\Microsoft.DotNet.NativeWrapper.csproj",
"src\\StaticWebAssetsSdk\\Tasks\\Microsoft.NET.Sdk.StaticWebAssets.Tasks.csproj",
- "src\\Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj",
- "src\\Tests\\Microsoft.NET.Sdk.Razor.Tests\\Microsoft.NET.Sdk.Razor.Tests.csproj",
- "src\\Tests\\Microsoft.NET.Sdk.Razor.Tool.Tests\\Microsoft.NET.Sdk.Razor.Tool.Tests.csproj",
- "src\\Tests\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj",
+ "test\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests\\Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj",
+ "test\\Microsoft.NET.Sdk.Razor.Tests\\Microsoft.NET.Sdk.Razor.Tests.csproj",
+ "test\\Microsoft.NET.Sdk.Razor.Tool.Tests\\Microsoft.NET.Sdk.Razor.Tool.Tests.csproj",
+ "test\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj",
"src\\WasmSdk\\Tasks\\Microsoft.NET.Sdk.WebAssembly.Tasks.csproj"
]
}
diff --git a/src/RazorSdk/update-test-baselines.ps1 b/src/RazorSdk/update-test-baselines.ps1
index 800bed8e8f4c..148963c95fc8 100644
--- a/src/RazorSdk/update-test-baselines.ps1
+++ b/src/RazorSdk/update-test-baselines.ps1
@@ -2,7 +2,7 @@ param([switch] $Validate)
$RepoRoot= Resolve-Path "$PSScriptRoot/../.."
$TestProjects = "Microsoft.NET.Sdk.Razor.Tests", "Microsoft.NET.Sdk.BlazorWebAssembly.Tests" |
- ForEach-Object { Join-Path -Path "$RepoRoot/src/Tests/" -ChildPath $_ };
+ ForEach-Object { Join-Path -Path "$RepoRoot/test/" -ChildPath $_ };
if($Validate){
$TestProjects | ForEach-Object { dotnet test --no-build -l "console;verbosity=normal" $_ --filter AspNetCore=BaselineTest }
diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
index 273d42047bfe..e5e8ff7f3bc6 100644
--- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
+++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
@@ -1,6 +1,8 @@
+
+ 8.0.100.0$(ResolverTargetFramework);net472$(ResolverTargetFramework)AnyCPU
@@ -130,4 +132,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @(ResolvedDependencies->'%(FusionName)')
+ @(ExpectedDependencies->'%(Identity)')
+ This may have consequences for MSBuild.exe binding redirects, please get signoff from the MSBuild team.
+
+
+
+
+
+
diff --git a/src/Tasks/Common/ConflictResolution/ResolvePackageFileConflicts.cs b/src/Tasks/Common/ConflictResolution/ResolvePackageFileConflicts.cs
index c85c13ab0ceb..5d25cae5a7ca 100644
--- a/src/Tasks/Common/ConflictResolution/ResolvePackageFileConflicts.cs
+++ b/src/Tasks/Common/ConflictResolution/ResolvePackageFileConflicts.cs
@@ -11,7 +11,7 @@
namespace Microsoft.NET.Build.Tasks.ConflictResolution
{
- public class ResolvePackageFileConflicts : TaskWithAssemblyResolveHooks
+ public class ResolvePackageFileConflicts : TaskBase
{
private HashSet referenceConflicts = new();
private HashSet analyzerConflicts = new();
diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
index 1afcf5711cc1..5142ace0f4bc 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer se pro cílovou architekturu nepodporuje. Zvažte vícenásobné cílení na podporovanou architekturu, abyste mohli povolit analýzu jednoho souboru, a nastavte EnableSingleFileAnalyzer pouze pro podporované architektury. Například:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible a EnableAotAnalyzer nejsou pro cílovou architekturu podporovány. Zvažte vícenásobné cílení na podporovanou architekturu, abyste umožnili analýzu kompilace předem, a nastavte IsAotCompatible pouze pro podporované architektury. Například:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable a EnableTrimAnalyzer nejsou pro cílovou architekturu podporovány. Zvažte vícenásobné cílení na podporovanou architekturu, která umožňuje oříznutí, a nastavte IsTrimmable pouze pro podporované architektury. Například:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
index c4ba3049f691..603c51c4f16c 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer wird für das Zielframework nicht unterstützt. Erwägen Sie die Festlegung mehrerer Zielversionen auf ein unterstütztes Framework, um die Einzeldateianalyse zu aktivieren, und legen Sie EnableSingleFileAnalyzer nur für die unterstützten Frameworks fest. Beispiel:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible und EnableAotAnalyzer werden für das Zielframework nicht unterstützt. Erwägen Sie die Festlegung mehrerer Zielversionen auf ein unterstütztes Framework, um eine Vorabkompilierungsanalyse zu ermöglichen, und legen Sie IsAotCompatible nur für die unterstützten Frameworks fest. Beispiel:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable und EnableAotAnalyzer werden für das Zielframework nicht unterstützt. Erwägen Sie die Festlegung mehrerer Zielversionen auf ein unterstütztes Framework, um das Kürzen zu aktivieren, und legen Sie IsTrimmable nur für die unterstützten Frameworks fest. Beispiel:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
index ac386276acc1..c5a9e32d8cb7 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer no se admite para la plataforma de destino. Considere la posibilidad de usar varios destinos en un marco compatible para habilitar el análisis de archivos únicos y establezca EnableSingleFileAnalyzer solo para los marcos admitidos. Por ejemplo:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible y EnableAotAnalyzer no se admite para la plataforma de destino. Considere la posibilidad de usar varios destinos en un marco compatible para habilitar el análisis de compilación con antelación y establezca IsAotCompatible solo para los marcos admitidos. Por ejemplo:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable y EnableTrimAnalyzer no se admite para la plataforma de destino. Considere la posibilidad de usar varios destinos en un marco compatible para habilitar el recorte y establezca IsTrimmable solo para los marcos admitidos. Por ejemplo:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
index 4c9b50806dfc..60076da70850 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer n’est pas pris en charge pour le framework cible. Envisagez le ciblage multiple vers un framework pris en charge pour permettre l'analyse d'un fichier unique et définissez EnableSingleFileAnalyzer uniquement pour les frameworks pris en charge. Par exemple :
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible et EnableAotAnalyzer ne sont pas pris en charge pour le framework cible. Envisagez le ciblage multiple vers un framework pris en charge pour permettre une analyse de compilation anticipée et définissez IsAotCompatible uniquement pour les frameworks pris en charge. Par exemple :
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable et EnableTrimAnalyzer ne sont pas pris en charge pour le framework cible. Envisagez le ciblage multiple sur un framework pris en charge pour activer le découpage et définissez IsTrimmable uniquement pour les frameworks pris en charge. Par exemple :
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
index 5f40ac3f27c5..473b30a643eb 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer non è supportato per il framework di destinazione. Prendere in considerazione la multitargeting per un framework supportato per abilitare l'analisi a file singolo e impostare EnableSingleFileAnalyzer solo per i framework supportati. Ad esempio:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible e EnableAotAnalyzer non sono supportati per il framework di destinazione. Prendere in considerazione la multitargeting per un framework supportato per abilitare l'analisi della compilazione in anticipo e impostare IsAotCompatible solo per i framework supportati. Ad esempio:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable e EnableTrimAnalyzer non sono supportati per il framework di destinazione. Prendere in considerazione la multitargeting per un framework supportato per abilitare il taglio e impostare IsTrimmable solo per i framework supportati. Ad esempio:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
index f8fd6fc2cba1..1f7b2ceda03f 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer はターゲット フレームワークではサポートされていません。単一ファイル分析を有効にするには、サポートされているフレームワークに対するマルチターゲットを検討し、サポートされているフレームワークに限り EnableSingleFileAnalyzer を設定してください。例:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible と EnableAotAnalyzer はターゲット フレームワークではサポートされていません。Ahead of Time コンパイル分析を有効にするには、サポートされているフレームワークに対するマルチターゲットを検討し、サポートされているフレームワークに限り IsAotCompatible を設定してください。例:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable と EnableTrimAnalyzer はターゲット フレームワークではサポートされていません。トリミングを有効にするには、サポートされているフレームワークに対するマルチターゲットを検討し、サポートされているフレームワークに限り IsTrimmable を設定してください。例:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
index c3dafeb40577..1394b26b08ba 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: 대상 프레임워크에는 EnableSingleFileAnalyzer가 지원되지 않습니다. 지원되는 프레임워크에 다중 대상을 지정하여 단일 파일 분석을 사용하도록 설정하고 지원되는 프레임워크에 대해서만 EnableSingleFileAnalyzer를 설정하세요. 예:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible 및 EnableAotAnalyzer는 대상 프레임워크에서 지원되지 않습니다. 지원되는 프레임워크에 다중 대상을 지정하여 AOT(Ahead-of-time) 컴파일 분석을 사용하도록 설정하고 지원되는 프레임워크에 대해서만 IsAotCompatible을 설정하세요. 예:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable 및 EnableTrimAnalyzer는 대상 프레임워크에서 지원되지 않습니다. 지원되는 프레임워크에 다중 대상을 지정하여 트리밍을 사용하도록 설정하고 지원되는 프레임워크에 대해서만 IsTrimmable을 설정하세요. 예:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
index 9755e7e76f68..600f88f5c686 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf
@@ -402,8 +402,8 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
-<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
+ NETSDK1211: EnableSingleFileAnalyzer nie jest obsługiwany dla struktury docelowej. Rozważ zastosowanie wielu elementów docelowych do obsługiwanej struktury, aby umożliwić analizę pojedynczych plików, i ustaw parametr EnableSingleFileAnalyzer tylko dla obsługiwanych struktur. Na przykład:
+<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', „{0}”))">wartość prawda</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,15 +572,15 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
-<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
+ NETSDK1210: Elementy IsAotCompatible i EnableAotAnalyzer nie są obsługiwane dla struktury docelowej. Rozważ zastosowanie wielu elementów docelowych do obsługiwanej struktury, aby umożliwić analizę kompilacji z wyprzedzeniem, i ustaw wartość IsAotCompatible tylko dla obsługiwanych struktur. Na przykład:
+<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)„, ”{0}'))">wartość prawda</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
-<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
+ NETSDK1212: Elementy IsTrimmable i EnableTrimAnalyzer nie są obsługiwane dla struktury docelowej. Rozważ zastosowanie wielu elementów docelowych do obsługiwanej struktury, aby włączyć przycinanie, i ustaw właściwość IsTrimmable tylko dla obsługiwanych struktur. Na przykład:
+<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', „{0}”))">wartość prawda</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
index 90f9bf5cb247..5716d169c174 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf
@@ -402,8 +402,8 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
-<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
+ NETSDK1211: EnableSingleFileAnalyzer não é compatível com a estrutura de destino. Considere o direcionamento múltiplo para uma estrutura com suporte para habilitar a análise de arquivo único e defina EnableSingleFileAnalyzer somente para as estruturas com suporte. Por exemplo:
+<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">verdadeiro</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,15 +572,15 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
-<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
+ NETSDK1210: IsAotCompatible e EnableAotAnalyzer não são compatíveis com a estrutura de destino. Considere o direcionamento múltiplo para uma estrutura com suporte para permitir a análise de compilação antecipada e defina IsAotCompatible apenas para as estruturas com suporte. Por exemplo:
+<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">verdadeiro</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
-<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
+ NETSDK1212: IsTrimmable e EnableTrimAnalyzer não são compatíveis com a estrutura de destino. Considere o direcionamento múltiplo para uma estrutura com suporte para habilitar o corte e defina IsTrimmable somente para as estruturas com suporte. Por exemplo:
+<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">verdadeiro</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
index 765f4b5b5a3d..a369a47d397e 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer не поддерживается целевой платформой. Рассмотрите возможность использовать несколько целевых версий для поддерживаемой платформы, чтобы включить анализ одного файла, и настройте EnableSingleFileAnalyzer только для поддерживаемых платформ. Например:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible и EnableAotAnalyzer не поддерживаются для целевой платформы. Рассмотрите возможность использовать несколько целевых версий для поддерживаемой платформы, чтобы включить анализ компиляции AOT, и задайте параметр IsAotCompatible только для поддерживаемых платформ. Пример:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable и EnableTrimAnalyzer не поддерживаются для целевой платформы. Рассмотрите возможность использовать несколько целевых версий для поддерживаемой платформы, чтобы включить обрезку, и задайте параметр IsTrimmable только для поддерживаемых платформ. Пример:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
index 7b4e8ba729ab..6438fdaeb042 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: EnableSingleFileAnalyzer hedef altyapı için desteklenmiyor. Tek dosya analizini etkinleştirmek için desteklenen bir altyapıya çoklu hedeflemeyi kullanabilir ve EnableSingleFileAnalyzer ayarını yalnızca desteklenen altyapılar için yapabilirsiniz. Örneğin:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: IsAotCompatible ve EnableAotAnalyzer hedef altyapı için desteklenmiyor. Önceden derleme analizini etkinleştirmek için desteklenen bir altyapıya çoklu hedefleme uygulayabilir ve IsAotCompatible ayarını yalnızca desteklenen altyapılar için yapabilirsiniz. Örneğin:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: IsTrimmable ve EnableTrimAnalyzer hedef altyapı için desteklenmiyor. Kırpmayı etkinleştirmek için desteklenen bir altyapıya çoklu hedefleme uygulayabilir ve IsTrimmable ayarını yalnızca desteklenen altyapılar için yapabilirsiniz. Örneğin:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
index 0552b3382c13..90acbf415ec2 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: 目标框架不支持 EnableSingleFileAnalyzer。请考虑对受支持的框架进行多目标设定来启用单文件分析,并且仅为受支持的框架设置 EnableSingleFileAnalyzer。例如:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: 目标框架不支持 IsAotCompatible 和 EnableAotAnalyzer。请考虑对受支持的框架进行多目标设定来启用提前编译分析,并且仅为受支持的框架设置 IsAotCompatible。例如:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: 目标框架不支持 IsTrimmable 和 EnableTrimAnalyzer。请考虑对受支持的框架进行多目标设定以启用剪裁,并且仅为受支持的框架设置 IsTrimmable。例如:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
index a8043829c834..7d328e9ccf0a 100644
--- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
+++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf
@@ -402,7 +402,7 @@
NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>
- NETSDK1211: EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
+ NETSDK1211: 目標架構不支援 EnableSingleFileAnalyzer。考慮對支援的架構設定多重目標,以啟用單一檔案分析,並僅針對支援的架構設定 EnableSingleFileAnalyzer。例如:
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>{StrBegin="NETSDK1211: "}
@@ -572,14 +572,14 @@ The following are names of parameters or literal values and should not be transl
NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>
- NETSDK1210: IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
+ NETSDK1210: 目標架構不支援 IsAotCompatible 和 EnableAotAnalyzer。考慮對支援的架構設定多重目標,以啟用提前編譯分析,並僅針對支援的架構設定 IsAotCompatible。例如:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsAotCompatible>{StrBegin="NETSDK1210: "}NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>
- NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
+ NETSDK1212: 目標架構不支援 IsTrimmable 和 EnableTrimAnalyzer。考慮對支援的架構設定多重目標,以啟用修剪,並僅針對支援的架構設定 IsTrimmable。例如:
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</IsTrimmable>{StrBegin="NETSDK1212: "}
diff --git a/src/Tasks/Common/TaskWithAssemblyResolveHooks.cs b/src/Tasks/Common/TaskWithAssemblyResolveHooks.cs
deleted file mode 100644
index c7fddb85d8ce..000000000000
--- a/src/Tasks/Common/TaskWithAssemblyResolveHooks.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//Microsoft.NET.Build.Extensions.Tasks (net7.0) has nullables disabled
-#pragma warning disable IDE0240 // Remove redundant nullable directive
-#nullable disable
-#pragma warning restore IDE0240 // Remove redundant nullable directive
-
-using System.Reflection;
-
-namespace Microsoft.NET.Build.Tasks
-{
- ///
- /// Inherit from this task instead of if your task needs "binding redirects"
- /// to the latest versions of assemblies that ship as part of the SDK.
- ///
- public abstract class TaskWithAssemblyResolveHooks : TaskBase
- {
-#if NET472
- ///
- /// AssemblyResolve event handler that will bind to the System.Reflection.Metadata that ships with the SDK.
- ///
- ///
- /// This should not be necessary, but the current version of Microsoft.NET.HostModel predates .NET 5.0
- /// and thus has a dependency on System.Reflection.Metadata 1.4.5.0 and System.Collections.Immutable 1.2.5.0,
- /// while the SDK ships with 5.0.0.0 versions. This will fail to resolve SRM/SCI at runtime. We can add this
- /// hook to load whatever version is shipping with the SDK, which should always be higher than the HostModel
- /// reference.
- ///
- /// DELETE THIS when/if HostModel is updated to have an SRM dependency that's coherent with .NET.
- ///
- private static Assembly ResolverForBindingRedirects(object sender, ResolveEventArgs args)
- {
- AssemblyName name = new(args.Name);
- return name.Name switch
- {
- "System.Reflection.Metadata" or "System.Collections.Immutable" =>
- Assembly.LoadFrom(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), $"{name.Name}.dll")),
- _ => null,
- };
- }
-
- public override bool Execute()
- {
- AppDomain.CurrentDomain.AssemblyResolve += ResolverForBindingRedirects;
-
- try
- {
- return base.Execute();
- }
- finally
- {
- AppDomain.CurrentDomain.AssemblyResolve -= ResolverForBindingRedirects;
- }
- }
-#endif
- }
-}
diff --git a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks.UnitTests/Microsoft.NET.Build.Extensions.Tasks.UnitTests.csproj b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks.UnitTests/Microsoft.NET.Build.Extensions.Tasks.UnitTests.csproj
index 9fbe6990e2ff..109d01102759 100644
--- a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks.UnitTests/Microsoft.NET.Build.Extensions.Tasks.UnitTests.csproj
+++ b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks.UnitTests/Microsoft.NET.Build.Extensions.Tasks.UnitTests.csproj
@@ -2,8 +2,6 @@
-
-
Tests\$(MSBuildProjectName)
@@ -30,7 +28,7 @@
-
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Microsoft.NET.Build.Tasks.UnitTests.csproj b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Microsoft.NET.Build.Tasks.UnitTests.csproj
index c6e5b535ebba..f12b4090a865 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Microsoft.NET.Build.Tasks.UnitTests.csproj
+++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Microsoft.NET.Build.Tasks.UnitTests.csproj
@@ -30,12 +30,12 @@
-
+
-
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/CreateComHost.cs b/src/Tasks/Microsoft.NET.Build.Tasks/CreateComHost.cs
index 63666ba7b95a..ce9a3a65f9a3 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/CreateComHost.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/CreateComHost.cs
@@ -6,7 +6,7 @@
namespace Microsoft.NET.Build.Tasks
{
- public class CreateComHost : TaskWithAssemblyResolveHooks
+ public class CreateComHost : TaskBase
{
[Required]
public string ComHostSourcePath { get; set; }
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs
index 956cf075a3d9..9166759f6b0c 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs
@@ -6,7 +6,7 @@
namespace Microsoft.NET.Build.Tasks
{
- public class GenerateBundle : TaskWithAssemblyResolveHooks
+ public class GenerateBundle : TaskBase
{
[Required]
public ITaskItem[] FilesToBundle { get; set; }
@@ -41,6 +41,9 @@ protected override void ExecuteCore()
RuntimeIdentifier.EndsWith("-x86") || RuntimeIdentifier.Contains("-x86-") ? Architecture.X86 :
RuntimeIdentifier.EndsWith("-arm64") || RuntimeIdentifier.Contains("-arm64-") ? Architecture.Arm64 :
RuntimeIdentifier.EndsWith("-arm") || RuntimeIdentifier.Contains("-arm-") ? Architecture.Arm :
+#if !NETFRAMEWORK
+ RuntimeIdentifier.EndsWith("-riscv64") || RuntimeIdentifier.Contains("-riscv64-") ? Architecture.RiscV64 :
+#endif
throw new ArgumentException(nameof(RuntimeIdentifier));
BundleOptions options = BundleOptions.None;
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateClsidMap.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateClsidMap.cs
index d34844455790..df4e2e0239b3 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateClsidMap.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateClsidMap.cs
@@ -8,7 +8,7 @@
namespace Microsoft.NET.Build.Tasks
{
- public class GenerateClsidMap : TaskWithAssemblyResolveHooks
+ public class GenerateClsidMap : TaskBase
{
[Required]
public string IntermediateAssembly { get; set; }
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs
index aeb94d96f20b..fc4cc2a2d429 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs
@@ -14,7 +14,7 @@ namespace Microsoft.NET.Build.Tasks
///
/// Generates the $(project).deps.json file.
///
- public class GenerateDepsFile : TaskWithAssemblyResolveHooks
+ public class GenerateDepsFile : TaskBase
{
[Required]
public string ProjectPath { get; set; }
@@ -198,15 +198,15 @@ bool ShouldIncludeRuntimeAsset(ITaskItem item)
{
// Generate the RID-fallback for self-contained builds.
//
- // In order to support loading components with RID-specific assets,
+ // In order to support loading components with RID-specific assets,
// the AssemblyDependencyResolver requires a RID fallback graph.
// The component itself should not carry the RID fallback graph with it, because
// it would need to carry graph of all the RIDs and needs updates for newer RIDs.
- // For framework dependent apps, the RID fallback graph comes from the core framework Microsoft.NETCore.App,
+ // For framework dependent apps, the RID fallback graph comes from the core framework Microsoft.NETCore.App,
// so there is no need to write it into the app.
// If self-contained apps, the (applicable subset of) RID fallback graph needs to be written to the deps.json manifest.
//
- // If a RID-graph is provided to the DependencyContextBuilder, it generates a RID-fallback
+ // If a RID-graph is provided to the DependencyContextBuilder, it generates a RID-fallback
// graph with respect to the target RuntimeIdentifier.
RuntimeGraph runtimeGraph =
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateRegFreeComManifest.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateRegFreeComManifest.cs
index 2138720b29f5..5ff79c2950fa 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateRegFreeComManifest.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateRegFreeComManifest.cs
@@ -6,7 +6,7 @@
namespace Microsoft.NET.Build.Tasks
{
- public class GenerateRegFreeComManifest : TaskWithAssemblyResolveHooks
+ public class GenerateRegFreeComManifest : TaskBase
{
[Required]
public string IntermediateAssembly { get; set; }
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs
index 1326df309e99..e16d5e3a9ef9 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs
@@ -8,7 +8,7 @@
namespace Microsoft.NET.Build.Tasks
{
- public sealed class GenerateShims : TaskWithAssemblyResolveHooks
+ public sealed class GenerateShims : TaskBase
{
///
/// Relative paths for Apphost for different ShimRuntimeIdentifiers with RuntimeIdentifier as meta data
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj
index 6df4f446bea5..078b79192b43 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj
@@ -52,10 +52,10 @@
-
-
-
-
+
+
+
+
@@ -71,9 +71,9 @@
the same System.Reflection.Metadata assembly and their types can unify. See the following link for the MSBuild binding redirect config.
https://github.com/dotnet/msbuild/blob/5d102ae37163fc1f22610bb433c3ab9a2fff91f0/src/MSBuild/app.config#L59
-->
-
-
-
+
+
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs
index cd9038c99797..dde339906b46 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs
@@ -193,11 +193,11 @@ private bool GetCrossgen2TargetOS(out string targetOS)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- portablePlatform = "linux";
+ portablePlatform = "win";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
- portablePlatform = "win";
+ portablePlatform = "linux";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
@@ -257,6 +257,11 @@ private static bool ExtractTargetPlatformAndArchitecture(string runtimeIdentifie
case "arm64":
architecture = Architecture.Arm64;
break;
+#if !NETFRAMEWORK
+ case "riscv64":
+ architecture = Architecture.RiscV64;
+ break;
+#endif
case "x64":
architecture = Architecture.X64;
break;
@@ -424,6 +429,9 @@ private static string ArchitectureToString(Architecture architecture)
Architecture.X64 => "x64",
Architecture.Arm => "arm",
Architecture.Arm64 => "arm64",
+#if !NETFRAMEWORK
+ Architecture.RiscV64 => "riscv64",
+#endif
_ => null
};
}
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.props b/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.props
index 404a3d71f4d2..00c466b9e31d 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.props
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.props
@@ -11,6 +11,13 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
+
+ <_AfterSdkPublishDependsOn Condition="'$(_IsAspNetCoreProject)' == 'true'">AfterPublish
+ <_AfterSdkPublishDependsOn Condition="'$(_IsAspNetCoreProject)' != 'true'">Publish
+
+
+
+
true
-
-
-
-
-
-
- true
-
-
- <_DirectoryBuildPropsFile Condition="'$(_DirectoryBuildPropsFile)' == ''">Directory.Build.props
- <_DirectoryBuildPropsBasePath Condition="'$(_DirectoryBuildPropsBasePath)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), '$(_DirectoryBuildPropsFile)'))
- $([System.IO.Path]::Combine('$(_DirectoryBuildPropsBasePath)', '$(_DirectoryBuildPropsFile)'))
-
-
-
-
-
- false
-
-
-
-
-
-
- true
- $(MSBuildProjectName)
-
-
-
- $(ArtifactsPath)\obj\$(ArtifactsProjectName)\
- $(ArtifactsPath)\obj\
-
-
-
- <_ArtifactsPathSetEarly>true
+ $(CustomAfterDirectoryBuildProps);$(MSBuildThisFileDirectory)UseArtifactsOutputPath.props
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets
index 136d5d2cb673..a506081a2017 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets
@@ -52,4 +52,15 @@ Copyright (c) .NET Foundation. All rights reserved.
+
+
+
+ <_ContainersTargetsDir Condition=" '$(_ContainersTargetsDir)'=='' ">$(MSBuildThisFileDirectory)..\..\..\Containers\build\
+
+
+
+
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/sdk/UseArtifactsOutputPath.props b/src/Tasks/Microsoft.NET.Build.Tasks/sdk/UseArtifactsOutputPath.props
new file mode 100644
index 000000000000..1dd11c8d49ad
--- /dev/null
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/sdk/UseArtifactsOutputPath.props
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ true
+ $(MSBuildProjectName)
+
+
+
+ $(ArtifactsPath)\obj\$(ArtifactsProjectName)\
+ $(ArtifactsPath)\obj\
+
+
+
+
+ <_ArtifactsPathSetEarly>true
+
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets
index 69aef6dfa407..0a1efbdccdfd 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets
@@ -11,7 +11,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
- $(IntermediateOutputPath)$(MSBuildThisFileName).semaphore
+ <_ApiCompatValidatePackageSemaphoreFile>$(IntermediateOutputPath)$(MSBuildThisFileName).semaphore
CollectApiCompatInputs;_GetReferencePathFromInnerProjects;$(RunPackageValidationDependsOn)
@@ -22,7 +22,7 @@ Copyright (c) .NET Foundation. All rights reserved.
Inputs="@(NuGetPackInput);
@(ApiCompatSuppressionFile);
$(ApiCompatSuppressionOutputFile)"
- Outputs="$(ApiCompatValidatePackageSemaphoreFile)"
+ Outputs="$(_ApiCompatValidatePackageSemaphoreFile)"
Condition="'$(EnablePackageValidation)' == 'true' and '$(IsPackable)' == 'true'">
$(PackageId)
@@ -55,10 +55,11 @@ Copyright (c) .NET Foundation. All rights reserved.
SuppressionOutputFile="$(ApiCompatSuppressionOutputFile)"
BaselinePackageTargetPath="$(_packageValidationBaselinePath)"
RoslynAssembliesPath="$(RoslynAssembliesPath)"
- PackageAssemblyReferences="@(PackageValidationReferencePath)" />
+ PackageAssemblyReferences="@(PackageValidationReferencePath)"
+ BaselinePackageFrameworksToIgnore="@(PackageValidationBaselineFrameworkToIgnore)" />
-
-
+
+
-
<_RequiresILLinkPack Condition="'$(_RequiresILLinkPack)' == '' And (
@@ -101,7 +101,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_SilenceIsTrimmableUnsupportedWarning Condition="'$(_SilenceIsTrimmableUnsupportedWarning)' == '' And
@(_TargetFrameworkToSilenceIsTrimmableUnsupportedWarning->Count()) > 0">true
- <_SilenceIsAotCompatibleUnsupportedWarning Condition="'$(_SilenceIsAotCompatibleUnsupportedWarning)' == '' And
+ <_SilenceIsAotCompatibleUnsupportedWarning Condition="'$(_SilenceIsAotCompatibleUnsupportedWarning)' == '' And
@(_TargetFrameworkToSilenceIsAotCompatibleUnsupportedWarning->Count()) > 0">true
<_SilenceEnableSingleFileAnalyzerUnsupportedWarning Condition="'$(_SilenceEnableSingleFileAnalyzerUnsupportedWarning)' == '' And
@(_TargetFrameworkToSilenceEnableSingleFileAnalyzerUnsupportedWarning->Count()) > 0">true
@@ -694,6 +694,30 @@ Copyright (c) .NET Foundation. All rights reserved.
+
+
+
+
+
+ <_SourceItemsToCopyToPublishDirectoryAlways Remove="$(AppHostIntermediatePath)" />
+ <_SourceItemsToCopyToPublishDirectory Remove="$(AppHostIntermediatePath)" />
+
+
+ <_SourceItemsToCopyToPublishDirectoryAlways Include="$(SingleFileHostIntermediatePath)" CopyToOutputDirectory="Always" TargetPath="$(AssemblyName)$(_NativeExecutableExtension)" />
+
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
index b13663b614a0..363f9f2f6987 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
@@ -54,11 +54,13 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<_UsingDefaultRuntimeIdentifier>true
win7-x64win7-x86
+ win-x64
+ win-x86
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.SourceLink.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.SourceLink.targets
index 99dbd6e5a01b..1bc648fe96b2 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.SourceLink.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.SourceLink.targets
@@ -20,7 +20,8 @@ Copyright (c) .NET Foundation. All rights reserved.
<_SourceLinkSdkSubDir>build
<_SourceLinkSdkSubDir Condition="'$(IsCrossTargetingBuild)' == 'true'">buildMultiTargeting
- true
+
+ true
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
index d0819571700d..33416bf8fed3 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
@@ -689,6 +689,27 @@ Copyright (c) .NET Foundation. All rights reserved.
+
+
+
+ <_UseWindowsGraphicalUserInterface Condition="($(RuntimeIdentifier.StartsWith('win')) or $(DefaultAppHostRuntimeIdentifier.StartsWith('win'))) and '$(OutputType)'=='WinExe'">true
+ <_EnableMacOSCodeSign Condition="'$(_EnableMacOSCodeSign)' == '' and $([MSBuild]::IsOSPlatform(`OSX`)) and Exists('/usr/bin/codesign') and
+ ($(RuntimeIdentifier.StartsWith('osx')) or $(AppHostRuntimeIdentifier.StartsWith('osx')))">true
+ <_UseSingleFileHostForPublish Condition="'$(PublishSingleFile)' == 'true' and
+ '$(SelfContained)' == 'true' and
+ '$(SingleFileHostSourcePath)' != '' and
+ '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
+ $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))">true
+
+
+
-
-
- $(SingleFileHostSourcePath)
- $([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)singlefilehost$(_NativeExecutableExtension)'))
-
-
-
@@ -895,7 +891,6 @@ Copyright (c) .NET Foundation. All rights reserved.
-
-
-
-
-
-
-
-
diff --git a/src/WasmSdk/Sdk/Sdk.props b/src/WasmSdk/Sdk/Sdk.props
index 8e98e310d08a..4aa3e02eaaed 100644
--- a/src/WasmSdk/Sdk/Sdk.props
+++ b/src/WasmSdk/Sdk/Sdk.props
@@ -16,14 +16,16 @@ Copyright (c) .NET Foundation. All rights reserved.
browser-wasmtrue
-
truetrue
+
+ false
+
<_WasmSdkImportsMicrosoftNETSdkPublish Condition="'$(UsingMicrosoftNETSdkPublish)' != 'true'">true
<_WasmSdkImportsMicrosoftNETSdkStaticWebAssets Condition="'$(UsingMicrosoftNETSdkStaticWebAssets)' != 'true'">true
-
+
diff --git a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props
index ac284f1689d5..862cdafc5d89 100644
--- a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props
+++ b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props
@@ -15,7 +15,4 @@ Copyright (c) .NET Foundation. All rights reserved.
true
-
-
diff --git a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets
index b7c1c1ac853b..fcb80c1dfe2f 100644
--- a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets
+++ b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets
@@ -29,7 +29,6 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<_PublishTargetsDir Condition=" '$(_PublishTargetsDir)'=='' ">$(MSBuildThisFileDirectory)PublishTargets\
<_DotNetCLIToolTargetsDir Condition=" '$(_DotNetCLIToolTargetsDir)'=='' ">$(MSBuildThisFileDirectory)DotNetCLIToolTargets\
<_PublishProfilesDir Condition=" '$(_PublishProfilesDir)'=='' ">$(MSBuildThisFileDirectory)PublishProfiles\
- <_ContainersTargetsDir Condition=" '$(_ContainersTargetsDir)'=='' ">$(MSBuildThisFileDirectory)..\..\..\Containers\build\
-
-
-
-
+
+
+
+
+ true
+
+
+
+
+
diff --git a/src/Tests/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj b/test/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj
similarity index 94%
rename from src/Tests/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj
rename to test/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj
index ff90346f3d59..0a8b0483b7be 100644
--- a/src/Tests/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj
+++ b/test/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/Tests/ArgumentForwarding.Tests/ArgumentForwardingTests.cs b/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs
similarity index 100%
rename from src/Tests/ArgumentForwarding.Tests/ArgumentForwardingTests.cs
rename to test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs
diff --git a/src/Tests/ArgumentsReflector/ArgumentsReflector.csproj b/test/ArgumentsReflector/ArgumentsReflector.csproj
similarity index 100%
rename from src/Tests/ArgumentsReflector/ArgumentsReflector.csproj
rename to test/ArgumentsReflector/ArgumentsReflector.csproj
diff --git a/src/Tests/ArgumentsReflector/Reflector.cs b/test/ArgumentsReflector/Reflector.cs
similarity index 100%
rename from src/Tests/ArgumentsReflector/Reflector.cs
rename to test/ArgumentsReflector/Reflector.cs
diff --git a/src/Tests/ArgumentsReflector/reflector_cmd.cmd b/test/ArgumentsReflector/reflector_cmd.cmd
similarity index 100%
rename from src/Tests/ArgumentsReflector/reflector_cmd.cmd
rename to test/ArgumentsReflector/reflector_cmd.cmd
diff --git a/src/Tests/Common/Empty.props b/test/Common/Empty.props
similarity index 100%
rename from src/Tests/Common/Empty.props
rename to test/Common/Empty.props
diff --git a/src/Tests/Common/Empty.targets b/test/Common/Empty.targets
similarity index 100%
rename from src/Tests/Common/Empty.targets
rename to test/Common/Empty.targets
diff --git a/src/Tests/Common/Program.UnitTests.cs b/test/Common/Program.UnitTests.cs
similarity index 100%
rename from src/Tests/Common/Program.UnitTests.cs
rename to test/Common/Program.UnitTests.cs
diff --git a/src/Tests/Common/Program.cs b/test/Common/Program.cs
similarity index 100%
rename from src/Tests/Common/Program.cs
rename to test/Common/Program.cs
diff --git a/src/Tests/Directory.Build.props b/test/Directory.Build.props
similarity index 96%
rename from src/Tests/Directory.Build.props
rename to test/Directory.Build.props
index 75289dab8b59..82e7362363f8 100644
--- a/src/Tests/Directory.Build.props
+++ b/test/Directory.Build.props
@@ -7,7 +7,7 @@
$(DefaultItemExcludes);**/*.tmp
-
+ true
diff --git a/src/Tests/Directory.Build.targets b/test/Directory.Build.targets
similarity index 94%
rename from src/Tests/Directory.Build.targets
rename to test/Directory.Build.targets
index 48565a5e5c1d..0aa80c6f4e1e 100644
--- a/src/Tests/Directory.Build.targets
+++ b/test/Directory.Build.targets
@@ -22,7 +22,7 @@
-
@@ -81,6 +81,6 @@
IgnoreStandardErrorWarningFormat="true" />
-
+
diff --git a/src/Tests/EndToEnd.Tests/EndToEnd.Tests.csproj b/test/EndToEnd.Tests/EndToEnd.Tests.csproj
similarity index 100%
rename from src/Tests/EndToEnd.Tests/EndToEnd.Tests.csproj
rename to test/EndToEnd.Tests/EndToEnd.Tests.csproj
diff --git a/src/Tests/EndToEnd.Tests/GivenDotNetLinuxInstallers.cs b/test/EndToEnd.Tests/GivenDotNetLinuxInstallers.cs
similarity index 100%
rename from src/Tests/EndToEnd.Tests/GivenDotNetLinuxInstallers.cs
rename to test/EndToEnd.Tests/GivenDotNetLinuxInstallers.cs
diff --git a/src/Tests/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs b/test/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs
similarity index 100%
rename from src/Tests/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs
rename to test/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs
diff --git a/src/Tests/EndToEnd.Tests/GivenDotnetUsesDotnetTools.cs b/test/EndToEnd.Tests/GivenDotnetUsesDotnetTools.cs
similarity index 100%
rename from src/Tests/EndToEnd.Tests/GivenDotnetUsesDotnetTools.cs
rename to test/EndToEnd.Tests/GivenDotnetUsesDotnetTools.cs
diff --git a/src/Tests/EndToEnd.Tests/GivenNetFrameworkSupportsNetStandard2.cs b/test/EndToEnd.Tests/GivenNetFrameworkSupportsNetStandard2.cs
similarity index 100%
rename from src/Tests/EndToEnd.Tests/GivenNetFrameworkSupportsNetStandard2.cs
rename to test/EndToEnd.Tests/GivenNetFrameworkSupportsNetStandard2.cs
diff --git a/src/Tests/HelixTasks/AssemblyScheduler.cs b/test/HelixTasks/AssemblyScheduler.cs
similarity index 100%
rename from src/Tests/HelixTasks/AssemblyScheduler.cs
rename to test/HelixTasks/AssemblyScheduler.cs
diff --git a/src/Tests/HelixTasks/CreateLocalHelixTestLayout.cs b/test/HelixTasks/CreateLocalHelixTestLayout.cs
similarity index 100%
rename from src/Tests/HelixTasks/CreateLocalHelixTestLayout.cs
rename to test/HelixTasks/CreateLocalHelixTestLayout.cs
diff --git a/src/Tests/HelixTasks/HelixTasks.csproj b/test/HelixTasks/HelixTasks.csproj
similarity index 100%
rename from src/Tests/HelixTasks/HelixTasks.csproj
rename to test/HelixTasks/HelixTasks.csproj
diff --git a/src/Tests/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs b/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs
similarity index 100%
rename from src/Tests/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs
rename to test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs
diff --git a/src/Tests/HelixTasks/TarGzFileCreateFromDirectory.cs b/test/HelixTasks/TarGzFileCreateFromDirectory.cs
similarity index 100%
rename from src/Tests/HelixTasks/TarGzFileCreateFromDirectory.cs
rename to test/HelixTasks/TarGzFileCreateFromDirectory.cs
diff --git a/src/Tests/HelixTasks/TaskItemExtensions.cs b/test/HelixTasks/TaskItemExtensions.cs
similarity index 100%
rename from src/Tests/HelixTasks/TaskItemExtensions.cs
rename to test/HelixTasks/TaskItemExtensions.cs
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs
similarity index 97%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs
index cdb268b290b1..8c32b0c4dc38 100644
--- a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs
+++ b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs
@@ -41,7 +41,7 @@ public async Task DeltasAreSavedOnPost()
// Assert
AssertDeltas(deltas, middleware.Deltas);
- Assert.NotEmpty(context.Response.Headers["ETag"]);
+ Assert.NotEqual(0, context.Response.Headers["ETag"].Count);
}
[Fact]
@@ -82,7 +82,7 @@ public async Task DuplicateDeltasOnPostAreIgnored()
// Assert
AssertDeltas(deltas, middleware.Deltas);
- Assert.NotEmpty(context.Response.Headers["ETag"]);
+ Assert.NotEqual(0, context.Response.Headers["ETag"].Count);
}
[Fact]
@@ -149,7 +149,7 @@ public async Task MultipleDeltaPayloadsCanBeAccepted()
// Assert
deltas.AddRange(newDeltas);
AssertDeltas(deltas, middleware.Deltas);
- Assert.NotEmpty(context.Response.Headers["ETag"]);
+ Assert.NotEqual(0, context.Response.Headers["ETag"].Count);
}
[Fact]
@@ -203,7 +203,7 @@ public async Task GetReturnsDeltas()
Assert.Equal(
JsonSerializer.SerializeToUtf8Bytes(deltas, new JsonSerializerOptions(JsonSerializerDefaults.Web)),
stream.ToArray());
- Assert.NotEmpty(context.Response.Headers[HeaderNames.ETag]);
+ Assert.NotEqual(0, context.Response.Headers[HeaderNames.ETag].Count);
}
[Fact]
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs
similarity index 100%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs
similarity index 97%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs
index 0db8346b4070..ee20f24e0fa0 100644
--- a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs
+++ b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs
@@ -52,7 +52,7 @@ public async Task InvokeAsync_ConfiguresHeaders()
kvp =>
{
Assert.Equal("Content-Length", kvp.Key);
- Assert.NotEmpty(kvp.Value);
+ Assert.NotEqual(0, kvp.Value.Count);
},
kvp =>
{
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs
similarity index 100%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj
similarity index 100%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/WebSocketScriptInjectionTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/WebSocketScriptInjectionTest.cs
similarity index 100%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/WebSocketScriptInjectionTest.cs
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/WebSocketScriptInjectionTest.cs
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/favicon.ico b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/favicon.ico
similarity index 100%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/favicon.ico
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/favicon.ico
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/index.html b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/index.html
similarity index 100%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/index.html
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/index.html
diff --git a/src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/largefile.html b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/largefile.html
similarity index 100%
rename from src/Tests/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/largefile.html
rename to test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/wwwroot/largefile.html
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs b/test/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs
rename to test/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj b/test/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj
similarity index 87%
rename from src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj
rename to test/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj
index 4cd55d2ec680..48ca6c84d0de 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj
+++ b/test/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj
@@ -1,7 +1,7 @@
- net472;$(ToolsetTargetFramework)
+ $(ToolsetTargetFramework);$(NetFrameworkToolCurrent)Exetrue
@@ -24,7 +24,7 @@
-
+
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidateAssembliesTargetIntegrationTests.cs b/test/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidateAssembliesTargetIntegrationTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidateAssembliesTargetIntegrationTests.cs
rename to test/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidateAssembliesTargetIntegrationTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs b/test/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs
rename to test/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj b/test/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj
similarity index 93%
rename from src/Tests/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj
rename to test/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj
index b74846a977d4..80b198c4ce81 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj
+++ b/test/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj
@@ -1,7 +1,7 @@
- net472;$(ToolsetTargetFramework)
+ $(ToolsetTargetFramework);$(NetFrameworkToolCurrent)$(ToolsetTargetFramework)Exetrue
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.Tests/RegexStringTransformerTests.cs b/test/Microsoft.DotNet.ApiCompat.Tests/RegexStringTransformerTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompat.Tests/RegexStringTransformerTests.cs
rename to test/Microsoft.DotNet.ApiCompat.Tests/RegexStringTransformerTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CompatDifferenceTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/CompatDifferenceTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CompatDifferenceTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/CompatDifferenceTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/EmptyTestSuppressionEngine.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/EmptyTestSuppressionEngine.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/EmptyTestSuppressionEngine.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/EmptyTestSuppressionEngine.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionEngineTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionEngineTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionEngineTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionEngineTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/TestSuppressionEngine.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/TestSuppressionEngine.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Logging/TestSuppressionEngine.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Logging/TestSuppressionEngine.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblyMapperTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblyMapperTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblyMapperTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblyMapperTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblySetMapperTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblySetMapperTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblySetMapperTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblySetMapperTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/MemberMapperTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/MemberMapperTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/MemberMapperTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/MemberMapperTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/NamespaceMapperTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/NamespaceMapperTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/NamespaceMapperTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/NamespaceMapperTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/TypeMapperTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/TypeMapperTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/TypeMapperTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/TypeMapperTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj b/test/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
similarity index 83%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
index ff6ec7c0ba2b..e2c0ccd07842 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
+++ b/test/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
@@ -1,8 +1,7 @@
- net472;$(ToolsetTargetFramework)
- $(ToolsetTargetFramework)
+ $(ToolsetTargetFramework);$(NetFrameworkToolCurrent)Exetrue
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatOptionsTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatOptionsTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatOptionsTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatOptionsTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatWorkItemTests.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatWorkItemTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatWorkItemTests.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatWorkItemTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SuppressibleTestLog.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/SuppressibleTestLog.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SuppressibleTestLog.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/SuppressibleTestLog.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs b/test/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs
rename to test/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/AssemblySymbolLoaderTests.cs b/test/Microsoft.DotNet.ApiSymbolExtensions.Tests/AssemblySymbolLoaderTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/AssemblySymbolLoaderTests.cs
rename to test/Microsoft.DotNet.ApiSymbolExtensions.Tests/AssemblySymbolLoaderTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj b/test/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj
similarity index 77%
rename from src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj
rename to test/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj
index 39df17155208..9cb2cadbe2ed 100644
--- a/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj
+++ b/test/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj
@@ -1,8 +1,7 @@
- net472;$(ToolsetTargetFramework)
- $(ToolsetTargetFramework)
+ $(ToolsetTargetFramework);$(NetFrameworkToolCurrent)Exetrue
diff --git a/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs b/test/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs
rename to test/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs
diff --git a/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/TempDirectory.cs b/test/Microsoft.DotNet.ApiSymbolExtensions.Tests/TempDirectory.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/TempDirectory.cs
rename to test/Microsoft.DotNet.ApiSymbolExtensions.Tests/TempDirectory.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.cs b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.cs
rename to test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
similarity index 83%
rename from src/Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
rename to test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
index 6747431e044d..1c9566e18687 100644
--- a/src/Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
+++ b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/src/Tests/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/SenderTests.cs b/test/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/SenderTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/SenderTests.cs
rename to test/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/SenderTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/StorageTests.cs b/test/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/StorageTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/StorageTests.cs
rename to test/Microsoft.DotNet.Cli.Telemetry.PersistenceChannel.Tests/StorageTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/ArgumentEscaperTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/ArgumentEscaperTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/ArgumentEscaperTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/ArgumentEscaperTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/BlockingMemoryStreamTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/BlockingMemoryStreamTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/BlockingMemoryStreamTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/BlockingMemoryStreamTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/BuiltInCommandTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/BuiltInCommandTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/BuiltInCommandTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/BuiltInCommandTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/DangerousFileDetectorTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/DangerousFileDetectorTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/DangerousFileDetectorTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/DangerousFileDetectorTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/DependencyProviderTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/DependencyProviderTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/DependencyProviderTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/DependencyProviderTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/DotDefaultPathCorrectorTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/DotDefaultPathCorrectorTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/DotDefaultPathCorrectorTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/DotDefaultPathCorrectorTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/GivenAFrameworkDependencyFile.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAFrameworkDependencyFile.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/GivenAFrameworkDependencyFile.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/GivenAFrameworkDependencyFile.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/GivenAppThrowingException.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAppThrowingException.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/GivenAppThrowingException.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/GivenAppThrowingException.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
similarity index 80%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
rename to test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
index 3f90f1d16199..26b3ab5addb4 100644
--- a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
+++ b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/PathUtilityTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/PathUtilityTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/PathUtilityTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/PathUtilityTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/ProcessExtensionsTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/ProcessExtensionsTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/ProcessExtensionsTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/ProcessExtensionsTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/RuntimeEnvironmentTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/RuntimeEnvironmentTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/RuntimeEnvironmentTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/RuntimeEnvironmentTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Cli.Utils.Tests/TypoCorrectionTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/TypoCorrectionTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Cli.Utils.Tests/TypoCorrectionTests.cs
rename to test/Microsoft.DotNet.Cli.Utils.Tests/TypoCorrectionTests.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/CommandResolverTestUtils.cs b/test/Microsoft.DotNet.CommandFactory.Tests/CommandResolverTestUtils.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/CommandResolverTestUtils.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/CommandResolverTestUtils.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenACompositeCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenACompositeCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenACompositeCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenACompositeCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenADefaultCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenADefaultCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenADefaultCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenADefaultCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenADotnetToolsCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenADotnetToolsCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenADotnetToolsCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenADotnetToolsCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectDependencyCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectDependencyCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectDependencyCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectDependencyCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectPathCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectPathCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectPathCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectPathCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectToolsCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectToolsCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenAProjectToolsCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenARootedCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenARootedCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenARootedCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenARootedCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAScriptCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenAScriptCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAScriptCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenAScriptCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAnAppBaseCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenAnAppBaseCommandResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.CommandFactory.Tests/GivenAnAppBaseCommandResolver.cs
rename to test/Microsoft.DotNet.CommandFactory.Tests/GivenAnAppBaseCommandResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs
rename to test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs
diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs
rename to test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs
diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs
rename to test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs
diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs
rename to test/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs
diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs
rename to test/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs
diff --git a/src/Tests/Microsoft.DotNet.GenAPI.Tests/CSharpFileBuilderTests.cs b/test/Microsoft.DotNet.GenAPI.Tests/CSharpFileBuilderTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.GenAPI.Tests/CSharpFileBuilderTests.cs
rename to test/Microsoft.DotNet.GenAPI.Tests/CSharpFileBuilderTests.cs
diff --git a/src/Tests/Microsoft.DotNet.GenAPI.Tests/Microsoft.DotNet.GenAPI.Tests.csproj b/test/Microsoft.DotNet.GenAPI.Tests/Microsoft.DotNet.GenAPI.Tests.csproj
similarity index 100%
rename from src/Tests/Microsoft.DotNet.GenAPI.Tests/Microsoft.DotNet.GenAPI.Tests.csproj
rename to test/Microsoft.DotNet.GenAPI.Tests/Microsoft.DotNet.GenAPI.Tests.csproj
diff --git a/src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/BodyBlockCSharpSyntaxRewriterTests.cs b/test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/BodyBlockCSharpSyntaxRewriterTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/BodyBlockCSharpSyntaxRewriterTests.cs
rename to test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/BodyBlockCSharpSyntaxRewriterTests.cs
diff --git a/src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/CSharpSyntaxRewriterTestBase.cs b/test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/CSharpSyntaxRewriterTestBase.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/CSharpSyntaxRewriterTestBase.cs
rename to test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/CSharpSyntaxRewriterTestBase.cs
diff --git a/src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/SingleLineStatementCSharpSyntaxRewriterTests.cs b/test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/SingleLineStatementCSharpSyntaxRewriterTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/SingleLineStatementCSharpSyntaxRewriterTests.cs
rename to test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/SingleLineStatementCSharpSyntaxRewriterTests.cs
diff --git a/src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/TypeDeclarationCSharpSyntaxRewriterTests.cs b/test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/TypeDeclarationCSharpSyntaxRewriterTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/TypeDeclarationCSharpSyntaxRewriterTests.cs
rename to test/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/TypeDeclarationCSharpSyntaxRewriterTests.cs
diff --git a/src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnEnvironmentForResolution.cs b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnEnvironmentForResolution.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnEnvironmentForResolution.cs
rename to test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnEnvironmentForResolution.cs
diff --git a/src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs
rename to test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs
diff --git a/src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatIWantToCompareSemanticVersions.cs b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatIWantToCompareSemanticVersions.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatIWantToCompareSemanticVersions.cs
rename to test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatIWantToCompareSemanticVersions.cs
diff --git a/src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatWeWantToParseSemanticVersions.cs b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatWeWantToParseSemanticVersions.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatWeWantToParseSemanticVersions.cs
rename to test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenThatWeWantToParseSemanticVersions.cs
diff --git a/src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
similarity index 75%
rename from src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
rename to test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
index e10f99519e9c..cc6810c54cbd 100644
--- a/src/Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
+++ b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
@@ -18,20 +18,20 @@
-
-
+
+
-
+ sdkResolver
-
+ nativeWrapper
-
+
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsGolden.xml b/test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsGolden.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsGolden.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsGolden.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMajorHigherVersion.xml b/test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMajorHigherVersion.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMajorHigherVersion.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMajorHigherVersion.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMalformed.xml b/test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMalformed.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMalformed.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMalformed.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissing.xml b/test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissing.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissing.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissing.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissingVersion.xml b/test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissingVersion.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissingVersion.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/DotnetToolSettingsMissingVersion.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/LocalToolsResolverCacheTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/LocalToolsResolverCacheTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/LocalToolsResolverCacheTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/LocalToolsResolverCacheTests.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/LockFileMatcherTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/LockFileMatcherTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/LockFileMatcherTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/LockFileMatcherTests.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj b/test/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
similarity index 96%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
rename to test/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
index c75bf86d3368..4131767bbcc1 100644
--- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
+++ b/test/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
@@ -12,9 +12,9 @@
false
-
-
-
+
+
+
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/MockFirstPartyNuGetPackageSigningVerifier.cs b/test/Microsoft.DotNet.PackageInstall.Tests/MockFirstPartyNuGetPackageSigningVerifier.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/MockFirstPartyNuGetPackageSigningVerifier.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/MockFirstPartyNuGetPackageSigningVerifier.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerExtractTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerExtractTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerExtractTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerExtractTests.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerTests.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/DotnetToolSettings.xml b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/DotnetToolSettings.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/DotnetToolSettings.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/DotnetToolSettings.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/Program.cs b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/Program.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/Program.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/Program.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/consoledemo.csproj b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/consoledemo.csproj
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/consoledemo.csproj
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/consoledemo.csproj
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/includepublish.nuspec b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/includepublish.nuspec
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/includepublish.nuspec
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalTool/includepublish.nuspec
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/ConsoleDemoWithCasing.csproj b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/ConsoleDemoWithCasing.csproj
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/ConsoleDemoWithCasing.csproj
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/ConsoleDemoWithCasing.csproj
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/DotnetToolSettings.xml b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/DotnetToolSettings.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/DotnetToolSettings.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/DotnetToolSettings.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/Program.cs b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/Program.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/Program.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/Program.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/includepublish.nuspec b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/includepublish.nuspec
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/includepublish.nuspec
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithDifferentCasing/includepublish.nuspec
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/DotnetToolSettings.xml b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/DotnetToolSettings.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/DotnetToolSettings.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/DotnetToolSettings.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/Program.cs b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/Program.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/Program.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/Program.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/consoledemo.csproj b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/consoledemo.csproj
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/consoledemo.csproj
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/consoledemo.csproj
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/includepublish.nuspec b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/includepublish.nuspec
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/includepublish.nuspec
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithPreview/includepublish.nuspec
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/DotnetToolSettings.xml b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/DotnetToolSettings.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/DotnetToolSettings.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/DotnetToolSettings.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/Program.cs b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/Program.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/Program.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/Program.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/consoledemo.csproj b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/consoledemo.csproj
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/consoledemo.csproj
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/consoledemo.csproj
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim.exe b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim.exe
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim.exe
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/dummyshim.exe
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec b/test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec
rename to test/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/Stage2ProjectRestorer.cs b/test/Microsoft.DotNet.PackageInstall.Tests/Stage2ProjectRestorer.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/Stage2ProjectRestorer.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/Stage2ProjectRestorer.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolConfigurationDeserializerTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/ToolConfigurationDeserializerTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolConfigurationDeserializerTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/ToolConfigurationDeserializerTests.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageDownloaderTests.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
similarity index 99%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
index ec969602b06b..3fb9ac8addfc 100644
--- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
+++ b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs
@@ -19,7 +19,7 @@ public ToolPackageInstallToManagedLocationInstaller(ITestOutputHelper log) : bas
{
}
- [Theory]
+ [WindowsOnlyTheory]
[InlineData(false)]
[InlineData(true)]
public void GivenNugetConfigInstallSucceeds(bool testMockBehaviorIsInSync)
@@ -62,7 +62,7 @@ public void GivenNugetConfigInstallSucceeds(bool testMockBehaviorIsInSync)
}
}
- [Theory]
+ [WindowsOnlyTheory]
[InlineData(false)]
[InlineData(true)]
public void GivenNugetConfigVersionRangeInstallSucceeds(bool testMockBehaviorIsInSync)
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
similarity index 99%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
index 71144f426815..e95f28b38cb3 100644
--- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
+++ b/test/Microsoft.DotNet.PackageInstall.Tests/ToolPackageUninstallerTests.cs
@@ -16,7 +16,7 @@ namespace Microsoft.DotNet.PackageInstall.Tests
{
public class ToolPackageUninstallerTests : SdkTest
{
- [Theory]
+ [WindowsOnlyTheory]
[InlineData(false)]
[InlineData(true)]
public void GivenAnInstalledPackageUninstallRemovesThePackage(bool testMockBehaviorIsInSync)
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsSample.xml b/test/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsSample.xml
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsSample.xml
rename to test/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsSample.xml
diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsTests.cs
rename to test/Microsoft.DotNet.PackageInstall.Tests/UnixFilePermissionsTests.cs
diff --git a/src/Tests/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj b/test/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj
similarity index 91%
rename from src/Tests/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj
rename to test/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj
index 7f68ef8958bd..284372b8a848 100644
--- a/src/Tests/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj
+++ b/test/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj
@@ -1,7 +1,7 @@
- $(ToolsetTargetFramework);net472
+ $(ToolsetTargetFramework);$(NetFrameworkToolCurrent)Exetrue
diff --git a/src/Tests/Microsoft.DotNet.PackageValidation.Tests/Validators/BaselinePackageValidatorTests.cs b/test/Microsoft.DotNet.PackageValidation.Tests/Validators/BaselinePackageValidatorTests.cs
similarity index 58%
rename from src/Tests/Microsoft.DotNet.PackageValidation.Tests/Validators/BaselinePackageValidatorTests.cs
rename to test/Microsoft.DotNet.PackageValidation.Tests/Validators/BaselinePackageValidatorTests.cs
index 63620a22a29f..bd0dd40a11ad 100644
--- a/src/Tests/Microsoft.DotNet.PackageValidation.Tests/Validators/BaselinePackageValidatorTests.cs
+++ b/test/Microsoft.DotNet.PackageValidation.Tests/Validators/BaselinePackageValidatorTests.cs
@@ -22,18 +22,13 @@ public class BaselinePackageValidatorTests
[Fact]
public void TfmDroppedInLatestVersion()
{
- string[] previousFilePaths = new[]
- {
- @"ref/netcoreapp3.1/TestPackage.dll",
- @"ref/netstandard2.0/TestPackage.dll"
- };
- Package baselinePackage = new(string.Empty, "TestPackage", "1.0.0", previousFilePaths, null);
-
- string[] currentFilePaths = new[]
- {
- @"ref/netcoreapp3.1/TestPackage.dll"
- };
- Package package = new(string.Empty, "TestPackage", "2.0.0", currentFilePaths, null);
+ Package baselinePackage = new(string.Empty, "TestPackage", "1.0.0",
+ [
+ @"lib/netcoreapp3.1/TestPackage.dll",
+ @"lib/netstandard2.0/TestPackage.dll"
+ ]);
+ Package package = new(string.Empty, "TestPackage", "2.0.0", [ @"lib/netcoreapp3.1/TestPackage.dll" ]);
+
(SuppressibleTestLog log, BaselinePackageValidator validator) = CreateLoggerAndValidator();
validator.Validate(new PackageValidatorOption(package,
@@ -44,5 +39,26 @@ public void TfmDroppedInLatestVersion()
Assert.NotEmpty(log.errors);
Assert.Contains(DiagnosticIds.TargetFrameworkDropped + " " + string.Format(Resources.MissingTargetFramework, ".NETStandard,Version=v2.0"), log.errors);
}
+
+ [Fact]
+ public void BaselineFrameworksExcluded()
+ {
+ Package baselinePackage = new(string.Empty, "TestPackage", "1.0.0",
+ [
+ @"lib/netcoreapp3.1/TestPackage.dll",
+ @"lib/netstandard2.0/TestPackage.dll"
+ ]);
+ Package package = new(string.Empty, "TestPackage", "2.0.0", [ @"lib/netstandard2.0/TestPackage.dll" ]);
+
+ (SuppressibleTestLog log, BaselinePackageValidator validator) = CreateLoggerAndValidator();
+
+ validator.Validate(new PackageValidatorOption(package,
+ enableStrictMode: false,
+ enqueueApiCompatWorkItems: false,
+ baselinePackage: baselinePackage,
+ baselinePackageFrameworksToIgnore: [ "netcoreapp3.1" ]));
+
+ Assert.Empty(log.errors);
+ }
}
}
diff --git a/src/Tests/Microsoft.DotNet.PackageValidation.Tests/Validators/CompatibleTFMValidatorTests.cs b/test/Microsoft.DotNet.PackageValidation.Tests/Validators/CompatibleTFMValidatorTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.PackageValidation.Tests/Validators/CompatibleTFMValidatorTests.cs
rename to test/Microsoft.DotNet.PackageValidation.Tests/Validators/CompatibleTFMValidatorTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/AppHostShellShimMakerTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/AppHostShellShimMakerTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/AppHostShellShimMakerTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/AppHostShellShimMakerTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/EnvironmentPathFactoryTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/EnvironmentPathFactoryTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/EnvironmentPathFactoryTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/EnvironmentPathFactoryTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/LinuxEnvironmentPathTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/LinuxEnvironmentPathTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/LinuxEnvironmentPathTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/LinuxEnvironmentPathTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/OsxEnvironmentPathTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/OsxEnvironmentPathTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/OsxEnvironmentPathTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/OsxEnvironmentPathTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/OsxZshEnvironmentPathInstructionTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/OsxZshEnvironmentPathInstructionTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/OsxZshEnvironmentPathInstructionTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/OsxZshEnvironmentPathInstructionTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/ShellShimRepositoryTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/ShellShimRepositoryTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/ShellShimRepositoryTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/ShellShimRepositoryTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/WindowsEnvironmentPathTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/WindowsEnvironmentPathTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/WindowsEnvironmentPathTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/WindowsEnvironmentPathTests.cs
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/WpfBinaryTestAsssets/testwpf.dll b/test/Microsoft.DotNet.ShellShim.Tests/WpfBinaryTestAsssets/testwpf.dll
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/WpfBinaryTestAsssets/testwpf.dll
rename to test/Microsoft.DotNet.ShellShim.Tests/WpfBinaryTestAsssets/testwpf.dll
diff --git a/src/Tests/Microsoft.DotNet.ShellShim.Tests/ZshDetectorTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/ZshDetectorTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.ShellShim.Tests/ZshDetectorTests.cs
rename to test/Microsoft.DotNet.ShellShim.Tests/ZshDetectorTests.cs
diff --git a/src/Tests/Microsoft.DotNet.TemplateLocator.Tests/GivenAnTemplateLocator.cs b/test/Microsoft.DotNet.TemplateLocator.Tests/GivenAnTemplateLocator.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.TemplateLocator.Tests/GivenAnTemplateLocator.cs
rename to test/Microsoft.DotNet.TemplateLocator.Tests/GivenAnTemplateLocator.cs
diff --git a/src/Tests/Microsoft.DotNet.TemplateLocator.Tests/Manifests/AndroidWorkloadManifest.json b/test/Microsoft.DotNet.TemplateLocator.Tests/Manifests/AndroidWorkloadManifest.json
similarity index 100%
rename from src/Tests/Microsoft.DotNet.TemplateLocator.Tests/Manifests/AndroidWorkloadManifest.json
rename to test/Microsoft.DotNet.TemplateLocator.Tests/Manifests/AndroidWorkloadManifest.json
diff --git a/src/Tests/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj b/test/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj
similarity index 75%
rename from src/Tests/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj
rename to test/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj
index d04d2d35c156..25fac3c40d70 100644
--- a/src/Tests/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj
+++ b/test/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj
@@ -11,9 +11,9 @@
-
-
-
+
+
+
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/AppHostShellShimMakerMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/AppHostShellShimMakerMock.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/AppHostShellShimMakerMock.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/AppHostShellShimMakerMock.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/EnvironmentPathInstructionMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/EnvironmentPathInstructionMock.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/EnvironmentPathInstructionMock.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/EnvironmentPathInstructionMock.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj
similarity index 80%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj
index 6f48287c133b..301a217d9a3f 100644
--- a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj
+++ b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj
@@ -8,8 +8,8 @@
true
-
-
+
+
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeed.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeed.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeed.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeed.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedPackage.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedPackage.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedPackage.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedPackage.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedType.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedType.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedType.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/MockFeedType.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/Properties/Properties.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/Properties/Properties.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/Properties/Properties.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/Properties/Properties.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageDownloaderMock.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageMock.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageMock.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageMock.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageStoreMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageStoreMock.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageStoreMock.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageStoreMock.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageUninstallerMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageUninstallerMock.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageUninstallerMock.cs
rename to test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ToolPackageUninstallerMock.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj b/test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj
similarity index 84%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj
rename to test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj
index ee9bc5c5e9f1..466d74f4bee9 100644
--- a/src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests.csproj
@@ -11,7 +11,7 @@
Exe
-
+
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/MockFileSystemTests.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/MockFileSystemTests.cs
similarity index 100%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/MockFileSystemTests.cs
rename to test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/MockFileSystemTests.cs
diff --git a/src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/NuGetTransientErrorDetectorTests.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/NuGetTransientErrorDetectorTests.cs
similarity index 96%
rename from src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/NuGetTransientErrorDetectorTests.cs
rename to test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/NuGetTransientErrorDetectorTests.cs
index bd514d3b07ea..1abf566c92c2 100644
--- a/src/Tests/Microsoft.DotNet.Tools.Tests.Utilities.Tests/NuGetTransientErrorDetectorTests.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities.Tests/NuGetTransientErrorDetectorTests.cs
@@ -34,14 +34,14 @@ public void Error1()
"FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)\r\n\u001B[m\u001B[37m at " +
"FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)\r\n\u001B[m\u001B[37m at " +
"FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)\r\n\u001B[m\u001B[37m " +
- "/_/src/Tests/Microsoft.NET.TestFramework/Assertions/CommandResultAssertions.cs(32,0): at Microsoft.NET.TestFramework.Assertions." +
- "CommandResultAssertions.Pass()\r\n\u001B[m\u001B[37m /_/src/Tests/Microsoft.NET.ToolPack.Tests/" +
+ "/_/test/Microsoft.NET.TestFramework/Assertions/CommandResultAssertions.cs(32,0): at Microsoft.NET.TestFramework.Assertions." +
+ "CommandResultAssertions.Pass()\r\n\u001B[m\u001B[37m /_/test/Microsoft.NET.ToolPack.Tests/" +
"PackWithShimsAndResultNugetPackageNuGetPackagexFixture.cs(64,0): at Microsoft.NET.ToolPack.Tests.NupkgOfPackWithShimsFixture." +
"SetupNuGetPackage(Boolean multiTarget, String targetFramework)\r\n\u001B[mRunning /datadisks/disk1/work/AD2E0974/p/d/" +
"dotnet msbuild /t:Pack /datadisks/disk1/work/AD2E0974/w/A09F08FB/e/testExecutionDirectory/NupkgOfPackWi---BDB2B0FB/consoledemo.csproj " +
- "/restore\r\n\u001B[37m /_/src/Tests/Microsoft.NET.ToolPack.Tests/PackWithShimsAndResultNugetPackageNuGetPackagexFixture.cs(47,0): " +
+ "/restore\r\n\u001B[37m /_/test/Microsoft.NET.ToolPack.Tests/PackWithShimsAndResultNugetPackageNuGetPackagexFixture.cs(47,0): " +
"at Microsoft.NET.ToolPack.Tests.NupkgOfPackWithShimsFixture.GetTestToolPackagePath(Boolean multiTarget, String targetFramework)" +
- "\r\n\u001B[m\u001B[37m /_/src/Tests/Microsoft.NET.ToolPack.Tests/GivenThatWeWantToPackAToolProjectWithPackagedShim.cs(128,0): " +
+ "\r\n\u001B[m\u001B[37m /_/test/Microsoft.NET.ToolPack.Tests/GivenThatWeWantToPackAToolProjectWithPackagedShim.cs(128,0): " +
"at Microsoft.NET.ToolPack.Tests.GivenThatWeWantToPackAToolProjectWithPackagedShim.It_contains_shim(Boolean multiTarget, String " +
"targetFramework)\r\n\u001B[m\u001B[30;1m Output:\r\n\u001B[m\u001B[37m > /datadisks/disk1/work/AD2E0974/p/d/dotnet msbuild " +
"/t:Pack /datadisks/disk1/work/AD2E0974/w/A09F08FB/e/testExecutionDirectory/NupkgOfPackWi---4E69F8CE/consoledemo.csproj /restore" +
diff --git a/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs
similarity index 100%
rename from src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs
rename to test/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs
diff --git a/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj
similarity index 80%
rename from src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj
rename to test/Microsoft.Extensions.DotNetDeltaApplier.Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj
index 217728563ae0..449b50401c27 100644
--- a/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj
+++ b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs
similarity index 100%
rename from src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs
rename to test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/AuthenticatedRegistry/auth/htpasswd b/test/Microsoft.NET.Build.Containers.IntegrationTests/AuthenticatedRegistry/auth/htpasswd
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/AuthenticatedRegistry/auth/htpasswd
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/AuthenticatedRegistry/auth/htpasswd
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CapturingLogger.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/CapturingLogger.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CapturingLogger.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/CapturingLogger.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ContainerCli.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/ContainerCli.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ContainerCli.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/ContainerCli.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs
similarity index 94%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs
index 1788862816b1..73223826b635 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs
@@ -31,7 +31,7 @@ public void CreateNewImage_Baseline()
newProjectDir.Create();
- new DotnetNewCommand(_testOutput, "console", "-f", ToolsetInfo.NextTargetFramework)
+ new DotnetNewCommand(_testOutput, "console", "-f", ToolsetInfo.CurrentTargetFramework)
.WithVirtualHive()
.WithWorkingDirectory(newProjectDir.FullName)
.Execute()
@@ -53,7 +53,7 @@ public void CreateNewImage_Baseline()
task.OutputRegistry = "localhost:5010";
task.LocalRegistry = DockerAvailableFactAttribute.LocalRegistry;
- task.PublishDirectory = Path.Combine(newProjectDir.FullName, "bin", "Release", ToolsetInfo.NextTargetFramework, "linux-arm64", "publish");
+ task.PublishDirectory = Path.Combine(newProjectDir.FullName, "bin", "Release", ToolsetInfo.CurrentTargetFramework, "linux-arm64", "publish");
task.Repository = "dotnet/create-new-image-baseline";
task.ImageTags = new[] { "latest" };
task.WorkingDirectory = "app/";
@@ -82,7 +82,7 @@ public void ParseContainerProperties_EndToEnd()
newProjectDir.Create();
- new DotnetNewCommand(_testOutput, "console", "-f", ToolsetInfo.NextTargetFramework)
+ new DotnetNewCommand(_testOutput, "console", "-f", ToolsetInfo.CurrentTargetFramework)
.WithVirtualHive()
.WithWorkingDirectory(newProjectDir.FullName)
.Execute()
@@ -119,7 +119,7 @@ public void ParseContainerProperties_EndToEnd()
cni.BaseImageTag = pcp.ParsedContainerTag;
cni.Repository = pcp.NewContainerRepository;
cni.OutputRegistry = "localhost:5010";
- cni.PublishDirectory = Path.Combine(newProjectDir.FullName, "bin", "release", ToolsetInfo.NextTargetFramework);
+ cni.PublishDirectory = Path.Combine(newProjectDir.FullName, "bin", "release", ToolsetInfo.CurrentTargetFramework);
cni.WorkingDirectory = "app/";
cni.Entrypoint = new TaskItem[] { new(newProjectDir.Name) };
cni.ImageTags = pcp.NewContainerTags;
@@ -153,7 +153,7 @@ public void Tasks_EndToEnd_With_EnvironmentVariable_Validation()
File.WriteAllText(Path.Combine(newProjectDir.FullName, "Program.cs"), $"Console.Write(Environment.GetEnvironmentVariable(\"GoodEnvVar\"));");
- new DotnetCommand(_testOutput, "build", "--configuration", "release", "/p:runtimeidentifier=linux-x64", $"/p:RuntimeFrameworkVersion=8.0.0-preview.3.23174.8")
+ new DotnetCommand(_testOutput, "build", "--configuration", "release", "/p:runtimeidentifier=linux-x64")
.WithWorkingDirectory(newProjectDir.FullName)
.Execute()
.Should().Pass();
@@ -162,7 +162,7 @@ public void Tasks_EndToEnd_With_EnvironmentVariable_Validation()
(IBuildEngine buildEngine, List errors) = SetupBuildEngine();
pcp.BuildEngine = buildEngine;
- pcp.FullyQualifiedBaseImageName = $"mcr.microsoft.com/{DockerRegistryManager.RuntimeBaseImage}:{DockerRegistryManager.Net8PreviewImageTag}";
+ pcp.FullyQualifiedBaseImageName = $"mcr.microsoft.com/{DockerRegistryManager.RuntimeBaseImage}:{DockerRegistryManager.Net8ImageTag}";
pcp.ContainerRegistry = "";
pcp.ContainerRepository = "dotnet/envvarvalidation";
pcp.ContainerImageTag = "latest";
@@ -175,7 +175,7 @@ public void Tasks_EndToEnd_With_EnvironmentVariable_Validation()
Assert.True(pcp.Execute(), FormatBuildMessages(errors));
Assert.Equal("mcr.microsoft.com", pcp.ParsedContainerRegistry);
Assert.Equal("dotnet/runtime", pcp.ParsedContainerImage);
- Assert.Equal(DockerRegistryManager.Net8PreviewImageTag, pcp.ParsedContainerTag);
+ Assert.Equal(DockerRegistryManager.Net8ImageTag, pcp.ParsedContainerTag);
Assert.Single(pcp.NewContainerEnvironmentVariables);
Assert.Equal("Foo", pcp.NewContainerEnvironmentVariables[0].GetMetadata("Value"));
@@ -230,9 +230,9 @@ public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage()
ImageBuilder imageBuilder = await registry.GetImageManifestAsync(
DockerRegistryManager.RuntimeBaseImage,
- DockerRegistryManager.Net8PreviewImageTag,
+ DockerRegistryManager.Net8ImageTag,
"linux-x64",
- ToolsetUtils.GetRuntimeGraphFilePath(),
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
Assert.NotNull(imageBuilder);
@@ -240,7 +240,7 @@ public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage()
BuiltImage builtImage = imageBuilder.Build();
- var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net8PreviewImageTag);
+ var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net8ImageTag);
var destinationReference = new DestinationImageReference(registry, RootlessBase, new[] { "latest" });
await registry.PushAsync(builtImage, sourceReference, destinationReference, cancellationToken: default).ConfigureAwait(false);
@@ -255,7 +255,7 @@ public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage()
newProjectDir.Create();
- new DotnetNewCommand(_testOutput, "console", "-f", ToolsetInfo.NextTargetFramework)
+ new DotnetNewCommand(_testOutput, "console", "-f", ToolsetInfo.CurrentTargetFramework)
.WithVirtualHive()
.WithWorkingDirectory(newProjectDir.FullName)
.Execute()
@@ -274,7 +274,7 @@ public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage()
task.BaseImageTag = "latest";
task.OutputRegistry = "localhost:5010";
- task.PublishDirectory = Path.Combine(newProjectDir.FullName, "bin", "Release", ToolsetInfo.NextTargetFramework, "linux-x64", "publish");
+ task.PublishDirectory = Path.Combine(newProjectDir.FullName, "bin", "Release", ToolsetInfo.CurrentTargetFramework, "linux-x64", "publish");
task.Repository = AppImage;
task.ImageTags = new[] { "latest" };
task.WorkingDirectory = "app/";
@@ -290,7 +290,7 @@ public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage()
AppImage,
"latest",
"linux-x64",
- ToolsetUtils.GetRuntimeGraphFilePath(),
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
Assert.Equal(RootlessUser, imageBuilder.BaseImageConfig.GetUser());
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CurrentFile.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/CurrentFile.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CurrentFile.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/CurrentFile.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
similarity index 79%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
index 0b79e3de1729..90d140eabdd0 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs
@@ -3,6 +3,7 @@
using Microsoft.DotNet.Cli.Utils;
using Microsoft.Extensions.Logging;
+using Xunit.Sdk;
namespace Microsoft.NET.Build.Containers.IntegrationTests;
@@ -13,14 +14,22 @@ public class DockerRegistryManager
public const string BaseImageSource = "mcr.microsoft.com";
public const string Net6ImageTag = "6.0";
public const string Net7ImageTag = "7.0";
- public const string Net8PreviewImageTag = "8.0-preview";
- public const string Net8PreviewWindowsSpecificImageTag = $"{Net8PreviewImageTag}-nanoserver-ltsc2022";
+ public const string Net8ImageTag = "8.0";
+ public const string Net8PreviewWindowsSpecificImageTag = $"{Net8ImageTag}-nanoserver-ltsc2022";
public const string LocalRegistry = "localhost:5010";
- public const string FullyQualifiedBaseImageDefault = $"{BaseImageSource}/{RuntimeBaseImage}:{Net8PreviewImageTag}";
- public const string FullyQualifiedBaseImageAspNet = $"{BaseImageSource}/{AspNetBaseImage}:{Net8PreviewImageTag}";
+ public const string FullyQualifiedBaseImageDefault = $"{BaseImageSource}/{RuntimeBaseImage}:{Net8ImageTag}";
+ public const string FullyQualifiedBaseImageAspNet = $"{BaseImageSource}/{AspNetBaseImage}:{Net8ImageTag}";
private static string? s_registryContainerId;
- public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput)
+ internal class SameArchManifestPicker : IManifestPicker
+ {
+ public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier)
+ {
+ return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64");
+ }
+ }
+
+ public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOutput)
{
using TestLoggerFactory loggerFactory = new(testOutput);
@@ -35,6 +44,9 @@ public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput)
int spawnRegistryDelay = 1000; //ms
StringBuilder failureReasons = new();
+ var pullRegistry = new Registry(BaseImageSource, logger);
+ var pushRegistry = new Registry(LocalRegistry, logger);
+
for (int spawnRegistryAttempt = 1; spawnRegistryAttempt <= spawnRegistryMaxRetry; spawnRegistryAttempt++)
{
try
@@ -53,22 +65,18 @@ public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput)
EnsureRegistryLoaded(LocalRegistry, s_registryContainerId, logger, testOutput);
- foreach (string? tag in new[] { Net6ImageTag, Net7ImageTag, Net8PreviewImageTag })
+ foreach (string? tag in new[] { Net6ImageTag, Net7ImageTag, Net8ImageTag })
{
logger.LogInformation("Pulling image '{repo}/{image}:{tag}'.", BaseImageSource, RuntimeBaseImage, tag);
- ContainerCli.PullCommand(testOutput, $"{BaseImageSource}/{RuntimeBaseImage}:{tag}")
- .Execute()
- .Should().Pass();
-
- logger.LogInformation("Tagging image '{sourceRepo}/{sourceImage}:{sourceTag}' as '{targetRepo}/{targetImage}:{targetTag}'.", BaseImageSource, RuntimeBaseImage, tag, LocalRegistry, RuntimeBaseImage, tag);
- ContainerCli.TagCommand(testOutput, $"{BaseImageSource}/{RuntimeBaseImage}:{tag}", $"{LocalRegistry}/{RuntimeBaseImage}:{tag}")
- .Execute()
- .Should().Pass();
-
- logger.LogInformation("Pushing image '{repo}/{image}:{tag}'.", LocalRegistry, RuntimeBaseImage, tag);
- ContainerCli.PushCommand(testOutput, $"{LocalRegistry}/{RuntimeBaseImage}:{tag}")
- .Execute()
- .Should().Pass();
+ string dotnetdll = System.Reflection.Assembly.GetExecutingAssembly().Location;
+ 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 dest = new DestinationImageReference(pushRegistry, RuntimeBaseImage, [tag]);
+ logger.LogInformation($"Pushing image for {BaseImageSource}/{RuntimeBaseImage}:{tag}");
+ await pushRegistry.PushAsync(image.Build(), source, dest, CancellationToken.None);
+ logger.LogInformation($"Pushed image for {BaseImageSource}/{RuntimeBaseImage}:{tag}");
}
return;
}
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
similarity index 98%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
index f4a71d9631dd..63943a768d4b 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs
@@ -31,7 +31,7 @@ public async Task GetFromRegistry()
DockerRegistryManager.RuntimeBaseImage,
DockerRegistryManager.Net6ImageTag,
"linux-x64",
- ridgraphfile,
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
Assert.NotNull(downloadedImage);
@@ -84,7 +84,7 @@ public async Task WriteToPrivateBasicRegistry()
DockerRegistryManager.RuntimeBaseImage,
DockerRegistryManager.Net6ImageTag,
"linux-x64",
- ridgraphfile,
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
var image = downloadedImage.Build();
await localAuthed.PushAsync(image, sourceImage, destinationImage, CancellationToken.None);
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerSupportsArchInlineData.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerSupportsArchInlineData.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerSupportsArchInlineData.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/DockerSupportsArchInlineData.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsFixture.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsFixture.cs
similarity index 95%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsFixture.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsFixture.cs
index 847c22b7d956..c417e23c6184 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsFixture.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsFixture.cs
@@ -12,7 +12,7 @@ public DockerTestsFixture(IMessageSink messageSink)
_diagnosticOutput = new SharedTestOutputHelper(messageSink);
try
{
- DockerRegistryManager.StartAndPopulateDockerRegistry(_diagnosticOutput);
+ DockerRegistryManager.StartAndPopulateDockerRegistry(_diagnosticOutput).GetAwaiter().GetResult();
}
catch
{
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs
similarity index 83%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs
index 59f9d8b46b56..d7cd9e7dbe74 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs
@@ -50,9 +50,9 @@ public async Task ApiEndToEndWithRegistryPushAndPull()
ImageBuilder imageBuilder = await registry.GetImageManifestAsync(
DockerRegistryManager.RuntimeBaseImage,
- DockerRegistryManager.Net8PreviewImageTag,
+ DockerRegistryManager.Net8ImageTag,
"linux-x64",
- ToolsetUtils.GetRuntimeGraphFilePath(),
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
Assert.NotNull(imageBuilder);
@@ -66,7 +66,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.Net8PreviewImageTag);
+ var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net8ImageTag);
var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { "latest", "1.0" });
await registry.PushAsync(builtImage, sourceReference, destinationReference, cancellationToken: default).ConfigureAwait(false);
@@ -97,9 +97,9 @@ public async Task ApiEndToEndWithLocalLoad()
ImageBuilder imageBuilder = await registry.GetImageManifestAsync(
DockerRegistryManager.RuntimeBaseImage,
- DockerRegistryManager.Net8PreviewImageTag,
+ DockerRegistryManager.Net8ImageTag,
"linux-x64",
- ToolsetUtils.GetRuntimeGraphFilePath(),
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
Assert.NotNull(imageBuilder);
@@ -138,9 +138,9 @@ public async Task ApiEndToEndWithArchiveWritingAndLoad()
ImageBuilder imageBuilder = await registry.GetImageManifestAsync(
DockerRegistryManager.RuntimeBaseImage,
- DockerRegistryManager.Net8PreviewImageTag,
+ DockerRegistryManager.Net8ImageTag,
"linux-x64",
- ToolsetUtils.GetRuntimeGraphFilePath(),
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
Assert.NotNull(imageBuilder);
@@ -197,11 +197,6 @@ private string BuildLocalApp([CallerMemberName] string testName = "TestName", st
new DotnetCommand(_testOutput, "publish", "-bl", "MinimalTestApp", "-r", rid, "-f", tfm, "-c", "Debug")
.WithWorkingDirectory(workingDirectory);
- if (tfm == ToolsetInfo.NextTargetFramework)
- {
- publishCommand.Arguments.AddRange(new[] { "-p", $"RuntimeFrameworkVersion=8.0.0-preview.3.23174.8" });
- }
-
publishCommand.Execute()
.Should().Pass();
@@ -209,8 +204,89 @@ private string BuildLocalApp([CallerMemberName] string testName = "TestName", st
return publishDirectory;
}
+ [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/36160")]
+ public async Task EndToEnd_MultiProjectSolution()
+ {
+ ILogger logger = _loggerFactory.CreateLogger(nameof(EndToEnd_MultiProjectSolution));
+ DirectoryInfo newSolutionDir = new(Path.Combine(TestSettings.TestArtifactsDirectory, $"CreateNewImageTest_EndToEnd_MultiProjectSolution"));
+
+ if (newSolutionDir.Exists)
+ {
+ newSolutionDir.Delete(recursive: true);
+ }
+
+ newSolutionDir.Create();
+
+ // Create solution with projects
+ new DotnetNewCommand(_testOutput, "sln", "-n", nameof(EndToEnd_MultiProjectSolution))
+ .WithVirtualHive()
+ .WithWorkingDirectory(newSolutionDir.FullName)
+ .Execute()
+ .Should().Pass();
+
+ new DotnetNewCommand(_testOutput, "console", "-n", "ConsoleApp")
+ .WithVirtualHive()
+ .WithWorkingDirectory(newSolutionDir.FullName)
+ .Execute()
+ .Should().Pass();
+
+ new DotnetCommand(_testOutput, "sln", "add", Path.Combine("ConsoleApp", "ConsoleApp.csproj"))
+ .WithWorkingDirectory(newSolutionDir.FullName)
+ .Execute()
+ .Should().Pass();
+
+ new DotnetNewCommand(_testOutput, "web", "-n", "WebApp")
+ .WithVirtualHive()
+ .WithWorkingDirectory(newSolutionDir.FullName)
+ .Execute()
+ .Should().Pass();
+
+ new DotnetCommand(_testOutput, "sln", "add", Path.Combine("WebApp", "WebApp.csproj"))
+ .WithWorkingDirectory(newSolutionDir.FullName)
+ .Execute()
+ .Should().Pass();
+
+ // Add 'EnableSdkContainerSupport' property to the ConsoleApp and set TFM
+ using (FileStream stream = File.Open(Path.Join(newSolutionDir.FullName, "ConsoleApp", "ConsoleApp.csproj"), FileMode.Open, FileAccess.ReadWrite))
+ {
+ XDocument document = await XDocument.LoadAsync(stream, LoadOptions.None, CancellationToken.None);
+ document
+ .Descendants()
+ .First(e => e.Name.LocalName == "PropertyGroup")?
+ .Add(new XElement("EnableSdkContainerSupport", "true"));
+ document
+ .Descendants()
+ .First(e => e.Name.LocalName == "TargetFramework")
+ .Value = ToolsetInfo.CurrentTargetFramework;
+
+ stream.SetLength(0);
+ await document.SaveAsync(stream, SaveOptions.None, CancellationToken.None);
+ }
+
+ // Set TFM for WebApp
+ using (FileStream stream = File.Open(Path.Join(newSolutionDir.FullName, "WebApp", "WebApp.csproj"), FileMode.Open, FileAccess.ReadWrite))
+ {
+ XDocument document = await XDocument.LoadAsync(stream, LoadOptions.None, CancellationToken.None);
+ document
+ .Descendants()
+ .First(e => e.Name.LocalName == "TargetFramework")
+ .Value = ToolsetInfo.CurrentTargetFramework;
+
+ stream.SetLength(0);
+ await document.SaveAsync(stream, SaveOptions.None, CancellationToken.None);
+ }
+
+ // Publish
+ CommandResult commandResult = new DotnetCommand(_testOutput, "publish", "/t:PublishContainer")
+ .WithWorkingDirectory(newSolutionDir.FullName)
+ .Execute();
+
+ commandResult.Should().Pass();
+ commandResult.Should().HaveStdOutContaining("Pushed image 'webapp:latest'");
+ commandResult.Should().HaveStdOutContaining("Pushed image 'consoleapp:latest'");
+ }
- [DockerAvailableTheory()]
+ [DockerAvailableTheory(Skip = "https://github.com/dotnet/sdk/issues/36160")]
[InlineData("webapi", false)]
[InlineData("webapi", true)]
[InlineData("worker", false)]
@@ -233,7 +309,7 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
newProjectDir.Create();
privateNuGetAssets.Create();
- new DotnetNewCommand(_testOutput, projectType, "-f", ToolsetInfo.CurrentTargetFramework)
+ new DotnetNewCommand(_testOutput, projectType, "-f", ToolsetInfo.NextTargetFramework)
.WithVirtualHive()
.WithWorkingDirectory(newProjectDir.FullName)
// do not pollute the primary/global NuGet package store with the private package(s)
@@ -254,7 +330,7 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
.Should().Pass();
// Add package to the project
- new DotnetCommand(_testOutput, "add", "package", "Microsoft.NET.Build.Containers", "-f", ToolsetInfo.CurrentTargetFramework, "-v", packageVersion)
+ new DotnetCommand(_testOutput, "add", "package", "Microsoft.NET.Build.Containers", "-f", ToolsetInfo.NextTargetFramework, "-v", packageVersion)
.WithEnvironmentVariable("NUGET_PACKAGES", privateNuGetAssets.FullName)
.WithWorkingDirectory(newProjectDir.FullName)
.Execute()
@@ -284,7 +360,7 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
$"/p:ContainerRegistry={DockerRegistryManager.LocalRegistry}",
$"/p:ContainerRepository={imageName}",
$"/p:ContainerImageTag={imageTag}",
- $"/p:RuntimeFrameworkVersion=8.0.0-preview.3.23174.8")
+ "/p:UseRazorSourceGenerator=false")
.WithEnvironmentVariable("NUGET_PACKAGES", privateNuGetAssets.FullName)
.WithWorkingDirectory(newProjectDir.FullName)
.Execute();
@@ -442,7 +518,6 @@ public void EndToEnd_NoAPI_Console()
$"/p:ContainerBaseImage={DockerRegistryManager.FullyQualifiedBaseImageAspNet}",
$"/p:ContainerRegistry={DockerRegistryManager.LocalRegistry}",
$"/p:ContainerRepository={imageName}",
- $"/p:RuntimeFrameworkVersion=8.0.0-preview.3.23174.8",
$"/p:ContainerImageTag={imageTag}")
.WithEnvironmentVariable("NUGET_PACKAGES", privateNuGetAssets.FullName)
.WithWorkingDirectory(newProjectDir.FullName)
@@ -483,9 +558,9 @@ public async Task CanPackageForAllSupportedContainerRIDs(string dockerPlatform,
var isWin = rid.StartsWith("win");
ImageBuilder? imageBuilder = await registry.GetImageManifestAsync(
DockerRegistryManager.RuntimeBaseImage,
- isWin ? DockerRegistryManager.Net8PreviewWindowsSpecificImageTag : DockerRegistryManager.Net8PreviewImageTag,
+ isWin ? DockerRegistryManager.Net8PreviewWindowsSpecificImageTag : DockerRegistryManager.Net8ImageTag,
rid,
- ToolsetUtils.GetRuntimeGraphFilePath(),
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default).ConfigureAwait(false);
Assert.NotNull(imageBuilder);
@@ -500,7 +575,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.Net7ImageTag);
+ var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net8ImageTag);
var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid });
await new DockerCli(_loggerFactory).LoadAsync(builtImage, sourceReference, destinationReference, default).ConfigureAwait(false);
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/FullFramework/CreateNewImageToolTaskTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/FullFramework/CreateNewImageToolTaskTests.cs
similarity index 96%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/FullFramework/CreateNewImageToolTaskTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/FullFramework/CreateNewImageToolTaskTests.cs
index 338659b78176..2529e554df80 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/FullFramework/CreateNewImageToolTaskTests.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/FullFramework/CreateNewImageToolTaskTests.cs
@@ -65,7 +65,7 @@ public void GenerateCommandLineCommands_ThrowsWhenRequiredPropertiesNotSet()
[InlineData("")]
[InlineData(" ")]
[InlineData("ValidTag", true)]
- public void GenerateCommandLineCommands_BaseImageTag(string value, bool optionExpected = false)
+ public void GenerateCommandLineCommands_BaseImageTag(string? value, bool optionExpected = false)
{
CreateNewImage task = new();
DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
@@ -76,7 +76,10 @@ public void GenerateCommandLineCommands_BaseImageTag(string value, bool optionEx
task.WorkingDirectory = "MyWorkingDirectory";
task.Entrypoint = new[] { new TaskItem("MyEntryPoint") };
- task.BaseImageTag = value;
+ if (value != null)
+ {
+ task.BaseImageTag = value;
+ }
string args = task.GenerateCommandLineCommandsInt();
@@ -96,7 +99,7 @@ public void GenerateCommandLineCommands_BaseImageTag(string value, bool optionEx
[InlineData("")]
[InlineData(" ")]
[InlineData("Valid", true)]
- public void GenerateCommandLineCommands_OutputRegistry(string value, bool optionExpected = false)
+ public void GenerateCommandLineCommands_OutputRegistry(string? value, bool optionExpected = false)
{
CreateNewImage task = new();
DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
@@ -107,7 +110,10 @@ public void GenerateCommandLineCommands_OutputRegistry(string value, bool option
task.WorkingDirectory = "MyWorkingDirectory";
task.Entrypoint = new[] { new TaskItem("MyEntryPoint") };
- task.OutputRegistry = value;
+ if (value != null)
+ {
+ task.OutputRegistry = value;
+ }
string args = task.GenerateCommandLineCommandsInt();
@@ -126,7 +132,7 @@ public void GenerateCommandLineCommands_OutputRegistry(string value, bool option
[InlineData("")]
[InlineData(" ")]
[InlineData("Valid", true)]
- public void GenerateCommandLineCommands_ContainerRuntimeIdentifier(string value, bool optionExpected = false)
+ public void GenerateCommandLineCommands_ContainerRuntimeIdentifier(string? value, bool optionExpected = false)
{
CreateNewImage task = new();
DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
@@ -137,7 +143,10 @@ public void GenerateCommandLineCommands_ContainerRuntimeIdentifier(string value,
task.WorkingDirectory = "MyWorkingDirectory";
task.Entrypoint = new[] { new TaskItem("MyEntryPoint") };
- task.ContainerRuntimeIdentifier = value;
+ if (value != null)
+ {
+ task.ContainerRuntimeIdentifier = value;
+ }
string args = task.GenerateCommandLineCommandsInt();
if (optionExpected)
@@ -155,7 +164,7 @@ public void GenerateCommandLineCommands_ContainerRuntimeIdentifier(string value,
[InlineData("")]
[InlineData(" ")]
[InlineData("Valid", true)]
- public void GenerateCommandLineCommands_RuntimeIdentifierGraphPath(string value, bool optionExpected = false)
+ public void GenerateCommandLineCommands_RuntimeIdentifierGraphPath(string? value, bool optionExpected = false)
{
CreateNewImage task = new();
DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
@@ -166,7 +175,10 @@ public void GenerateCommandLineCommands_RuntimeIdentifierGraphPath(string value,
task.WorkingDirectory = "MyWorkingDirectory";
task.Entrypoint = new[] { new TaskItem("MyEntryPoint") };
- task.RuntimeIdentifierGraphPath = value;
+ if (value != null)
+ {
+ task.RuntimeIdentifierGraphPath = value;
+ }
string args = task.GenerateCommandLineCommandsInt();
@@ -394,7 +406,7 @@ public void GenerateCommandLineCommands_EntryPointCanHaveEmptyItems(string itemV
[InlineData("")]
[InlineData(" ")]
[InlineData("Valid", true)]
- public void GenerateCommandLineCommands_AppCommandInstruction(string value, bool optionExpected = false)
+ public void GenerateCommandLineCommands_AppCommandInstruction(string? value, bool optionExpected = false)
{
CreateNewImage task = new();
DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
@@ -404,7 +416,10 @@ public void GenerateCommandLineCommands_AppCommandInstruction(string value, bool
task.Repository = "MyImageName";
task.WorkingDirectory = "MyWorkingDirectory";
- task.AppCommandInstruction = value;
+ if (value != null)
+ {
+ task.AppCommandInstruction = value;
+ }
string args = task.GenerateCommandLineCommandsInt();
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/LayerEndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/LayerEndToEndTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/LayerEndToEndTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/LayerEndToEndTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/Microsoft.NET.Build.Containers.IntegrationTests.csproj b/test/Microsoft.NET.Build.Containers.IntegrationTests/Microsoft.NET.Build.Containers.IntegrationTests.csproj
similarity index 91%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/Microsoft.NET.Build.Containers.IntegrationTests.csproj
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/Microsoft.NET.Build.Containers.IntegrationTests.csproj
index 9b00cf2ad6db..ac82d15a992e 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/Microsoft.NET.Build.Containers.IntegrationTests.csproj
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/Microsoft.NET.Build.Containers.IntegrationTests.csproj
@@ -25,7 +25,7 @@
-
+
@@ -42,7 +42,7 @@
-
+
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/PackageTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/PackageTests.cs
similarity index 99%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/PackageTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/PackageTests.cs
index 5a81a149044b..ade911550ee3 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/PackageTests.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/PackageTests.cs
@@ -66,7 +66,7 @@ public void SanityTest_NET_Build_ContainersDependencies()
public void PackageContentTest()
{
string ignoredZipFileEntriesPrefix = "package/services/metadata";
- var netTFM = ToolsetInfo.NextTargetFramework;
+ var netTFM = ToolsetInfo.CurrentTargetFramework;
IReadOnlyList packageContents = new List()
{
"_rels/.rels",
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ParseContainerPropertiesTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/ParseContainerPropertiesTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ParseContainerPropertiesTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/ParseContainerPropertiesTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ProjectInitializer.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/ProjectInitializer.cs
similarity index 77%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ProjectInitializer.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/ProjectInitializer.cs
index 3759d46158da..1f6598b3ca13 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ProjectInitializer.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/ProjectInitializer.cs
@@ -34,7 +34,7 @@ private static string CombineFiles(string propsFile, string targetsFile)
return tempTargetLocation;
}
- public static (Project, CapturingLogger, IDisposable) InitProject(Dictionary bonusProps, [CallerMemberName] string projectName = "")
+ public static (Project, CapturingLogger, IDisposable) InitProject(Dictionary bonusProps, Dictionary? bonusItems = null, [CallerMemberName]string projectName = "")
{
var props = new Dictionary();
// required parameters
@@ -51,6 +51,7 @@ public static (Project, CapturingLogger, IDisposable) InitProject(Dictionary
@@ -68,6 +69,28 @@ public static (Project, CapturingLogger, IDisposable) InitProject(Dictionary ni,
+ [var ni, ..] => ni,
+ [] => null
+ };
+ if (newItem is not null)
+ {
+ foreach (var key in item.MetadataNames)
+ {
+ newItem.SetMetadataValue((string)key, item.GetMetadata((string)key));
+ }
+ }
+ }
+ }
+ }
+ return (project, logs, collection);
}
}
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs
similarity index 97%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs
index 56a7bdd7e881..afd41fbc508f 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs
@@ -47,7 +47,7 @@ public async Task CanReadManifestFromRegistry(string fullyQualifiedContainerName
containerName,
containerTag,
"linux-x64",
- ridgraphfile,
+ ToolsetUtils.RidGraphManifestPicker,
cancellationToken: default);
Assert.NotNull(downloadedImage);
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs
similarity index 60%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs
index 0ee70a12dd17..573edd552a01 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs
@@ -59,7 +59,7 @@ public void CanNormalizeInputContainerNames(string projectName, string expectedC
}, projectName: $"{nameof(CanNormalizeInputContainerNames)}_{projectName}_{expectedContainerImageName}_{shouldPass}");
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
- instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs).Should().Be(shouldPass, string.Join(Environment.NewLine, logger.AllMessages));
+ instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs).Should().Be(shouldPass, String.Join(Environment.NewLine, logger.AllMessages));
Assert.Equal(expectedContainerImageName, instance.GetPropertyValue(ContainerRepository));
}
@@ -80,7 +80,7 @@ public void CanWarnOnInvalidSDKVersions(string sdkVersion, bool isAllowed)
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
instance.Build(new[] { "_ContainerVerifySDKVersion" }, new[] { logger }, null, out var outputs).Should().Be(isAllowed);
- var derivedIsAllowed = bool.Parse(project.GetProperty("_IsSDKContainerAllowedVersion").EvaluatedValue);
+ var derivedIsAllowed = Boolean.Parse(project.GetProperty("_IsSDKContainerAllowedVersion").EvaluatedValue);
if (isAllowed)
{
logger.Errors.Should().HaveCount(0, "an error should not have been created");
@@ -104,7 +104,8 @@ public void GetsConventionalLabelsByDefault(bool shouldEvaluateLabels)
}, projectName: $"{nameof(GetsConventionalLabelsByDefault)}_{shouldEvaluateLabels}");
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
- instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs).Should().BeTrue("Build should have succeeded");
+ var success = instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs);
+ success.Should().BeTrue("Build should have succeeded");
if (shouldEvaluateLabels)
{
instance.GetItems(ContainerLabel).Should().NotBeEmpty("Should have evaluated some labels by default");
@@ -133,7 +134,7 @@ public void ShouldNotIncludeSourceControlLabelsUnlessUserOptsIn(bool includeSour
}, projectName: $"{nameof(ShouldNotIncludeSourceControlLabelsUnlessUserOptsIn)}_{includeSourceControl}");
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
- instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs).Should().BeTrue("Build should have succeeded but failed due to {0}", string.Join("\n", logger.AllMessages));
+ instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs).Should().BeTrue("Build should have succeeded but failed due to {0}", String.Join("\n", logger.AllMessages));
var labels = instance.GetItems(ContainerLabel);
if (includeSourceControl)
{
@@ -181,19 +182,20 @@ public void CanComputeTagsForSupportedSDKVersions(string sdkVersion, string tfm,
}, projectName: $"{nameof(CanComputeTagsForSupportedSDKVersions)}_{sdkVersion}_{tfm}_{expectedTag}");
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
- instance.Build(new[] { "_ComputeContainerBaseImageTag" }, new[] { logger }, null, out var outputs).Should().BeTrue(string.Join(Environment.NewLine, logger.Errors));
- var computedTag = instance.GetProperty("_ContainerBaseImageTag").EvaluatedValue;
- computedTag.Should().Be(expectedTag);
+ instance.Build(new[] { ComputeContainerBaseImage }, new[] { logger }, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
+ var computedTag = instance.GetProperty(ContainerBaseImage).EvaluatedValue;
+ computedTag.Should().EndWith(expectedTag);
}
[InlineData("v8.0", "linux-x64", null)]
+ [InlineData("v8.0", "linux-musl-x64", null)]
[InlineData("v8.0", "win-x64", "ContainerUser")]
[InlineData("v7.0", "linux-x64", null)]
[InlineData("v7.0", "win-x64", null)]
[InlineData("v9.0", "linux-x64", null)]
[InlineData("v9.0", "win-x64", "ContainerUser")]
[Theory]
- public void CanComputeContainerUser(string tfm, string rid, string expectedUser)
+ public void CanComputeContainerUser(string tfm, string rid, string? expectedUser)
{
var (project, logger, d) = ProjectInitializer.InitProject(new()
{
@@ -204,7 +206,7 @@ public void CanComputeContainerUser(string tfm, string rid, string expectedUser)
}, projectName: $"{nameof(CanComputeContainerUser)}_{tfm}_{rid}_{expectedUser}");
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
- instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs).Should().BeTrue(string.Join(Environment.NewLine, logger.Errors));
+ instance.Build(new[] { ComputeContainerConfig }, new[] { logger }, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
var computedTag = instance.GetProperty("ContainerUser")?.EvaluatedValue;
computedTag.Should().Be(expectedUser);
}
@@ -223,7 +225,7 @@ public void WindowsUsersGetLinuxContainers(string sdkPortableRid, string expecte
}, projectName: $"{nameof(WindowsUsersGetLinuxContainers)}_{sdkPortableRid}_{expectedRid}");
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
- instance.Build(new[] { ComputeContainerConfig }, null, null, out var outputs).Should().BeTrue(string.Join(Environment.NewLine, logger.Errors));
+ instance.Build(new[] { ComputeContainerConfig }, null, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
var computedRid = instance.GetProperty(ContainerRuntimeIdentifier)?.EvaluatedValue;
computedRid.Should().Be(expectedRid);
}
@@ -245,8 +247,114 @@ public void CanTakeContainerBaseFamilyIntoAccount(string sdkVersion, string tfmM
}, projectName: $"{nameof(CanTakeContainerBaseFamilyIntoAccount)}_{sdkVersion}_{tfmMajMin}_{containerFamily}_{expectedTag}");
using var _ = d;
var instance = project.CreateProjectInstance(ProjectInstanceSettings.None);
- instance.Build(new[] { _ComputeContainerBaseImageTag }, null, null, out var outputs).Should().BeTrue(string.Join(Environment.NewLine, logger.Errors));
- var computedBaseImageTag = instance.GetProperty(_ContainerBaseImageTag)?.EvaluatedValue;
- computedBaseImageTag.Should().Be(expectedTag);
+ instance.Build(new[] { ComputeContainerBaseImage }, null, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
+ var computedBaseImageTag = instance.GetProperty(ContainerBaseImage)?.EvaluatedValue;
+ computedBaseImageTag.Should().EndWith(expectedTag);
+ }
+
+ [InlineData("v6.0", "linux-musl-x64", "mcr.microsoft.com/dotnet/runtime:6.0-alpine")]
+ [InlineData("v6.0", "linux-x64", "mcr.microsoft.com/dotnet/runtime:6.0")]
+ [InlineData("v7.0", "linux-musl-x64", "mcr.microsoft.com/dotnet/runtime:7.0-alpine")]
+ [InlineData("v7.0", "linux-x64", "mcr.microsoft.com/dotnet/runtime:7.0")]
+ [InlineData("v8.0", "linux-musl-x64", "mcr.microsoft.com/dotnet/runtime:8.0-alpine")]
+ [InlineData("v8.0", "linux-x64", "mcr.microsoft.com/dotnet/runtime:8.0")]
+ [Theory]
+ public void MuslRidsGetAlpineContainers(string tfm, string rid, string expectedImage)
+ {
+ var (project, logger, d) = ProjectInitializer.InitProject(new()
+ {
+ ["NetCoreSdkVersion"] = "8.0.100",
+ ["TargetFrameworkVersion"] = tfm,
+ [KnownStrings.Properties.ContainerRuntimeIdentifier] = rid,
+ }, projectName: $"{nameof(MuslRidsGetAlpineContainers)}_{tfm}_{rid}_{expectedImage}");
+ using var _ = d;
+ var instance = project.CreateProjectInstance(global::Microsoft.Build.Execution.ProjectInstanceSettings.None);
+ instance.Build(new[] { ComputeContainerBaseImage }, null, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
+ var computedBaseImageTag = instance.GetProperty(ContainerBaseImage)?.EvaluatedValue;
+ computedBaseImageTag.Should().BeEquivalentTo(expectedImage);
+ }
+
+ [InlineData("linux-musl-x64", "mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0-alpine-aot")]
+ [InlineData("linux-x64", "mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0-jammy-chiseled-aot")]
+ [Theory]
+ public void AOTAppsGetAOTImages(string rid, string expectedImage)
+ {
+ var (project, logger, d) = ProjectInitializer.InitProject(new()
+ {
+ ["NetCoreSdkVersion"] = "8.0.100",
+ ["TargetFrameworkVersion"] = "v8.0",
+ [KnownStrings.Properties.ContainerRuntimeIdentifier] = rid,
+ [KnownStrings.Properties.PublishSelfContained] = true.ToString(),
+ [KnownStrings.Properties.PublishAot] = true.ToString(),
+ [KnownStrings.Properties.InvariantGlobalization] = true.ToString(),
+ }, projectName: $"{nameof(AOTAppsGetAOTImages)}_{rid}_{expectedImage}");
+ using var _ = d;
+ var instance = project.CreateProjectInstance(global::Microsoft.Build.Execution.ProjectInstanceSettings.None);
+ instance.Build(new[] { ComputeContainerBaseImage }, null, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
+ var computedBaseImageTag = instance.GetProperty(ContainerBaseImage)?.EvaluatedValue;
+ computedBaseImageTag.Should().BeEquivalentTo(expectedImage);
+ }
+
+ [InlineData("linux-musl-x64", "mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0-alpine-extra")]
+ [InlineData("linux-x64", "mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0-jammy-chiseled-extra")]
+ [Theory]
+ public void AOTAppsWithCulturesGetExtraImages(string rid, string expectedImage)
+ {
+ var (project, logger, d) = ProjectInitializer.InitProject(new()
+ {
+ ["NetCoreSdkVersion"] = "8.0.100",
+ ["TargetFrameworkVersion"] = "v8.0",
+ [KnownStrings.Properties.ContainerRuntimeIdentifier] = rid,
+ [KnownStrings.Properties.PublishSelfContained] = true.ToString(),
+ [KnownStrings.Properties.PublishAot] = true.ToString(),
+ [KnownStrings.Properties.InvariantGlobalization] = false.ToString()
+ }, projectName: $"{nameof(AOTAppsWithCulturesGetExtraImages)}_{rid}_{expectedImage}");
+ using var _ = d;
+ var instance = project.CreateProjectInstance(global::Microsoft.Build.Execution.ProjectInstanceSettings.None);
+ instance.Build(new[] { ComputeContainerBaseImage }, null, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
+ var computedBaseImageTag = instance.GetProperty(ContainerBaseImage)?.EvaluatedValue;
+ computedBaseImageTag.Should().BeEquivalentTo(expectedImage);
+ }
+
+ [InlineData("linux-musl-x64", "mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine")]
+ [InlineData("linux-x64", "mcr.microsoft.com/dotnet/runtime-deps:7.0")]
+ [Theory]
+ public void AOTAppsLessThan8DoNotGetAOTImages(string rid, string expectedImage)
+ {
+ var (project, logger, d) = ProjectInitializer.InitProject(new()
+ {
+ ["NetCoreSdkVersion"] = "8.0.100",
+ ["TargetFrameworkVersion"] = "v7.0",
+ [KnownStrings.Properties.ContainerRuntimeIdentifier] = rid,
+ [KnownStrings.Properties.PublishSelfContained] = true.ToString(),
+ [KnownStrings.Properties.PublishAot] = true.ToString(),
+ [KnownStrings.Properties.InvariantGlobalization] = true.ToString(),
+ }, projectName: $"{nameof(AOTAppsLessThan8DoNotGetAOTImages)}_{rid}_{expectedImage}");
+ using var _ = d;
+ var instance = project.CreateProjectInstance(global::Microsoft.Build.Execution.ProjectInstanceSettings.None);
+ instance.Build(new[] { ComputeContainerBaseImage }, null, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
+ var computedBaseImageTag = instance.GetProperty(ContainerBaseImage)?.EvaluatedValue;
+ computedBaseImageTag.Should().BeEquivalentTo(expectedImage);
+ }
+
+ [InlineData("linux-musl-x64", "mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine")]
+ [InlineData("linux-x64", "mcr.microsoft.com/dotnet/runtime-deps:7.0")]
+ [Theory]
+ public void AOTAppsLessThan8WithCulturesDoNotGetExtraImages(string rid, string expectedImage)
+ {
+ var (project, logger, d) = ProjectInitializer.InitProject(new()
+ {
+ ["NetCoreSdkVersion"] = "8.0.100",
+ ["TargetFrameworkVersion"] = "v7.0",
+ [KnownStrings.Properties.ContainerRuntimeIdentifier] = rid,
+ [KnownStrings.Properties.PublishSelfContained] = true.ToString(),
+ [KnownStrings.Properties.PublishAot] = true.ToString(),
+ [KnownStrings.Properties.InvariantGlobalization] = false.ToString()
+ }, projectName: $"{nameof(AOTAppsWithCulturesGetExtraImages)}_{rid}_{expectedImage}");
+ using var _ = d;
+ var instance = project.CreateProjectInstance(global::Microsoft.Build.Execution.ProjectInstanceSettings.None);
+ instance.Build(new[] { ComputeContainerBaseImage }, null, null, out var outputs).Should().BeTrue(String.Join(Environment.NewLine, logger.Errors));
+ var computedBaseImageTag = instance.GetProperty(ContainerBaseImage)?.EvaluatedValue;
+ computedBaseImageTag.Should().BeEquivalentTo(expectedImage);
}
}
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TestSettings.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/TestSettings.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TestSettings.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/TestSettings.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ToolsetUtils.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/ToolsetUtils.cs
similarity index 94%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ToolsetUtils.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/ToolsetUtils.cs
index 35cf4fb4ddd0..599d95280157 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/ToolsetUtils.cs
+++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/ToolsetUtils.cs
@@ -20,6 +20,8 @@ internal static string GetRuntimeGraphFilePath()
return lastWrittenSdk.GetFiles("RuntimeIdentifierGraph.json").Single().FullName;
}
+ internal static IManifestPicker RidGraphManifestPicker { get; } = new RidGraphManifestPicker(GetRuntimeGraphFilePath());
+
///
/// Gets path to built Microsoft.NET.Build.Containers.*.nupkg prepared for tests.
///
diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TransientTestFolder.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/TransientTestFolder.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TransientTestFolder.cs
rename to test/Microsoft.NET.Build.Containers.IntegrationTests/TransientTestFolder.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs
similarity index 97%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs
index 3373a260a8c5..570ac43598db 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs
+++ b/test/Microsoft.NET.Build.Containers.UnitTests/ContainerHelpersTests.cs
@@ -40,7 +40,7 @@ public void IsValidRegistry(string registry, bool expectedReturn)
[InlineData("docker.io/ubuntu/runtime:jammy", true, DefaultRegistry, "ubuntu/runtime", "jammy", 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)
+ public void TryParseFullyQualifiedContainerName(string fullyQualifiedName, bool expectedReturn, string? expectedRegistry, string? expectedImage, string? expectedTag, 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);
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/CreateNewImageTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/CreateNewImageTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/CreateNewImageTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/CreateNewImageTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/DescriptorTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/DescriptorTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/DescriptorTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/DescriptorTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/DockerAvailableUtils.cs b/test/Microsoft.NET.Build.Containers.UnitTests/DockerAvailableUtils.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/DockerAvailableUtils.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/DockerAvailableUtils.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/DockerDaemonTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/DockerDaemonTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/DockerDaemonTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/DockerDaemonTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs
similarity index 87%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs
index 868d79d6475e..78b2e303922c 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs
+++ b/test/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs
@@ -562,6 +562,89 @@ public void CanSetPortFromEnvVarFromUser(string envVar, string envValue, params
Assert.Equal(assignedPorts, expectedPorts);
}
+
+ [Fact]
+ public void CanSetContainerUserAndOverrideAppUID()
+ {
+ var userId = "1646";
+ var baseConfigBuilder = FromBaseImageConfig($$"""
+ {
+ "architecture": "amd64",
+ "config": {
+ "Hostname": "",
+ "Domainname": "",
+ "User": "",
+ "Env": [
+ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+ "{{ImageBuilder.EnvironmentVariables.APP_UID}}=12345"
+ ],
+ "Cmd": ["bash"],
+ "Image": "sha256:d772d27ebeec80393349a4770dc37f977be2c776a01c88b624d43f93fa369d69",
+ "WorkingDir": ""
+ },
+ "created": "2023-02-04T08:14:52.000901321Z",
+ "os": "linux",
+ "rootfs": {
+ "type": "layers",
+ "diff_ids": [
+ "sha256:bd2fe8b74db65d82ea10db97368d35b92998d4ea0e7e7dc819481fe4a68f64cf",
+ "sha256:94100d1041b650c6f7d7848c550cd98c25d0bdc193d30692e5ea5474d7b3b085",
+ "sha256:53c2a75a33c8f971b4b5036d34764373e134f91ee01d8053b4c3573c42e1cf5d",
+ "sha256:49a61320e585180286535a2545be5722b09e40ad44c7c190b20ec96c9e42e4a3",
+ "sha256:8a379cce2ac272aa71aa029a7bbba85c852ba81711d9f90afaefd3bf5036dc48"
+ ]
+ }
+ }
+ """);
+
+ baseConfigBuilder.SetUser(userId);
+ var config = JsonNode.Parse(baseConfigBuilder.Build().Config);
+ config!["config"]?["User"]?.GetValue().Should().Be(expected: userId, because: "The precedence of SetUser should override inferred user ids");
+ }
+
+ [Fact]
+ public void WhenMultipleUrlSourcesAreSetOnlyAspnetcoreUrlsIsUsed()
+ {
+ int[] expected = [12345];
+ var builder = FromBaseImageConfig($$"""
+ {
+ "architecture": "amd64",
+ "config": {
+ "Hostname": "",
+ "Domainname": "",
+ "User": "",
+ "Env": [
+ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ ],
+ "Cmd": ["bash"],
+ "Image": "sha256:d772d27ebeec80393349a4770dc37f977be2c776a01c88b624d43f93fa369d69",
+ "WorkingDir": ""
+ },
+ "created": "2023-02-04T08:14:52.000901321Z",
+ "os": "linux",
+ "rootfs": {
+ "type": "layers",
+ "diff_ids": [
+ "sha256:bd2fe8b74db65d82ea10db97368d35b92998d4ea0e7e7dc819481fe4a68f64cf",
+ "sha256:94100d1041b650c6f7d7848c550cd98c25d0bdc193d30692e5ea5474d7b3b085",
+ "sha256:53c2a75a33c8f971b4b5036d34764373e134f91ee01d8053b4c3573c42e1cf5d",
+ "sha256:49a61320e585180286535a2545be5722b09e40ad44c7c190b20ec96c9e42e4a3",
+ "sha256:8a379cce2ac272aa71aa029a7bbba85c852ba81711d9f90afaefd3bf5036dc48"
+ ]
+ }
+ }
+ """);
+
+ builder.AddEnvironmentVariable(ImageBuilder.EnvironmentVariables.ASPNETCORE_URLS, "https://*:12345");
+ builder.AddEnvironmentVariable(ImageBuilder.EnvironmentVariables.ASPNETCORE_HTTPS_PORTS, "456");
+ var builtImage = builder.Build();
+ JsonNode? result = JsonNode.Parse(builtImage.Config);
+ Assert.NotNull(result);
+ var portsObject = result["config"]?["ExposedPorts"]?.AsObject();
+ var assignedPorts = portsObject?.AsEnumerable().Select(portString => int.Parse(portString.Key.Split('/')[0])).ToArray();
+ Assert.Equal(expected, assignedPorts);
+ }
+
private ImageBuilder FromBaseImageConfig(string baseImageConfig, [CallerMemberName] string testName = "")
{
var manifest = new ManifestV2()
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/ImageConfigTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/ImageConfigTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/ImageConfigTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/ImageConfigTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/Microsoft.NET.Build.Containers.UnitTests.csproj b/test/Microsoft.NET.Build.Containers.UnitTests/Microsoft.NET.Build.Containers.UnitTests.csproj
similarity index 81%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/Microsoft.NET.Build.Containers.UnitTests.csproj
rename to test/Microsoft.NET.Build.Containers.UnitTests/Microsoft.NET.Build.Containers.UnitTests.csproj
index ebfc49020a2a..7873104567f5 100644
--- a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/Microsoft.NET.Build.Containers.UnitTests.csproj
+++ b/test/Microsoft.NET.Build.Containers.UnitTests/Microsoft.NET.Build.Containers.UnitTests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/Resources/ResourceTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/Resources/ResourceTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Containers.UnitTests/Resources/ResourceTests.cs
rename to test/Microsoft.NET.Build.Containers.UnitTests/Resources/ResourceTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/AppHostTests.cs b/test/Microsoft.NET.Build.Tests/AppHostTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/AppHostTests.cs
rename to test/Microsoft.NET.Build.Tests/AppHostTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs b/test/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs
rename to test/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/AspNetCoreOnFullFramework.cs b/test/Microsoft.NET.Build.Tests/AspNetCoreOnFullFramework.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/AspNetCoreOnFullFramework.cs
rename to test/Microsoft.NET.Build.Tests/AspNetCoreOnFullFramework.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/COMReferenceTests.cs b/test/Microsoft.NET.Build.Tests/COMReferenceTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/COMReferenceTests.cs
rename to test/Microsoft.NET.Build.Tests/COMReferenceTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/DeleteNuGetArtifactsFixture.cs b/test/Microsoft.NET.Build.Tests/DeleteNuGetArtifactsFixture.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/DeleteNuGetArtifactsFixture.cs
rename to test/Microsoft.NET.Build.Tests/DeleteNuGetArtifactsFixture.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/DepsFileSkipTests.cs b/test/Microsoft.NET.Build.Tests/DepsFileSkipTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/DepsFileSkipTests.cs
rename to test/Microsoft.NET.Build.Tests/DepsFileSkipTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/DesignTimeBuildTests.cs b/test/Microsoft.NET.Build.Tests/DesignTimeBuildTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/DesignTimeBuildTests.cs
rename to test/Microsoft.NET.Build.Tests/DesignTimeBuildTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GenerateResourceTests.cs b/test/Microsoft.NET.Build.Tests/GenerateResourceTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GenerateResourceTests.cs
rename to test/Microsoft.NET.Build.Tests/GenerateResourceTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenFrameworkReferences.cs b/test/Microsoft.NET.Build.Tests/GivenFrameworkReferences.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenFrameworkReferences.cs
rename to test/Microsoft.NET.Build.Tests/GivenFrameworkReferences.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatAProjectHasntBeenRestored.cs b/test/Microsoft.NET.Build.Tests/GivenThatAProjectHasntBeenRestored.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatAProjectHasntBeenRestored.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatAProjectHasntBeenRestored.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeManifestSupportedFrameworks.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeManifestSupportedFrameworks.cs
similarity index 98%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeManifestSupportedFrameworks.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeManifestSupportedFrameworks.cs
index dad73b150bcb..be9ba6ab5988 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeManifestSupportedFrameworks.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeManifestSupportedFrameworks.cs
@@ -17,7 +17,7 @@ public void TheMaximumVersionsAreSupported(string targetFrameworkIdentifier)
var project = new TestProject
{
Name = "packagethatwillgomissing",
- TargetFrameworks = targetFrameworkIdentifier == ".NETCoreApp" ? ToolsetInfo.NextTargetFramework : "netstandard2.1",
+ TargetFrameworks = targetFrameworkIdentifier == ".NETCoreApp" ? ToolsetInfo.CurrentTargetFramework : "netstandard2.1",
};
TestAsset asset = _testAssetsManager
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantACustomTFM.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantACustomTFM.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantACustomTFM.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantACustomTFM.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantAMessageWhenBuildingWithAPreviewSdk.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantAMessageWhenBuildingWithAPreviewSdk.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantAMessageWhenBuildingWithAPreviewSdk.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantAMessageWhenBuildingWithAPreviewSdk.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantAllResourcesInSatellite.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantAllResourcesInSatellite.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantAllResourcesInSatellite.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantAllResourcesInSatellite.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantBuildsToBeIncremental.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantBuildsToBeIncremental.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantBuildsToBeIncremental.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantBuildsToBeIncremental.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenAssetsFileCannotBeRead.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenAssetsFileCannotBeRead.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenAssetsFileCannotBeRead.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenAssetsFileCannotBeRead.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenPackageCannotBeFound.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenPackageCannotBeFound.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenPackageCannotBeFound.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantDiagnosticsWhenPackageCannotBeFound.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantImplicitNamespaceImportsDisabled.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantImplicitNamespaceImportsDisabled.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantImplicitNamespaceImportsDisabled.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantImplicitNamespaceImportsDisabled.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantRuntimeConfigInBuiltProjectOutputGroup.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantRuntimeConfigInBuiltProjectOutputGroup.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantRuntimeConfigInBuiltProjectOutputGroup.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantRuntimeConfigInBuiltProjectOutputGroup.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantSatelliteAssembliesHaveassemblyVersion.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantSatelliteAssembliesHaveassemblyVersion.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantSatelliteAssembliesHaveassemblyVersion.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantSatelliteAssembliesHaveassemblyVersion.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAComServerLibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAComServerLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAComServerLibrary.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAComServerLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProjectWithTransitiveDeps.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProjectWithTransitiveDeps.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProjectWithTransitiveDeps.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProjectWithTransitiveDeps.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
similarity index 94%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
index b637ecca8400..ffaa2e32b175 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs
@@ -1,6 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using Microsoft.Build.Evaluation;
+using Microsoft.Build.Framework;
+
namespace Microsoft.NET.Build.Tests
{
public class GivenThatWeWantToBuildADesktopExe : SdkTest
@@ -33,12 +36,83 @@ public void It_builds_a_simple_desktop_app()
});
}
+ [WindowsOnlyTheory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void RuntimeIdentifiersInferredCorrectly(bool useRidGraph)
+ {
+ Func findAssembly = (a, b) => default;
+ findAssembly = (string path, string file) =>
+ {
+ var dir = new DirectoryInfo(path);
+ foreach (var folder in dir.GetDirectories())
+ {
+ var ret = findAssembly(folder.FullName, file);
+ if (ret is not null)
+ {
+ return ret;
+ }
+ }
+
+ foreach (var f in dir.GetFiles())
+ {
+ if (Path.GetFileName(f.FullName).Equals(file, StringComparison.OrdinalIgnoreCase))
+ {
+ return f.FullName;
+ }
+ }
+
+ return null;
+ };
+
+ var rootDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..");
+ string microsoftNetBuildTasksAssembly = findAssembly(rootDirectory, "Microsoft.NET.Build.Tasks.dll");
+ string ridInferenceTargets = findAssembly(rootDirectory, "Microsoft.NET.RuntimeIdentifierInference.targets");
+ var projectContents = @$"
+
+
+ net472
+ .NETFramework
+ {useRidGraph}
+ {microsoftNetBuildTasksAssembly}
+ true
+
+
+
+";
+
+ var fileLocation = Path.GetTempFileName();
+
+ try
+ {
+ File.WriteAllText(fileLocation, projectContents);
+
+ var loggers = new List
+ {
+ new global::Microsoft.Build.Logging.ConsoleLogger(LoggerVerbosity.Detailed)
+ };
+
+ var collection = new ProjectCollection(null, loggers, ToolsetDefinitionLocations.Default);
+
+ var project = collection.LoadProject(fileLocation, new Dictionary(), null);
+
+ project.GetPropertyValue("RuntimeIdentifier").Should().Be(useRidGraph ? "win7-x86" : "win-x86");
+ }
+ finally
+ {
+ if (File.Exists(fileLocation))
+ {
+ File.Delete(fileLocation);
+ }
+ }
+ }
+
// Windows only because default RuntimeIdentifier only applies when current OS is Windows
[WindowsOnlyTheory]
[InlineData("Microsoft.DiasymReader.Native/1.7.0", false, "AnyCPU")]
[InlineData("Microsoft.DiasymReader.Native/1.7.0", true, "x86")]
- [InlineData("SQLite/3.13.0", false, "x86")]
- [InlineData("SQLite/3.13.0", true, "x86")]
+ [InlineData("Libuv/1.10.0", false, "x86")]
+ [InlineData("Libuv/1.10.0", true, "x86")]
public void PlatformTargetInferredCorrectly(string packageToReference, bool referencePlatformPackage, string expectedPlatform)
{
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWithFSharp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWithFSharp.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWithFSharp.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWithFSharp.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithFSharp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithFSharp.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithFSharp.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithFSharp.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs
similarity index 98%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs
index 4e3c5e5398b9..05a1a3aaec49 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs
@@ -254,8 +254,8 @@ public void It_restores_only_ridless_tfm()
}
[Theory]
- [InlineData("netcoreapp2.0")]
- [InlineData("netcoreapp2.1")]
+ [InlineData("net6.0")]
+ [InlineData("net7.0")]
[InlineData(ToolsetInfo.CurrentTargetFramework)]
public void It_runs_the_app_from_the_output_folder(string targetFramework)
{
@@ -263,41 +263,34 @@ public void It_runs_the_app_from_the_output_folder(string targetFramework)
}
[Theory]
- [InlineData("netcoreapp2.1")]
+ [InlineData("net6.0")]
+ [InlineData("net7.0")]
[InlineData(ToolsetInfo.CurrentTargetFramework)]
public void It_runs_a_rid_specific_app_from_the_output_folder(string targetFramework)
- {
+ {
RunAppFromOutputFolder("RunFromOutputFolderWithRID_" + targetFramework, true, false, targetFramework);
}
[Theory]
- [InlineData("netcoreapp2.0")]
+ [InlineData("net6.0")]
+ [InlineData("net7.0")]
[InlineData(ToolsetInfo.CurrentTargetFramework)]
public void It_runs_the_app_with_conflicts_from_the_output_folder(string targetFramework)
{
- if (!EnvironmentInfo.SupportsTargetFramework(targetFramework))
- {
- return;
- }
-
RunAppFromOutputFolder("RunFromOutputFolderConflicts_" + targetFramework, false, true, targetFramework);
}
[Theory]
- [InlineData("netcoreapp2.0")]
+ [InlineData("net6.0")]
+ [InlineData("net7.0")]
[InlineData(ToolsetInfo.CurrentTargetFramework)]
public void It_runs_a_rid_specific_app_with_conflicts_from_the_output_folder(string targetFramework)
{
- if (!EnvironmentInfo.SupportsTargetFramework(targetFramework))
- {
- return;
- }
-
RunAppFromOutputFolder("RunFromOutputFolderWithRIDConflicts_" + targetFramework, true, true, targetFramework);
}
private void RunAppFromOutputFolder(string testName, bool useRid, bool includeConflicts,
- string targetFramework = "netcoreapp2.0")
+ string targetFramework = ToolsetInfo.CurrentTargetFramework)
{
var runtimeIdentifier = useRid ? EnvironmentInfo.GetCompatibleRid(targetFramework) : null;
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppForTelemetry.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppForTelemetry.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppForTelemetry.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppForTelemetry.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppWithWap.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppWithWap.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppWithWap.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppWithWap.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetStandard2Library.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetStandard2Library.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetStandard2Library.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetStandard2Library.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAP2PrefernceWithTargetPlatform.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAP2PrefernceWithTargetPlatform.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAP2PrefernceWithTargetPlatform.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAP2PrefernceWithTargetPlatform.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs
similarity index 91%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs
index 42594ccfe4a6..a6e8746e7290 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs
@@ -470,7 +470,55 @@ public void It_does_not_build_SelfContained_due_to_PublishSelfContained_being_tr
.Pass();
var outputDirectory = buildCommand.GetOutputDirectory(targetFramework);
- outputDirectory.Should().NotHaveFile("hostfxr.dll"); // This file will only appear if SelfContained.
+ outputDirectory.Should().NotHaveFile($"hostfxr{FileNameSuffixes.CurrentPlatform.DynamicLib}"); // This file will only appear if SelfContained.
+ }
+
+ [Fact]
+ public void It_builds_using_regular_apphost_with_PublishSingleFile()
+ {
+ var tfm = ToolsetInfo.CurrentTargetFramework;
+ var project = new TestProject()
+ {
+ IsExe = true,
+ TargetFrameworks = tfm,
+ AdditionalProperties = {
+ { "PublishSingleFile", "true"},
+ { "SelfContained", "true" } }
+ };
+ var asset = _testAssetsManager.CreateTestProject(project);
+
+ // Validate apphost is used, not singlefilehost
+ var command = new GetValuesCommand(Log,
+ Path.Combine(asset.Path, project.Name),
+ project.TargetFrameworks,
+ "AllItemsFullPathWithTargetPath",
+ GetValuesCommand.ValueType.Item);
+ command.DependsOnTargets = "GetCopyToOutputDirectoryItems";
+ command.MetadataNames.Add("TargetPath");
+ command.Execute().Should().Pass();
+
+ var itemsWithTargetPaths = command.GetValuesWithMetadata();
+ itemsWithTargetPaths.Should().NotContain((i) => i.value.EndsWith($"singlefilehost{Constants.ExeSuffix}"));
+ itemsWithTargetPaths.Should().Contain((i) =>
+ i.value.EndsWith($"apphost{Constants.ExeSuffix}")
+ && i.metadata["TargetPath"] == $"{project.Name}{Constants.ExeSuffix}");
+
+ // Validate it builds and runs
+ var buildCommand = new BuildCommand(asset);
+ buildCommand
+ .Execute()
+ .Should()
+ .Pass();
+
+ string exePath = Path.Combine(
+ buildCommand.GetOutputDirectory(tfm, runtimeIdentifier: EnvironmentInfo.GetCompatibleRid(tfm)).FullName,
+ $"{project.Name}{Constants.ExeSuffix}");
+ new RunExeCommand(Log, exePath)
+ .Execute()
+ .Should()
+ .Pass()
+ .And
+ .HaveStdOutContaining("Hello World!");
}
[Theory]
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonAnyCPUPlatform.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonAnyCPUPlatform.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonAnyCPUPlatform.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonAnyCPUPlatform.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfiguration.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfiguration.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfiguration.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfiguration.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfigurationVB.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfigurationVB.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfigurationVB.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithNonDefaultConfigurationVB.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithProjRefDiffCase.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithProjRefDiffCase.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithProjRefDiffCase.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithProjRefDiffCase.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAUnitTestProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAUnitTestProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAUnitTestProject.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAUnitTestProject.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsRuntimeComponent.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsRuntimeComponent.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsRuntimeComponent.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsRuntimeComponent.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrariesAndRid.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrariesAndRid.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrariesAndRid.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrariesAndRid.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrary.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithSharedProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithSharedProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithSharedProject.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithSharedProject.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveNonSdkProjectRefs.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveNonSdkProjectRefs.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveNonSdkProjectRefs.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveNonSdkProjectRefs.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveProjectRefs.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveProjectRefs.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveProjectRefs.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithTransitiveProjectRefs.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAppsWithFrameworkRefs.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAppsWithFrameworkRefs.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAppsWithFrameworkRefs.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAppsWithFrameworkRefs.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithARuntimeIdentifier.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithARuntimeIdentifier.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithARuntimeIdentifier.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithARuntimeIdentifier.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithGlobalJson.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithGlobalJson.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithGlobalJson.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithGlobalJson.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToCollectExceptionTelemetry.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToCollectExceptionTelemetry.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToCollectExceptionTelemetry.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToCollectExceptionTelemetry.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
similarity index 99%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
index 9131600e57d9..31c5fce9569a 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
@@ -361,9 +361,9 @@ public void It_includes_internals_visible_to()
[RequiresMSBuildVersionTheory("17.0.0.32901")]
[InlineData(true, true, "net5.0")]
- [InlineData(true, true, ToolsetInfo.NextTargetFramework)]
- [InlineData(true, false, ToolsetInfo.NextTargetFramework)]
- [InlineData(false, false, ToolsetInfo.NextTargetFramework)]
+ [InlineData(true, true, ToolsetInfo.CurrentTargetFramework)]
+ [InlineData(true, false, ToolsetInfo.CurrentTargetFramework)]
+ [InlineData(false, false, ToolsetInfo.CurrentTargetFramework)]
public void TestPreviewFeatures(bool enablePreviewFeatures, bool generateRequiresPreviewFeaturesAttribute, string targetFramework)
{
var testAsset = _testAssetsManager
@@ -410,7 +410,7 @@ public void TestPreviewFeatures(bool enablePreviewFeatures, bool generateRequire
if (enablePreviewFeatures && generateRequiresPreviewFeaturesAttribute)
{
- if (targetFramework == ToolsetInfo.NextTargetFramework)
+ if (targetFramework == ToolsetInfo.CurrentTargetFramework)
{
Assert.Equal("Preview", langVersion);
Assert.True(contains);
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyLocalDependencies.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyLocalDependencies.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyLocalDependencies.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyLocalDependencies.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyPPFileToOutput.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyPPFileToOutput.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyPPFileToOutput.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToCopyPPFileToOutput.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToExcludeTheMainProjectFromTheDepsFile.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToExcludeTheMainProjectFromTheDepsFile.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToExcludeTheMainProjectFromTheDepsFile.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToExcludeTheMainProjectFromTheDepsFile.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs
similarity index 99%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs
index 5a098b0f970f..95cb4028b447 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs
@@ -156,7 +156,7 @@ static void Main()
buildResult.StdErr.Should().Be(string.Empty);
}
- [InlineData(ToolsetInfo.CurrentTargetFramework, ToolsetInfo.NextTargetFrameworkVersion)]
+ [InlineData(ToolsetInfo.CurrentTargetFramework, ToolsetInfo.CurrentTargetFrameworkVersion)]
[RequiresMSBuildVersionTheory("16.8")]
public void It_defaults_preview_AnalysisLevel_to_the_next_tfm(string currentTFM, string nextTFMVersionNumber)
{
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_BlazorWasm.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_BlazorWasm.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_BlazorWasm.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_BlazorWasm.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_DotNet.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_DotNet.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_DotNet.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_DotNet.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_WebApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_WebApp.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_WebApp.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_WebApp.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_Worker.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_Worker.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_Worker.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateGlobalUsings_Worker.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToPreserveCompilationContextForBuild.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToPreserveCompilationContextForBuild.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToPreserveCompilationContextForBuild.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToPreserveCompilationContextForBuild.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToProduceReferenceAssembly.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToProduceReferenceAssembly.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToProduceReferenceAssembly.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToProduceReferenceAssembly.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAProject.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAProject.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAnAssembly.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAnAssembly.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAnAssembly.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToReferenceAnAssembly.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveRuntimePackAssets.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveRuntimePackAssets.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveRuntimePackAssets.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveRuntimePackAssets.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToRunFromMSBuildTarget.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToRunFromMSBuildTarget.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToRunFromMSBuildTarget.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToRunFromMSBuildTarget.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToSetPropertiesInDirectoryBuildProps.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToSetPropertiesInDirectoryBuildProps.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToSetPropertiesInDirectoryBuildProps.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToSetPropertiesInDirectoryBuildProps.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetEolFrameworks.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetNet471.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetNet471.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetNet471.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToTargetNet471.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseAnalyzers.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseAnalyzers.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseAnalyzers.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseAnalyzers.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseContentFiles.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseContentFiles.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseContentFiles.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseContentFiles.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUsePlatformAnalyzers.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUsePlatformAnalyzers.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUsePlatformAnalyzers.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToUsePlatformAnalyzers.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseVB.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseVB.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToUseVB.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseVB.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyProjectReferenceCompat.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyProjectReferenceCompat.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyProjectReferenceCompat.cs
rename to test/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyProjectReferenceCompat.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThereAreDefaultItems.cs b/test/Microsoft.NET.Build.Tests/GivenThereAreDefaultItems.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenThereAreDefaultItems.cs
rename to test/Microsoft.NET.Build.Tests/GivenThereAreDefaultItems.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenTransitiveFrameworkReferencesAreDisabled.cs b/test/Microsoft.NET.Build.Tests/GivenTransitiveFrameworkReferencesAreDisabled.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenTransitiveFrameworkReferencesAreDisabled.cs
rename to test/Microsoft.NET.Build.Tests/GivenTransitiveFrameworkReferencesAreDisabled.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenWeWantToRequireWindowsForDesktopApps.cs b/test/Microsoft.NET.Build.Tests/GivenWeWantToRequireWindowsForDesktopApps.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GivenWeWantToRequireWindowsForDesktopApps.cs
rename to test/Microsoft.NET.Build.Tests/GivenWeWantToRequireWindowsForDesktopApps.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GiventThatWeWantDesignerSupport.cs b/test/Microsoft.NET.Build.Tests/GiventThatWeWantDesignerSupport.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GiventThatWeWantDesignerSupport.cs
rename to test/Microsoft.NET.Build.Tests/GiventThatWeWantDesignerSupport.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GlobalPropertyFlowTests.cs b/test/Microsoft.NET.Build.Tests/GlobalPropertyFlowTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/GlobalPropertyFlowTests.cs
rename to test/Microsoft.NET.Build.Tests/GlobalPropertyFlowTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/ImplicitAspNetVersions.cs b/test/Microsoft.NET.Build.Tests/ImplicitAspNetVersions.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/ImplicitAspNetVersions.cs
rename to test/Microsoft.NET.Build.Tests/ImplicitAspNetVersions.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/KnownRuntimePackTests.cs b/test/Microsoft.NET.Build.Tests/KnownRuntimePackTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/KnownRuntimePackTests.cs
rename to test/Microsoft.NET.Build.Tests/KnownRuntimePackTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/MetadataUpdaterSupportTest.cs b/test/Microsoft.NET.Build.Tests/MetadataUpdaterSupportTest.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/MetadataUpdaterSupportTest.cs
rename to test/Microsoft.NET.Build.Tests/MetadataUpdaterSupportTest.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj b/test/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj
similarity index 84%
rename from src/Tests/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj
rename to test/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj
index 2ca46170114c..fdcbdc2dd707 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj
+++ b/test/Microsoft.NET.Build.Tests/Microsoft.NET.Build.Tests.csproj
@@ -32,7 +32,7 @@
-
+
@@ -41,14 +41,14 @@
-
+
-
+
diff --git a/src/Tests/Microsoft.NET.Build.Tests/Net50Targeting.cs b/test/Microsoft.NET.Build.Tests/Net50Targeting.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/Net50Targeting.cs
rename to test/Microsoft.NET.Build.Tests/Net50Targeting.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/NonCopyLocalProjectReferenceTests.cs b/test/Microsoft.NET.Build.Tests/NonCopyLocalProjectReferenceTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/NonCopyLocalProjectReferenceTests.cs
rename to test/Microsoft.NET.Build.Tests/NonCopyLocalProjectReferenceTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/ProjectConfigurationDescriptionTest.cs b/test/Microsoft.NET.Build.Tests/ProjectConfigurationDescriptionTest.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/ProjectConfigurationDescriptionTest.cs
rename to test/Microsoft.NET.Build.Tests/ProjectConfigurationDescriptionTest.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/Properties/launchSettings.json b/test/Microsoft.NET.Build.Tests/Properties/launchSettings.json
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/Properties/launchSettings.json
rename to test/Microsoft.NET.Build.Tests/Properties/launchSettings.json
diff --git a/src/Tests/Microsoft.NET.Build.Tests/ReferenceExeTests.cs b/test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/ReferenceExeTests.cs
rename to test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/RuntimeIdentifierGraphTests.cs b/test/Microsoft.NET.Build.Tests/RuntimeIdentifierGraphTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/RuntimeIdentifierGraphTests.cs
rename to test/Microsoft.NET.Build.Tests/RuntimeIdentifierGraphTests.cs
diff --git a/src/Tests/Microsoft.NET.Build.Tests/SourceLinkTests.cs b/test/Microsoft.NET.Build.Tests/SourceLinkTests.cs
similarity index 93%
rename from src/Tests/Microsoft.NET.Build.Tests/SourceLinkTests.cs
rename to test/Microsoft.NET.Build.Tests/SourceLinkTests.cs
index ea806f4f4eb4..109a9cfc2c9e 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/SourceLinkTests.cs
+++ b/test/Microsoft.NET.Build.Tests/SourceLinkTests.cs
@@ -295,7 +295,11 @@ public void Cpp()
.CopyTestAsset("NetCoreCsharpAppReferenceCppCliLib")
.WithSource();
- testAsset = WithProperties(testAsset, ("EnableManagedPackageReferenceSupport", "true"));
+ var intDir = Path.Combine(testAsset.Path, "NETCoreCppCliTest", "IntDir");
+
+ testAsset = WithProperties(testAsset,
+ ("EnableManagedPackageReferenceSupport", "true"),
+ ("IntermediateOutputPath", intDir));
CreateGitFiles(testAsset.Path, "https://github.com/org/repo");
@@ -306,15 +310,34 @@ public void Cpp()
buildCommand.Execute("-p:Platform=x64").Should().Pass();
- var outputDir = Path.Combine(testAsset.Path, "NETCoreCppCliTest", "x64", "Debug");
- var sourceLinkFilePath = Path.Combine(outputDir, "NETCoreCppCliTest.sourcelink.json");
+ var sourceLinkFilePath = Path.Combine(intDir, "NETCoreCppCliTest.sourcelink.json");
var actualContent = File.ReadAllText(sourceLinkFilePath, Encoding.UTF8);
var expectedPattern = Path.Combine(testAsset.Path, "*").Replace("\\", "\\\\");
var expectedSourceLink = $$$"""{"documents":{"{{{expectedPattern}}}":"https://raw.githubusercontent.com/org/repo/1200000000000000000000000000000000000000/*"}}""";
Assert.Equal(expectedSourceLink, actualContent);
+ var outputDir = Path.Combine(testAsset.Path, "NETCoreCppCliTest", "x64", "Debug");
var pdbText = File.ReadAllText(Path.Combine(outputDir, "NETCoreCppCliTest.pdb"), Encoding.UTF8);
Assert.Contains(expectedSourceLink, pdbText);
}
+
+ [FullMSBuildOnlyFact]
+ public void LegacyDesktopWpf()
+ {
+ var testAsset = _testAssetsManager
+ .CopyTestAsset("DesktopWpf")
+ .WithSource();
+
+ CreateGitFiles(testAsset.Path, "https://github.com/org/repo");
+
+ var buildCommand = new BuildCommand(testAsset, relativePathToProject: "FxWpf")
+ {
+ WorkingDirectory = Path.Combine(testAsset.Path, "FxWpf")
+ };
+
+ buildCommand.Execute().Should().Pass();
+
+ Assert.True(File.Exists(Path.Combine(testAsset.Path, "obj", "net472", "MainWindow.g.cs")));
+ }
}
}
diff --git a/src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs b/test/Microsoft.NET.Build.Tests/WorkloadTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs
rename to test/Microsoft.NET.Build.Tests/WorkloadTests.cs
diff --git a/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs b/test/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs
rename to test/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs
diff --git a/src/Tests/Microsoft.NET.Clean.Tests/Microsoft.NET.Clean.Tests.csproj b/test/Microsoft.NET.Clean.Tests/Microsoft.NET.Clean.Tests.csproj
similarity index 100%
rename from src/Tests/Microsoft.NET.Clean.Tests/Microsoft.NET.Clean.Tests.csproj
rename to test/Microsoft.NET.Clean.Tests/Microsoft.NET.Clean.Tests.csproj
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatThereAreImplicitPackageReferences.cs b/test/Microsoft.NET.Pack.Tests/GivenThatThereAreImplicitPackageReferences.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/GivenThatThereAreImplicitPackageReferences.cs
rename to test/Microsoft.NET.Pack.Tests/GivenThatThereAreImplicitPackageReferences.cs
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs b/test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs
rename to test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACrossTargetedLibrary.cs b/test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACrossTargetedLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACrossTargetedLibrary.cs
rename to test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACrossTargetedLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAHelloWorldProject.cs b/test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAHelloWorldProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAHelloWorldProject.cs
rename to test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAHelloWorldProject.cs
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackANetFrameworkLibrary.cs b/test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackANetFrameworkLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackANetFrameworkLibrary.cs
rename to test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackANetFrameworkLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAProjectTool.cs b/test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAProjectTool.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAProjectTool.cs
rename to test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAProjectTool.cs
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackASimpleLibrary.cs b/test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackASimpleLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackASimpleLibrary.cs
rename to test/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackASimpleLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/Microsoft.NET.Pack.Tests.csproj b/test/Microsoft.NET.Pack.Tests/Microsoft.NET.Pack.Tests.csproj
similarity index 79%
rename from src/Tests/Microsoft.NET.Pack.Tests/Microsoft.NET.Pack.Tests.csproj
rename to test/Microsoft.NET.Pack.Tests/Microsoft.NET.Pack.Tests.csproj
index f8db88b88fc5..34e71c0807ad 100644
--- a/src/Tests/Microsoft.NET.Pack.Tests/Microsoft.NET.Pack.Tests.csproj
+++ b/test/Microsoft.NET.Pack.Tests/Microsoft.NET.Pack.Tests.csproj
@@ -35,8 +35,8 @@
-
-
+
+
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/Properties/launchSettings.json b/test/Microsoft.NET.Pack.Tests/Properties/launchSettings.json
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/Properties/launchSettings.json
rename to test/Microsoft.NET.Pack.Tests/Properties/launchSettings.json
diff --git a/src/Tests/Microsoft.NET.Pack.Tests/SolutionPackTests.cs b/test/Microsoft.NET.Pack.Tests/SolutionPackTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Pack.Tests/SolutionPackTests.cs
rename to test/Microsoft.NET.Pack.Tests/SolutionPackTests.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/FilesCopiedToPublishDirTests.cs b/test/Microsoft.NET.Publish.Tests/FilesCopiedToPublishDirTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/FilesCopiedToPublishDirTests.cs
rename to test/Microsoft.NET.Publish.Tests/FilesCopiedToPublishDirTests.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs b/test/Microsoft.NET.Publish.Tests/GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToCrossPublish.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToCrossPublish.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToCrossPublish.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToCrossPublish.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToExcludeAPackageFromPublish.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToExcludeAPackageFromPublish.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToExcludeAPackageFromPublish.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToExcludeAPackageFromPublish.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToFilterSatelliteAssemblies.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPreserveCompilationContext.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPreserveCompilationContext.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPreserveCompilationContext.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPreserveCompilationContext.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAComServerLibrary.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAComServerLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAComServerLibrary.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAComServerLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliProject.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliProject.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliProject.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAFrameworkDependentApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAFrameworkDependentApp.cs
similarity index 85%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAFrameworkDependentApp.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAFrameworkDependentApp.cs
index f26928bf7ea5..004856be0d76 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAFrameworkDependentApp.cs
+++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAFrameworkDependentApp.cs
@@ -15,12 +15,12 @@ public GivenThatWeWantToPublishAFrameworkDependentApp(ITestOutputHelper log) : b
}
[Theory]
- [InlineData(null, "netcoreapp2.1")]
- [InlineData("true", "netcoreapp2.1")]
- [InlineData("false", "netcoreapp2.1")]
- [InlineData(null, "netcoreapp2.2")]
- [InlineData("true", "netcoreapp2.2")]
- [InlineData("false", "netcoreapp2.2")]
+ [InlineData(null, "net6.0")]
+ [InlineData("true", "net6.0")]
+ [InlineData("false", "net6.0")]
+ [InlineData(null, "net7.0")]
+ [InlineData("true", "net7.0")]
+ [InlineData("false", "net7.0")]
[InlineData(null, ToolsetInfo.CurrentTargetFramework)]
[InlineData("true", ToolsetInfo.CurrentTargetFramework)]
[InlineData("false", ToolsetInfo.CurrentTargetFramework)]
@@ -46,14 +46,6 @@ public void It_publishes_with_or_without_apphost(string useAppHost, string targe
msbuildArgs.Add($"/p:UseAppHost={useAppHost}");
}
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) &&
- targetFramework == "netcoreapp2.1")
- {
- // .NET Core 2.1.0 packages don't support latest versions of OS X, so roll forward to the
- // latest patch which does
- msbuildArgs.Add("/p:TargetLatestRuntimePatch=true");
- }
-
var publishCommand = new PublishCommand(testAsset);
publishCommand
.Execute(msbuildArgs.ToArray())
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs
similarity index 99%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs
index 204eacbd8e89..af114704e410 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs
+++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs
@@ -98,6 +98,7 @@ public void It_collects_Aot_publishing_properties(string targetFramework)
Type loggerType = typeof(LogTelemetryToStdOutForTest);
var TelemetryTestLogger = new[]
{
+ "--property:SelfContained=true",
$"/Logger:{loggerType.FullName},{loggerType.GetTypeInfo().Assembly.Location}"
};
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithAllFeatures.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithAllFeatures.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithAllFeatures.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithAllFeatures.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithDependencies.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithDependencies.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithDependencies.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithDependencies.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASelfContainedApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASelfContainedApp.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASelfContainedApp.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASelfContainedApp.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs
similarity index 97%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs
index 5c29ab485a47..9fc4258999de 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs
+++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs
@@ -150,6 +150,25 @@ public void It_generates_publishing_single_file_with_win7()
.Pass();
}
+ [Fact]
+ public void Target_after_AfterSdkPublish_executes()
+ {
+ var projectChanges = (XDocument doc) =>
+ {
+ var ns = doc.Root.Name.Namespace;
+ var target = new XElement("Target");
+ target.ReplaceAttributes(new XAttribute[] { new XAttribute("Name", "AfterAfterSdkPublish"), new XAttribute("AfterTargets", "AfterSdkPublish") });
+ var message = new XElement("Message");
+ message.ReplaceAttributes(new XAttribute[] { new XAttribute("Importance", "High"), new XAttribute("Text", "Executed AfterAfterSdkPublish") });
+ target.Add(message);
+ doc.Root.Add(target);
+ };
+
+ var publishResults = GetPublishCommand(projectChanges: projectChanges).Execute();
+ publishResults.Should().Pass();
+ publishResults.Should().HaveStdOutContaining("Executed AfterAfterSdkPublish");
+ }
+
[Fact]
public void It_errors_when_publishing_single_file_lib()
{
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileLibrary.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileLibrary.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileLibrary.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileLibrary.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAToolProjectWithPackagedShim.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAToolProjectWithPackagedShim.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAToolProjectWithPackagedShim.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAToolProjectWithPackagedShim.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
similarity index 97%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
index cd7b5be91ef5..d9a9011ff7b7 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
+++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs
@@ -19,7 +19,7 @@ public GivenThatWeWantToPublishAnAotApp(ITestOutputHelper log) : base(log)
{
}
- [RequiresMSBuildVersionTheory("17.8.0",Skip="https://github.com/dotnet/installer/issues/17453")]
+ [RequiresMSBuildVersionTheory("17.8.0")]
[MemberData(nameof(Net7Plus), MemberType = typeof(PublishTestUtils))]
public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string targetFramework)
{
@@ -108,7 +108,7 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_false(string t
}
}
- [RequiresMSBuildVersionTheory("17.0.0.32901",Skip="https://github.com/dotnet/installer/issues/17453")]
+ [RequiresMSBuildVersionTheory("17.0.0.32901")]
[InlineData(ToolsetInfo.CurrentTargetFramework)]
public void NativeAot_app_runs_in_debug_with_no_config_when_PublishAot_is_enabled(string targetFramework)
{
@@ -135,7 +135,7 @@ public void NativeAot_app_runs_in_debug_with_no_config_when_PublishAot_is_enable
var publishCommand = new PublishCommand(testAsset);
publishCommand
- .Execute($"/p:UseCurrentRuntimeIdentifier=true")
+ .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true")
.Should().Pass();
var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework, projectConfiguration);
@@ -161,7 +161,7 @@ public void NativeAot_app_runs_in_debug_with_no_config_when_PublishAot_is_enable
.Execute().Should().Pass();
}
- [RequiresMSBuildVersionTheory("17.0.0.32901",Skip="https://github.com/dotnet/installer/issues/17453")]
+ [RequiresMSBuildVersionTheory("17.0.0.32901")]
[InlineData(ToolsetInfo.CurrentTargetFramework)]
public void NativeAot_app_runs_in_release_with_no_config_when_PublishAot_is_enabled(string targetFramework)
{
@@ -186,7 +186,7 @@ public void NativeAot_app_runs_in_release_with_no_config_when_PublishAot_is_enab
var publishCommand = new PublishCommand(testAsset);
publishCommand
- .Execute($"/p:UseCurrentRuntimeIdentifier=true")
+ .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true")
.Should().Pass();
var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework, projectConfiguration);
@@ -230,7 +230,7 @@ public void NativeAot_app_builds_with_config_when_PublishAot_is_enabled(string t
.WithProjectChanges(project => AddRuntimeConfigOption(project));
var buildCommand = new BuildCommand(testAsset);
- buildCommand.Execute($"/p:UseCurrentRuntimeIdentifier=true")
+ buildCommand.Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true")
.Should().Pass();
var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework);
@@ -276,7 +276,7 @@ public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_enabled(string
var publishCommand = new PublishCommand(testAsset);
publishCommand
- .Execute($"/p:UseCurrentRuntimeIdentifier=true")
+ .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true")
.Should().Pass()
// Having an explicit package reference will generate a warning
.And.HaveStdOutContaining("warning")
@@ -325,7 +325,7 @@ public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_empty(string t
var publishCommand = new PublishCommand(testAsset);
publishCommand
- .Execute($"/p:RuntimeIdentifier={rid}")
+ .Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true")
.Should().Pass();
var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName;
@@ -356,7 +356,7 @@ public void NativeAot_hw_runs_with_cross_target_PublishAot_is_enabled(string tar
var publishCommand = new PublishCommand(testAsset);
publishCommand
- .Execute($"/p:RuntimeIdentifier={rid}")
+ .Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true")
.Should().Pass();
var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName;
var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
@@ -390,7 +390,7 @@ public void NativeAot_hw_runs_with_cross_PackageReference_PublishAot_is_enabled(
var publishCommand = new PublishCommand(testAsset);
publishCommand
- .Execute($"/p:RuntimeIdentifier={rid}")
+ .Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true")
.Should().Pass()
// Having an explicit package reference will generate a warning
.And.HaveStdOutContaining("warning")
@@ -449,7 +449,7 @@ public void NativeAot_hw_fails_with_sdk6_PublishAot_is_enabled()
var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
publishCommand
- .Execute($"/p:UseCurrentRuntimeIdentifier=true")
+ .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true")
.Should().Fail()
.And.HaveStdOutContaining("error NETSDK1207:");
}
@@ -473,7 +473,7 @@ public void NativeAot_hw_fails_with_sdk6_PackageReference_PublishAot_is_enabled(
var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
publishCommand
- .Execute($"/p:UseCurrentRuntimeIdentifier=true")
+ .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true")
.Should().Fail()
.And.HaveStdOutContaining("error NETSDK1207:");
}
@@ -497,7 +497,7 @@ public void NativeAot_hw_fails_with_unsupported_target_rid(string targetFramewor
var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
publishCommand
- .Execute($"/p:RuntimeIdentifier={unsupportedTargetRid}")
+ .Execute($"/p:RuntimeIdentifier={unsupportedTargetRid}", "/p:SelfContained=true")
.Should().Fail()
.And.HaveStdOutContaining("error NETSDK1203:");
}
@@ -520,7 +520,7 @@ public void NativeAot_hw_fails_with_unsupported_host_rid(string targetFramework)
var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
publishCommand
- .Execute($"/p:RuntimeIdentifier={supportedTargetRid}")
+ .Execute($"/p:RuntimeIdentifier={supportedTargetRid}", "/p:SelfContained=true")
.Should().Fail()
.And.HaveStdOutContaining("error NETSDK1204:");
}
@@ -614,7 +614,7 @@ public void PublishAot_fails_for_unsupported_target_framework(string targetFrame
var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework);
var publishCommand = new PublishCommand(testAsset);
- var result = publishCommand.Execute($"/p:RuntimeIdentifier={rid}");
+ var result = publishCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true");
if (shouldFail) {
result.Should().Fail()
.And.HaveStdOutContaining(Strings.AotUnsupportedTargetFramework);
@@ -707,6 +707,7 @@ public void NativeAot_compiler_runs_when_PublishAot_is_enabled(string targetFram
testProject.AdditionalProperties["PublishAot"] = "true";
testProject.AdditionalProperties["SuppressTrimAnalysisWarnings"] = "false";
testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "true";
+ testProject.AdditionalProperties["SelfContained"] = "true";
var testAsset = _testAssetsManager.CreateTestProject(testProject);
var publishCommand = new PublishCommand(testAsset);
@@ -750,6 +751,7 @@ public void Warnings_are_generated_even_with_analyzers_disabled(string targetFra
testProject.AdditionalProperties["EnableSingleFileAnalyzer"] = "false";
testProject.AdditionalProperties["SuppressTrimAnalysisWarnings"] = "false";
testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "true";
+ testProject.AdditionalProperties["SelfContained"] = "true";
var testAsset = _testAssetsManager.CreateTestProject(testProject);
var publishCommand = new PublishCommand(testAsset);
@@ -784,6 +786,7 @@ public void NativeAotStaticLib_only_runs_when_switch_is_enabled(string targetFra
testProject.RecordProperties("NETCoreSdkPortableRuntimeIdentifier");
testProject.AdditionalProperties["PublishAot"] = "true";
testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "true";
+ testProject.AdditionalProperties["SelfContained"] = "true";
testProject.AdditionalProperties["NativeLib"] = "Static";
testProject.SelfContained = "true";
var testAsset = _testAssetsManager.CreateTestProject(testProject);
@@ -922,7 +925,7 @@ private void CheckIlcVersions(TestAsset testAsset, string targetFramework, strin
{
DependsOnTargets = "WriteIlcRspFileForCompilation"
};
- ilcToolsPathCommand.Execute($"/p:RuntimeIdentifier={rid}").Should().Pass();
+ ilcToolsPathCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true").Should().Pass();
var ilcToolsPath = ilcToolsPathCommand.GetValues()[0];
var ilcVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(ilcToolsPath)));
ilcVersion.Should().Be(expectedVersion);
@@ -932,7 +935,7 @@ private void CheckIlcVersions(TestAsset testAsset, string targetFramework, strin
{
DependsOnTargets = "WriteIlcRspFileForCompilation"
};
- ilcReferenceCommand.Execute($"/p:RuntimeIdentifier={rid}").Should().Pass();
+ ilcReferenceCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true").Should().Pass();
var ilcReference = ilcReferenceCommand.GetValues();
var corelibReference = ilcReference.Where(r => Path.GetFileName(r).Equals("System.Private.CoreLib.dll")).Single();
var ilcReferenceVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(corelibReference)));
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAppWithLibrariesAndRid.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAppWithLibrariesAndRid.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAppWithLibrariesAndRid.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAppWithLibrariesAndRid.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnUnpublishableProject.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnUnpublishableProject.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnUnpublishableProject.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnUnpublishableProject.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishIncrementally.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishIncrementally.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishIncrementally.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishIncrementally.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishToClickOnce.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishToClickOnce.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishToClickOnce.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishToClickOnce.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithGeneratePackageOnBuildAndPackAsTool.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithoutConflicts.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithoutConflicts.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithoutConflicts.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishWithoutConflicts.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
similarity index 98%
rename from src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
rename to test/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
index 5d4e2a068532..32254e1e39ae 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
+++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
@@ -75,9 +75,9 @@ public void ItUsesReleaseWithATargetFrameworkOptionNet8ForNet6AndNet7Multitarget
{
var secondProjectTfm = ToolsetInfo.CurrentTargetFramework; // Net8 here is a 'net 8+' project
var expectedConfiguration = Release;
- var expectedTfm = "net8.0";
+ var expectedTfm = "net9.0";
- var (testAsset, testProjects) = Setup(new List { "net6.0", "net7.0", "net8.0" }, new List { secondProjectTfm }, PublishRelease, "", "", identifier: string.Join('-', args));
+ var (testAsset, testProjects) = Setup(new List { "net6.0", "net7.0", "net8.0", "net9.0" }, new List { secondProjectTfm }, PublishRelease, "", "", identifier: string.Join('-', args));
var dotnetCommand = new DotnetCommand(Log, publish);
dotnetCommand
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/Microsoft.NET.Publish.Tests.csproj b/test/Microsoft.NET.Publish.Tests/Microsoft.NET.Publish.Tests.csproj
similarity index 77%
rename from src/Tests/Microsoft.NET.Publish.Tests/Microsoft.NET.Publish.Tests.csproj
rename to test/Microsoft.NET.Publish.Tests/Microsoft.NET.Publish.Tests.csproj
index aa5b02b5f8c2..e772d6881ef4 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/Microsoft.NET.Publish.Tests.csproj
+++ b/test/Microsoft.NET.Publish.Tests/Microsoft.NET.Publish.Tests.csproj
@@ -30,13 +30,13 @@
-
+
-
-
-
+
+
+
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/Properties/launchSettings.json b/test/Microsoft.NET.Publish.Tests/Properties/launchSettings.json
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/Properties/launchSettings.json
rename to test/Microsoft.NET.Publish.Tests/Properties/launchSettings.json
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/PublishDepsFilePathTests.cs b/test/Microsoft.NET.Publish.Tests/PublishDepsFilePathTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/PublishDepsFilePathTests.cs
rename to test/Microsoft.NET.Publish.Tests/PublishDepsFilePathTests.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupOutputsTests.cs b/test/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupOutputsTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupOutputsTests.cs
rename to test/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupOutputsTests.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupTests.cs b/test/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupTests.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupTests.cs
rename to test/Microsoft.NET.Publish.Tests/PublishItemsOutputGroupTests.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/PublishNetFrameworkApp.cs b/test/Microsoft.NET.Publish.Tests/PublishNetFrameworkApp.cs
similarity index 100%
rename from src/Tests/Microsoft.NET.Publish.Tests/PublishNetFrameworkApp.cs
rename to test/Microsoft.NET.Publish.Tests/PublishNetFrameworkApp.cs
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/PublishTestUtils.cs b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
similarity index 86%
rename from src/Tests/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
rename to test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
index 03a43f4099f4..f9bef49d1917 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
+++ b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
@@ -13,8 +13,9 @@ internal static class PublishTestUtils
new object[] { "net5.0" },
new object[] { "net6.0" },
new object[] { "net7.0" },
+ new object[] { "net8.0" },
new object[] { ToolsetInfo.CurrentTargetFramework },
- new object[] { ToolsetInfo.NextTargetFramework },
+ // new object[] { ToolsetInfo.NextTargetFramework },
};
// This list should contain all supported TFMs after net5.0
@@ -23,8 +24,9 @@ internal static class PublishTestUtils
new object[] { "net5.0" },
new object[] { "net6.0" },
new object[] { "net7.0" },
+ new object[] { "net8.0" },
new object[] { ToolsetInfo.CurrentTargetFramework },
- new object[] { ToolsetInfo.NextTargetFramework },
+ // new object[] { ToolsetInfo.NextTargetFramework },
};
// This list should contain all supported TFMs after net6.0
@@ -32,23 +34,26 @@ internal static class PublishTestUtils
{
new object[] { "net6.0" },
new object[] { "net7.0" },
+ new object[] { "net8.0" },
new object[] { ToolsetInfo.CurrentTargetFramework },
- new object[] { ToolsetInfo.NextTargetFramework },
+ // new object[] { ToolsetInfo.NextTargetFramework },
};
// This list should contain all supported TFMs after net7.0
public static IEnumerable