From 914c3e867444ac178bdc4dca78431871bebb415f Mon Sep 17 00:00:00 2001 From: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:20:52 +0200 Subject: [PATCH 01/11] Add branding to v17.9.0 (#9252) --- eng/Versions.props | 4 ++-- global.json | 24 +++++++++---------- src/Build/Microsoft.Build.csproj | 5 ++++ .../Microsoft.Build.Framework.csproj | 5 ++++ src/Tasks/Microsoft.Build.Tasks.csproj | 5 ++++ .../Microsoft.Build.Utilities.csproj | 5 ++++ 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 56574443865..f1166235466 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,8 +2,8 @@ - 17.8.0 - 17.7.0 + 17.9.0 + 17.8.0-preview-23471-08 15.1.0.0 preview true diff --git a/global.json b/global.json index d9967b3a53d..7a0263bee6b 100644 --- a/global.json +++ b/global.json @@ -1,15 +1,15 @@ { - "sdk": { - "allowPrerelease": true - }, - "tools": { - "dotnet": "8.0.100-preview.7.23376.3", - "vs": { - "version": "17.6.0" + "sdk": { + "allowPrerelease": true }, - "xcopy-msbuild": "17.6.0-2" - }, - "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23425.2" - } + "tools": { + "dotnet": "8.0.100-preview.7.23376.3", + "vs": { + "version": "17.6.0" + }, + "xcopy-msbuild": "17.6.0-2" + }, + "msbuild-sdks": { + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23425.2" + } } diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj index 9a5b1175b0e..db15f2e0ced 100644 --- a/src/Build/Microsoft.Build.csproj +++ b/src/Build/Microsoft.Build.csproj @@ -26,6 +26,11 @@ $(NoWarn);NU5104 + + true + true + + diff --git a/src/Framework/Microsoft.Build.Framework.csproj b/src/Framework/Microsoft.Build.Framework.csproj index c0da0474e6c..1c044599152 100644 --- a/src/Framework/Microsoft.Build.Framework.csproj +++ b/src/Framework/Microsoft.Build.Framework.csproj @@ -27,6 +27,11 @@ + + true + true + + Shared\Constants.cs diff --git a/src/Tasks/Microsoft.Build.Tasks.csproj b/src/Tasks/Microsoft.Build.Tasks.csproj index e11a7698f31..c2f5e698f87 100644 --- a/src/Tasks/Microsoft.Build.Tasks.csproj +++ b/src/Tasks/Microsoft.Build.Tasks.csproj @@ -19,6 +19,11 @@ true + + true + true + + Resx diff --git a/src/Utilities/Microsoft.Build.Utilities.csproj b/src/Utilities/Microsoft.Build.Utilities.csproj index 5b9a22eba36..af17ff082a7 100644 --- a/src/Utilities/Microsoft.Build.Utilities.csproj +++ b/src/Utilities/Microsoft.Build.Utilities.csproj @@ -18,6 +18,11 @@ true + + true + true + + From c9f3f0ddc2423ccbdc0d91cce1108e6c72506d74 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Tue, 26 Sep 2023 08:09:38 -0500 Subject: [PATCH 02/11] Update to RC1 (#9249) * Update to RC1 * Copy RID graph to bootstrap This enables UseRidGraph=true builds, like many of our projects. --- eng/BootStrapMSBuild.targets | 3 +++ global.json | 26 +++++++++---------- src/Build/CompatibilitySuppressions.xml | 5 ---- src/Build/Microsoft.Build.csproj | 5 ---- src/Framework/CompatibilitySuppressions.xml | 5 ---- .../Microsoft.Build.Framework.csproj | 5 ---- src/Tasks/CompatibilitySuppressions.xml | 14 ---------- src/Tasks/Microsoft.Build.Tasks.csproj | 5 ---- src/Utilities/CompatibilitySuppressions.xml | 13 ---------- .../Microsoft.Build.Utilities.csproj | 5 ---- 10 files changed, 16 insertions(+), 70 deletions(-) diff --git a/eng/BootStrapMSBuild.targets b/eng/BootStrapMSBuild.targets index 02e1e308112..e6fee0282f8 100644 --- a/eng/BootStrapMSBuild.targets +++ b/eng/BootStrapMSBuild.targets @@ -229,6 +229,9 @@ + + diff --git a/global.json b/global.json index 7a0263bee6b..4ec376b78fd 100644 --- a/global.json +++ b/global.json @@ -1,15 +1,15 @@ { - "sdk": { - "allowPrerelease": true + "sdk": { + "allowPrerelease": true + }, + "tools": { + "dotnet": "8.0.100-rc.1.23463.5", + "vs": { + "version": "17.7.0" }, - "tools": { - "dotnet": "8.0.100-preview.7.23376.3", - "vs": { - "version": "17.6.0" - }, - "xcopy-msbuild": "17.6.0-2" - }, - "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23425.2" - } -} + "xcopy-msbuild": "17.7.2" + }, + "msbuild-sdks": { + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23425.2" + } +} \ No newline at end of file diff --git a/src/Build/CompatibilitySuppressions.xml b/src/Build/CompatibilitySuppressions.xml index e979313ca70..05317adadab 100644 --- a/src/Build/CompatibilitySuppressions.xml +++ b/src/Build/CompatibilitySuppressions.xml @@ -1,9 +1,4 @@  - - - PKV006 - net7.0 - diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj index db15f2e0ced..9a5b1175b0e 100644 --- a/src/Build/Microsoft.Build.csproj +++ b/src/Build/Microsoft.Build.csproj @@ -26,11 +26,6 @@ $(NoWarn);NU5104 - - true - true - - diff --git a/src/Framework/CompatibilitySuppressions.xml b/src/Framework/CompatibilitySuppressions.xml index 1c5e56d19a3..2545a39b99a 100644 --- a/src/Framework/CompatibilitySuppressions.xml +++ b/src/Framework/CompatibilitySuppressions.xml @@ -54,9 +54,4 @@ PKV004 Xamarin.XboxOne,Version=v0.0 - - - PKV006 - net7.0 - diff --git a/src/Framework/Microsoft.Build.Framework.csproj b/src/Framework/Microsoft.Build.Framework.csproj index 1c044599152..c0da0474e6c 100644 --- a/src/Framework/Microsoft.Build.Framework.csproj +++ b/src/Framework/Microsoft.Build.Framework.csproj @@ -27,11 +27,6 @@ - - true - true - - Shared\Constants.cs diff --git a/src/Tasks/CompatibilitySuppressions.xml b/src/Tasks/CompatibilitySuppressions.xml index 498513b70bc..f89f776d767 100644 --- a/src/Tasks/CompatibilitySuppressions.xml +++ b/src/Tasks/CompatibilitySuppressions.xml @@ -12,15 +12,6 @@ ref/net472/Microsoft.Build.Tasks.Core.dll - - - CP1002 - System.Security.Cryptography, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ref/net7.0/Microsoft.Build.Tasks.Core.dll - ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll - true - - - - PKV006 - net7.0 - diff --git a/src/Tasks/Microsoft.Build.Tasks.csproj b/src/Tasks/Microsoft.Build.Tasks.csproj index c2f5e698f87..e11a7698f31 100644 --- a/src/Tasks/Microsoft.Build.Tasks.csproj +++ b/src/Tasks/Microsoft.Build.Tasks.csproj @@ -19,11 +19,6 @@ true - - true - true - - Resx diff --git a/src/Utilities/CompatibilitySuppressions.xml b/src/Utilities/CompatibilitySuppressions.xml index bb15e1e6c3e..2545a39b99a 100644 --- a/src/Utilities/CompatibilitySuppressions.xml +++ b/src/Utilities/CompatibilitySuppressions.xml @@ -1,14 +1,6 @@  - - - CP1002 - System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ref/net7.0/Microsoft.Build.Utilities.Core.dll - ref/netstandard2.0/Microsoft.Build.Utilities.Core.dll - true - - - PKV006 - net7.0 - diff --git a/src/Utilities/Microsoft.Build.Utilities.csproj b/src/Utilities/Microsoft.Build.Utilities.csproj index af17ff082a7..5b9a22eba36 100644 --- a/src/Utilities/Microsoft.Build.Utilities.csproj +++ b/src/Utilities/Microsoft.Build.Utilities.csproj @@ -18,11 +18,6 @@ true - - true - true - - From ae132d6c83950959686fc9930c9ea48d55c98d51 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:21:26 +0200 Subject: [PATCH 03/11] [main] Update dependencies from dotnet/roslyn nuget/nuget.client (#9264) * Update dependencies from https://github.com/dotnet/roslyn build 20230924.3 Microsoft.Net.Compilers.Toolset From Version 4.8.0-3.23465.5 -> To Version 4.8.0-3.23474.3 * Update dependencies from https://github.com/nuget/nuget.client build 6.8.0.117 NuGet.Build.Tasks From Version 6.8.0-rc.112 -> To Version 6.8.0-rc.117 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8bc30740f26..ef33e6ebb23 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -68,13 +68,13 @@ ed9a83526483c094fb51e7000b6f816ce6cb0325 - + https://github.com/nuget/nuget.client - f47eb5771ee3f9a100d0b31d82ccb5ee600a56ed + 7fb5ed887352d2892797a365cfdd7bb8df029941 - + https://github.com/dotnet/roslyn - dc3d0694a4b31b8e27038431888cd4e8dd5b6cb6 + 2fe37da588ea81d852d3a42e290f8da4d610882f diff --git a/eng/Versions.props b/eng/Versions.props index f1166235466..91dee9bdc4a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,8 +50,8 @@ 8.0.0-beta.23425.2 7.0.0 6.0.0 - 4.8.0-3.23465.5 - 6.8.0-rc.112 + 4.8.0-3.23474.3 + 6.8.0-rc.117 6.0.0 7.0.3 7.0.0 From 007f0a6fe46f6d71a9aa61663aeaf747db3bdfcb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:25:54 +0200 Subject: [PATCH 04/11] [main] Update dependencies from dotnet/arcade (#9206) --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 2 +- eng/common/cross/toolchain.cmake | 2 +- global.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ef33e6ebb23..65771dabbfa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -58,14 +58,14 @@ - + https://github.com/dotnet/arcade - 90c167d5c57de4a8bced566379dbd893556c94e8 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/xliff-tasks - ed9a83526483c094fb51e7000b6f816ce6cb0325 + 194f32828726c3f1f63f79f3dc09b9e99c157b11 @@ -77,9 +77,9 @@ 2fe37da588ea81d852d3a42e290f8da4d610882f - + https://github.com/dotnet/arcade - 90c167d5c57de4a8bced566379dbd893556c94e8 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff diff --git a/eng/Versions.props b/eng/Versions.props index 91dee9bdc4a..c8715dc2a0f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -47,7 +47,7 @@ Otherwise, this version of dotnet will not be installed and the build will error out. --> $([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\global.json')), '"dotnet": "([^"]*)"').Groups.get_Item(1)) 4.2.0-1.22102.8 - 8.0.0-beta.23425.2 + 8.0.0-beta.23463.1 7.0.0 6.0.0 4.8.0-3.23474.3 diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index a88d643c8a7..0998e875e5f 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -207,6 +207,7 @@ elseif(ILLUMOS) set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") elseif(HAIKU) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin") set(TOOLSET_PREFIX ${TOOLCHAIN}-) function(locate_toolchain_exec exec var) @@ -217,7 +218,6 @@ elseif(HAIKU) endif() find_program(EXEC_LOCATION_${exec} - PATHS "${CROSS_ROOTFS}/cross-tools-x86_64/bin" NAMES "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" "${TOOLSET_PREFIX}${exec}") diff --git a/global.json b/global.json index 4ec376b78fd..2b69538de3a 100644 --- a/global.json +++ b/global.json @@ -10,6 +10,6 @@ "xcopy-msbuild": "17.7.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23425.2" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23463.1" } } \ No newline at end of file From c23ef12f15e4edbddf37d2a9fd98bdf3ee430739 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:26:15 +0200 Subject: [PATCH 05/11] [main] Update dependencies from dotnet/source-build-reference-packages (#9202) --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 65771dabbfa..3c31d52a34c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/source-build-reference-packages - 26ce96327dd346534926c4551f8b8d62a6fc724f + 0650b50b2a5263c735d12b5c36c5deb34e7e6b60 From 325f97f630b060ec0b23371e4035fa5a5a979e0b Mon Sep 17 00:00:00 2001 From: AR-May <67507805+AR-May@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:27:01 +0200 Subject: [PATCH 06/11] Create pipeline for exp insertions (#9231) * update deloyment script * Address PR comments --- .exp-insertions.yml | 127 +++++++++++++++++++++++++++++++++++++ scripts/Deploy-MSBuild.ps1 | 26 ++++++-- 2 files changed, 146 insertions(+), 7 deletions(-) create mode 100644 .exp-insertions.yml diff --git a/.exp-insertions.yml b/.exp-insertions.yml new file mode 100644 index 00000000000..e3e22653a53 --- /dev/null +++ b/.exp-insertions.yml @@ -0,0 +1,127 @@ +# Pipeline creates a dotnet with experimental msbuild dlls. + +trigger: none # Prevents this pipeline from triggering on check-ins +pr: none # don't run this on PR as well + +parameters: + # Dotnet installer channel from where to take the latest dotnet bits. + - name: DotnetInstallerChannel + displayName: Dotnet installer channel + type: string + # Branch from the MSBuild Build CI pipeline. Default: main + # Top run for the branch would be used to create an experimental insertion. + - name: MSBuildBranch + displayName: MSBuild Branch + type: string + default: 'refs/heads/main' + # BuildID from the MSBuild Build CI pipeline. Overrides the choice of MSBuildBranch parameter + - name: MSBuildBuildID + displayName: MSBuild CI Run Override + type: string + default: 'default' + +variables: + - name: _MsBuildCiPipelineId + value: 9434 + +pool: + vmImage: windows-latest + +steps: +- powershell: | + mkdir '$(System.ArtifactsDirectory)/installer' + + $dotnetChannel = '${{parameters.DotnetInstallerChannel}}' + $sdks = "dotnet-sdk-win-x64.zip", "dotnet-sdk-linux-x64.tar.gz" + + foreach ($sdk in $sdks) + { + Write-Host "Downloading dotnet $sdk from channel $dotnetChannel" + Invoke-WebRequest ` + -Uri "https://aka.ms/dotnet/$dotnetChannel/daily/$sdk" ` + -OutFile "$(System.ArtifactsDirectory)/installer/$sdk" + } + mkdir '$(Pipeline.Workspace)/artifacts' + + displayName: Download latest dotnet sdks + +# Download latest build artifacts for a branch from MSBuild Build CI +- ${{ if eq(parameters.MSBuildBuildID, 'default') }}: + - task: DownloadBuildArtifacts@1 + inputs: + buildType: specific + project: DevDiv + pipeline: $(_MsBuildCiPipelineId) + buildVersionToDownload: latestFromBranch + branchName: '${{parameters.MSBuildBranch}}' + artifactName: bin + downloadPath: '$(System.ArtifactsDirectory)/msbuild/artifacts/bin' + itemPattern: "MSBuild.Bootstrap/**" + displayName: Download latest msbuild from branch + +# Download build artifacts for MSBuild Build CI specific build +- ${{ if ne(parameters.MSBuildBuildID, 'default') }}: + - task: DownloadBuildArtifacts@1 + inputs: + buildType: specific + project: DevDiv + pipeline: $(_MsBuildCiPipelineId) + buildVersionToDownload: specific + buildId: ${{parameters.MSBuildBuildID}} + artifactName: bin + downloadPath: '$(System.ArtifactsDirectory)/msbuild/artifacts/bin' + itemPattern: "MSBuild.Bootstrap/**" + displayName: Download specified msbuild build + +- powershell: | + $sdk = "dotnet-sdk-win-x64" + + Write-Host "Extracting $(System.ArtifactsDirectory)/installer/$sdk.zip" + Expand-Archive "$(System.ArtifactsDirectory)/installer/$sdk.zip" -DestinationPath "$(Pipeline.Workspace)/exp-dotnet/$sdk" + + $dotnetDirectory = Get-ChildItem -Directory -Path "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk" + $dotnetVersion = $dotnetDirectory.Name + Write-Host "Detected dotnet version: $dotnetVersion" + + Write-Host "Updating MSBuild dlls." + $(Build.SourcesDirectory)/scripts/Deploy-MSBuild.ps1 ` + -destination "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk/$dotnetVersion" ` + -bootstrapDirectory "$(System.ArtifactsDirectory)/msbuild/artifacts/bin/MSBuild.Bootstrap" ` + -configuration Release ` + -makeBackup $false + + Write-Host "Compressing dotnet sdk files" + Get-ChildItem -Path "$(Pipeline.Workspace)/exp-dotnet/$sdk" | Compress-Archive -DestinationPath "$(Pipeline.Workspace)/artifacts/$sdk.zip" + + displayName: Dogfood msbuild dlls to dotnet sdk win-x64 + +- powershell: | + $sdk = "dotnet-sdk-linux-x64" + + mkdir "$(Pipeline.Workspace)/exp-dotnet/$sdk" + + Write-Host "Extracting $(System.ArtifactsDirectory)/installer/$sdk.tar.gz" + tar -xzvf "$(System.ArtifactsDirectory)/installer/$sdk.tar.gz" -C "$(Pipeline.Workspace)/exp-dotnet/$sdk" + + $dotnetDirectory = Get-ChildItem -Directory -Path $(Pipeline.Workspace)/exp-dotnet/$sdk/sdk + $dotnetVersion = $dotnetDirectory.Name + Write-Host "Detected dotnet version: $dotnetVersion" + + Write-Host "Updating MSBuild dlls." + $(Build.SourcesDirectory)/scripts/Deploy-MSBuild.ps1 ` + -destination "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk/$dotnetVersion" ` + -bootstrapDirectory "$(System.ArtifactsDirectory)/msbuild/artifacts/bin/MSBuild.Bootstrap" ` + -configuration Release ` + -makeBackup $false + + Write-Host "Compressing dotnet sdk files" + tar -czvf "$(Pipeline.Workspace)/artifacts/$sdk.tar.gz" -C "$(Pipeline.Workspace)/exp-dotnet/$sdk" . + displayName: Dogfood msbuild dlls to dotnet sdk linux-x64 + +- task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Pipeline.Workspace)/artifacts' + artifactName: ExperimentalDotnet + parallel: true + condition: always() + displayName: Publish crank assests artifacts diff --git a/scripts/Deploy-MSBuild.ps1 b/scripts/Deploy-MSBuild.ps1 index 37b65ce9199..58966a34fdf 100644 --- a/scripts/Deploy-MSBuild.ps1 +++ b/scripts/Deploy-MSBuild.ps1 @@ -5,7 +5,9 @@ Param( [ValidateSet('Debug','Release')] [string] $configuration = "Debug", [ValidateSet('Core','Desktop', 'Detect', 'Full')] - [string] $runtime = "Detect" + [string] $runtime = "Detect", + [string] $bootstrapDirectory = "", + [bool] $makeBackup = $true ) Set-StrictMode -Version "Latest" @@ -15,9 +17,9 @@ function Copy-WithBackup ($origin, $destinationSubFolder = "") { $directoryPart = [IO.Path]::Combine($destination, $destinationSubFolder, $origin.IntermediaryDirectories) $destinationPath = Join-Path -Path $directoryPart (Split-Path $origin.SourceFile -leaf) - $backupInto = [IO.Path]::Combine($BackupFolder, $destinationSubFolder) + if (($makeBackup) -and (Test-Path $destinationPath -PathType Leaf)) { + $backupInto = [IO.Path]::Combine($BackupFolder, $destinationSubFolder) - if (Test-Path $destinationPath -PathType Leaf) { # Back up previous copy of the file if (!(Test-Path $backupInto)) { [system.io.directory]::CreateDirectory($backupInto) @@ -45,10 +47,15 @@ function FileToCopy([string] $sourceFileRelativeToRepoRoot, [string] $intermedia # TODO: find most-recently-built MSBuild and make it default $configuration -$BackupFolder = New-Item (Join-Path $destination -ChildPath "Backup-$(Get-Date -Format FileDateTime)") -itemType directory -ErrorAction Stop - Write-Verbose "Copying $configuration MSBuild to $destination" -Write-Host "Existing MSBuild assemblies backed up to $BackupFolder" + +if ($makeBackup) { + $BackupFolder = New-Item (Join-Path $destination -ChildPath "Backup-$(Get-Date -Format FileDateTime)") -itemType directory -ErrorAction Stop + Write-Host "Existing MSBuild assemblies backed up to $BackupFolder" +} +else { + Write-Host "Existing MSBuild assemblies won't be backed up" +} if ($runtime -eq "Detect") { if ($destination -like "*dotnet*sdk*") { @@ -72,7 +79,12 @@ if ($runtime -eq "Desktop") { $targetFramework = "net8.0" } -$bootstrapBinDirectory = "artifacts\bin\MSBuild.Bootstrap\$configuration\$targetFramework" +# If bootstrap directory is not defined in parameters, use the default location +if ($bootstrapDirectory -eq "") { + $bootstrapDirectory = "artifacts\bin\MSBuild.Bootstrap" +} + +$bootstrapBinDirectory = "$bootstrapDirectory\$configuration\$targetFramework" $filesToCopyToBin = @( FileToCopy "$bootstrapBinDirectory\Microsoft.Build.dll" From e881d3427eb803784339baff2c862612d4e2ba21 Mon Sep 17 00:00:00 2001 From: Gang Wang Date: Tue, 26 Sep 2023 21:28:44 +0800 Subject: [PATCH 07/11] Enable SDL (PoliCheck, Credscan) in official builds (#9239) * Enable SDL (PoliCheck, Credscan) in official builds * Add policheck exclusions --- .vsts-dotnet.yml | 16 ++++++++++++++++ eng/policheck_exclusions.xml | 13 +++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 eng/policheck_exclusions.xml diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index 343cec26283..18e9d39f8f5 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -40,6 +40,8 @@ variables: value: true - name: Codeql.Enabled value: true + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - group: DotNet-MSBuild-SDLValidation-Params stages: - stage: build @@ -294,3 +296,17 @@ stages: enableSymbolValidation: false enableSourceLinkValidation: false enableNugetValidation: false + SDLValidationParameters: + enable: true + continueOnError: false + params: ' -SourceToolsList @("policheck","credscan") + -TsaInstanceURL "$(_TsaInstanceURL)" + -TsaProjectName "$(_TsaProjectName)" + -TsaNotificationEmail "$(_TsaNotificationEmail)" + -TsaCodebaseAdmin "$(_TsaCodebaseAdmin)" + -TsaBugAreaPath "$(_TsaBugAreaPath)" + -TsaIterationPath "$(_TsaIterationPath)" + -TsaRepositoryName "dotnet-msbuild" + -TsaCodebaseName "dotnet-msbuild" + -TsaPublish $True + -PoliCheckAdditionalRunConfigParams @("UserExclusionPath < $(Build.SourcesDirectory)\eng\policheck_exclusions.xml")' diff --git a/eng/policheck_exclusions.xml b/eng/policheck_exclusions.xml new file mode 100644 index 00000000000..c5ed5390edf --- /dev/null +++ b/eng/policheck_exclusions.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + .DOTNET + \ No newline at end of file From 0bc63232987f0ec93e275104f3ba015ddc609af9 Mon Sep 17 00:00:00 2001 From: Ladi Prosek Date: Tue, 26 Sep 2023 16:23:35 +0200 Subject: [PATCH 08/11] Cleanup: Delete Pair of TKey, TValue (#9265) --- src/Build/Definition/ProjectItem.cs | 4 +- src/Build/Evaluation/Evaluator.cs | 6 +- src/Build/Evaluation/Expander.cs | 153 +++++++++--------- src/Build/Evaluation/IItemFactory.cs | 2 +- .../LazyItemEvaluator.ItemFactoryWrapper.cs | 2 +- .../LazyItemEvaluator.LazyItemOperation.cs | 4 +- src/Build/Instance/ProjectItemInstance.cs | 4 +- src/Build/Logging/ProfilerLogger.cs | 4 +- src/Build/Microsoft.Build.csproj | 3 - src/Shared/Pair.cs | 60 ------- src/Shared/Tracing.cs | 1 - 11 files changed, 87 insertions(+), 156 deletions(-) delete mode 100644 src/Shared/Pair.cs diff --git a/src/Build/Definition/ProjectItem.cs b/src/Build/Definition/ProjectItem.cs index 645f8810cc0..cfc17374cb3 100644 --- a/src/Build/Definition/ProjectItem.cs +++ b/src/Build/Definition/ProjectItem.cs @@ -1020,11 +1020,11 @@ public ProjectItem CreateItem(string evaluatedIncludeEscaped, string evaluatedIn /// /// Applies the supplied metadata to the destination item. /// - public void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems) + public void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems) { foreach (IItem item in destinationItems) { - foreach (Pair metadatum in metadata) + foreach (KeyValuePair metadatum in metadata) { item.SetMetadata(metadatum.Key, metadatum.Value); } diff --git a/src/Build/Evaluation/Evaluator.cs b/src/Build/Evaluation/Evaluator.cs index f5db7b9d74a..9f298203fa4 100644 --- a/src/Build/Evaluation/Evaluator.cs +++ b/src/Build/Evaluation/Evaluator.cs @@ -92,7 +92,7 @@ internal class Evaluator /// Key is the directory of the file importing the usingTask, which is needed /// to handle any relative paths in the usingTask. /// - private readonly List> _usingTaskElements; + private readonly List> _usingTaskElements; /// /// List of ProjectTargetElement's traversing into imports. @@ -249,7 +249,7 @@ private Evaluator( _data = data; _itemGroupElements = new List(); _itemDefinitionGroupElements = new List(); - _usingTaskElements = new List>(); + _usingTaskElements = new List>(); _targetElements = new List(); _importsSeen = new Dictionary(StringComparer.OrdinalIgnoreCase); _initialTargetsList = new List(); @@ -913,7 +913,7 @@ private void PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) EvaluateImportGroupElement(currentProjectOrImport.DirectoryPath, importGroup); break; case ProjectUsingTaskElement usingTask: - _usingTaskElements.Add(new Pair(currentProjectOrImport.DirectoryPath, usingTask)); + _usingTaskElements.Add(new KeyValuePair(currentProjectOrImport.DirectoryPath, usingTask)); break; case ProjectChooseElement choose: EvaluateChooseElement(choose); diff --git a/src/Build/Evaluation/Expander.cs b/src/Build/Evaluation/Expander.cs index fbfd660d303..c998910190e 100644 --- a/src/Build/Evaluation/Expander.cs +++ b/src/Build/Evaluation/Expander.cs @@ -616,7 +616,7 @@ internal bool ExpandExpressionCapture( ExpanderOptions options, bool includeNullEntries, out bool isTransformExpression, - out List> itemsFromCapture) + out List> itemsFromCapture) { return ItemExpander.ExpandExpressionCapture(this, expressionCapture, _items, elementLocation, options, includeNullEntries, out isTransformExpression, out itemsFromCapture); } @@ -1742,7 +1742,7 @@ private static class ItemExpander /// Execute the list of transform functions. /// /// class, IItem. - internal static IEnumerable> Transform(Expander expander, bool includeNullEntries, Stack> transformFunctionStack, IEnumerable> itemsOfType) + internal static IEnumerable> Transform(Expander expander, bool includeNullEntries, Stack> transformFunctionStack, IEnumerable> itemsOfType) where S : class, IItem { // If we have transforms on our stack, then we'll execute those first @@ -1751,7 +1751,7 @@ internal static IEnumerable> Transform(Expander expande { TransformFunction function = transformFunctionStack.Pop(); - foreach (Pair item in Transform(expander, includeNullEntries, transformFunctionStack, function.Execute(expander, includeNullEntries, itemsOfType))) + foreach (KeyValuePair item in Transform(expander, includeNullEntries, transformFunctionStack, function.Execute(expander, includeNullEntries, itemsOfType))) { yield return item; } @@ -1760,7 +1760,7 @@ internal static IEnumerable> Transform(Expander expande { // When we have no more tranforms on the stack, iterate over the items // that we have to return them - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { yield return item; } @@ -1893,7 +1893,7 @@ internal static IList ExpandExpressionCaptureIntoItems( return result; } - List> itemsFromCapture; + List> itemsFromCapture; brokeEarlyNonEmpty = ExpandExpressionCapture(expander, expressionCapture, items, elementLocation /* including null items */, options, true, out isTransformExpression, out itemsFromCapture); if (brokeEarlyNonEmpty) @@ -1959,7 +1959,7 @@ internal static bool ExpandExpressionCapture( ExpanderOptions options, bool includeNullEntries, out bool isTransformExpression, - out List> itemsFromCapture) + out List> itemsFromCapture) where S : class, IItem { ErrorUtilities.VerifyThrow(evaluatedItems != null, "Cannot expand items without providing items"); @@ -1980,7 +1980,7 @@ internal static bool ExpandExpressionCapture( if (!ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_6) || expressionCapture.Captures?.Any(capture => string.Equals(capture.FunctionName, "AnyHaveMetadataValue", StringComparison.OrdinalIgnoreCase)) != true) { - itemsFromCapture = new List>(); + itemsFromCapture = new List>(); return false; } } @@ -1991,7 +1991,7 @@ internal static bool ExpandExpressionCapture( isTransformExpression = true; } - itemsFromCapture = new List>(itemsOfType.Count); + itemsFromCapture = new List>(itemsOfType.Count); if (!isTransformExpression) { @@ -2003,7 +2003,7 @@ internal static bool ExpandExpressionCapture( return true; } - itemsFromCapture.Add(new Pair(item.EvaluatedIncludeEscaped, item)); + itemsFromCapture.Add(new KeyValuePair(item.EvaluatedIncludeEscaped, item)); } } else @@ -2011,7 +2011,7 @@ internal static bool ExpandExpressionCapture( Stack> transformFunctionStack = PrepareTransformStackFromMatch(elementLocation, expressionCapture); // iterate over the tranform chain, creating the final items from its results - foreach (Pair itemTuple in Transform(expander, includeNullEntries, transformFunctionStack, IntrinsicItemFunctions.GetItemPairEnumerable(itemsOfType))) + foreach (KeyValuePair itemTuple in Transform(expander, includeNullEntries, transformFunctionStack, IntrinsicItemFunctions.GetItemPairEnumerable(itemsOfType))) { if (!string.IsNullOrEmpty(itemTuple.Key) && (options & ExpanderOptions.BreakOnNotEmpty) != 0) { @@ -2026,7 +2026,7 @@ internal static bool ExpandExpressionCapture( { var joinedItems = string.Join(expressionCapture.Separator, itemsFromCapture.Select(i => i.Key)); itemsFromCapture.Clear(); - itemsFromCapture.Add(new Pair(joinedItems, null)); + itemsFromCapture.Add(new KeyValuePair(joinedItems, null)); } return false; // did not break early @@ -2144,7 +2144,7 @@ private static bool ExpandExpressionCaptureIntoStringBuilder( ExpanderOptions options) where S : class, IItem { - List> itemsFromCapture; + List> itemsFromCapture; bool throwaway; var brokeEarlyNonEmpty = ExpandExpressionCapture(expander, capture, evaluatedItems, elementLocation /* including null items */, options, true, out throwaway, out itemsFromCapture); @@ -2205,7 +2205,7 @@ internal static class IntrinsicItemFunctions /// Delegate that represents the signature of all item transformation functions /// This is used to support calling the functions by name. /// - public delegate IEnumerable> ItemTransformFunction(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments); + public delegate IEnumerable> ItemTransformFunction(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments); /// /// Get a delegate to the given item transformation function by supplying the name and the @@ -2268,7 +2268,7 @@ internal static ItemTransformFunction GetItemTransformFunction(IElementLocation /// Create an enumerator from a base IEnumerable of items into an enumerable /// of transformation result which includes the new itemspec and the base item. /// - internal static IEnumerable> GetItemPairEnumerable(IEnumerable itemsOfType) + internal static IEnumerable> GetItemPairEnumerable(IEnumerable itemsOfType) { // iterate over the items, and yield out items in the tuple format foreach (var item in itemsOfType) @@ -2281,12 +2281,12 @@ internal static IEnumerable> GetItemPairEnumerable(IEnumerable(resultantItem, item); + yield return new KeyValuePair(resultantItem, item); } } else { - yield return new Pair(item.EvaluatedIncludeEscaped, item); + yield return new KeyValuePair(item.EvaluatedIncludeEscaped, item); } } } @@ -2294,20 +2294,20 @@ internal static IEnumerable> GetItemPairEnumerable(IEnumerable /// Intrinsic function that returns the number of items in the list. /// - internal static IEnumerable> Count(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> Count(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { - yield return new Pair(Convert.ToString(itemsOfType.Count(), CultureInfo.InvariantCulture), null /* no base item */); + yield return new KeyValuePair(Convert.ToString(itemsOfType.Count(), CultureInfo.InvariantCulture), null /* no base item */); } /// /// Intrinsic function that returns the specified built-in modifer value of the items in itemsOfType /// Tuple is {current item include, item under transformation}. /// - internal static IEnumerable> ItemSpecModifierFunction(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> ItemSpecModifierFunction(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments == null || arguments.Length == 0, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { // If the item include has become empty, // this is the end of the pipeline for this item @@ -2339,11 +2339,11 @@ internal static IEnumerable> ItemSpecModifierFunction(Expander

(result, item.Value); + yield return new KeyValuePair(result, item.Value); } else if (includeNullEntries) { - yield return new Pair(null, item.Value); + yield return new KeyValuePair(null, item.Value); } } } @@ -2351,11 +2351,11 @@ internal static IEnumerable> ItemSpecModifierFunction(Expander

/// Intrinsic function that returns the subset of items that actually exist on disk. /// - internal static IEnumerable> Exists(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> Exists(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments == null || arguments.Length == 0, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { if (String.IsNullOrEmpty(item.Key)) { @@ -2398,13 +2398,13 @@ internal static IEnumerable> Exists(Expander expander, IEl ///

/// Intrinsic function that combines the existing paths of the input items with a given relative path. /// - internal static IEnumerable> Combine(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> Combine(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments?.Length == 1, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); string relativePath = arguments[0]; - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { if (String.IsNullOrEmpty(item.Key)) { @@ -2415,14 +2415,14 @@ internal static IEnumerable> Combine(Expander expander, IE string unescapedPath = EscapingUtilities.UnescapeAll(item.Key); string combinedPath = Path.Combine(unescapedPath, relativePath); string escapedPath = EscapingUtilities.Escape(combinedPath); - yield return new Pair(escapedPath, null); + yield return new KeyValuePair(escapedPath, null); } } /// /// Intrinsic function that returns all ancestor directories of the given items. /// - internal static IEnumerable> GetPathsOfAllDirectoriesAbove(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> GetPathsOfAllDirectoriesAbove(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments == null || arguments.Length == 0, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); @@ -2430,7 +2430,7 @@ internal static IEnumerable> GetPathsOfAllDirectoriesAbove(Expan SortedSet directories = new SortedSet(StringComparer.OrdinalIgnoreCase); - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { if (String.IsNullOrEmpty(item.Key)) { @@ -2490,7 +2490,7 @@ internal static IEnumerable> GetPathsOfAllDirectoriesAbove(Expan foreach (string directoryPath in directories) { string escapedDirectoryPath = EscapingUtilities.Escape(directoryPath); - yield return new Pair(escapedDirectoryPath, null); + yield return new KeyValuePair(escapedDirectoryPath, null); } } @@ -2498,13 +2498,13 @@ internal static IEnumerable> GetPathsOfAllDirectoriesAbove(Expan /// Intrinsic function that returns the DirectoryName of the items in itemsOfType /// UNDONE: This can be removed in favor of a built-in %(DirectoryName) metadata in future. /// - internal static IEnumerable> DirectoryName(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> DirectoryName(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments == null || arguments.Length == 0, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); Dictionary directoryNameTable = new Dictionary(StringComparer.OrdinalIgnoreCase); - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { // If the item include has become empty, // this is the end of the pipeline for this item @@ -2553,11 +2553,11 @@ internal static IEnumerable> DirectoryName(Expander expand if (!String.IsNullOrEmpty(directoryName)) { // return a result through the enumerator - yield return new Pair(directoryName, item.Value); + yield return new KeyValuePair(directoryName, item.Value); } else if (includeNullEntries) { - yield return new Pair(null, item.Value); + yield return new KeyValuePair(null, item.Value); } } } @@ -2565,13 +2565,13 @@ internal static IEnumerable> DirectoryName(Expander expand /// /// Intrinsic function that returns the contents of the metadata in specified in argument[0]. /// - internal static IEnumerable> Metadata(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> Metadata(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments?.Length == 1, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); string metadataName = arguments[0]; - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { if (item.Value != null) { @@ -2598,18 +2598,18 @@ internal static IEnumerable> Metadata(Expander expander, I foreach (string itemSpec in splits) { // return a result through the enumerator - yield return new Pair(itemSpec, item.Value); + yield return new KeyValuePair(itemSpec, item.Value); } } else { // return a result through the enumerator - yield return new Pair(metadataValue, item.Value); + yield return new KeyValuePair(metadataValue, item.Value); } } else if (metadataValue != String.Empty && includeNullEntries) { - yield return new Pair(metadataValue, item.Value); + yield return new KeyValuePair(metadataValue, item.Value); } } } @@ -2619,7 +2619,7 @@ internal static IEnumerable> Metadata(Expander expander, I /// Intrinsic function that returns only the items from itemsOfType that have distinct Item1 in the Tuple /// Using a case sensitive comparison. /// - internal static IEnumerable> DistinctWithCase(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> DistinctWithCase(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { return DistinctWithComparer(expander, elementLocation, includeNullEntries, functionName, itemsOfType, arguments, StringComparer.Ordinal); } @@ -2628,7 +2628,7 @@ internal static IEnumerable> DistinctWithCase(Expander exp /// Intrinsic function that returns only the items from itemsOfType that have distinct Item1 in the Tuple /// Using a case insensitive comparison. /// - internal static IEnumerable> Distinct(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> Distinct(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { return DistinctWithComparer(expander, elementLocation, includeNullEntries, functionName, itemsOfType, arguments, StringComparer.OrdinalIgnoreCase); } @@ -2637,20 +2637,18 @@ internal static IEnumerable> Distinct(Expander expander, I /// Intrinsic function that returns only the items from itemsOfType that have distinct Item1 in the Tuple /// Using a case insensitive comparison. /// - internal static IEnumerable> DistinctWithComparer(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments, StringComparer comparer) + internal static IEnumerable> DistinctWithComparer(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments, StringComparer comparer) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments == null || arguments.Length == 0, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); // This dictionary will ensure that we only return one result per unique itemspec - Dictionary seenItems = new Dictionary(comparer); + HashSet seenItems = new HashSet(comparer); - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { - if (item.Key != null && !seenItems.ContainsKey(item.Key)) + if (item.Key != null && seenItems.Add(item.Key)) { - seenItems[item.Key] = item.Value; - - yield return new Pair(item.Key, item.Value); + yield return item; } } } @@ -2658,23 +2656,20 @@ internal static IEnumerable> DistinctWithComparer(Expander /// /// Intrinsic function reverses the item list. /// - internal static IEnumerable> Reverse(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> Reverse(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments == null || arguments.Length == 0, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); - foreach (Pair item in itemsOfType.Reverse()) - { - yield return new Pair(item.Key, item.Value); - } + return itemsOfType.Reverse(); } /// /// Intrinsic function that transforms expressions like the %(foo) in @(Compile->'%(foo)'). /// - internal static IEnumerable> ExpandQuotedExpressionFunction(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> ExpandQuotedExpressionFunction(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments?.Length == 1, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { MetadataMatchEvaluator matchEvaluator; string include = null; @@ -2697,11 +2692,11 @@ internal static IEnumerable> ExpandQuotedExpressionFunction(Expa // We pass in the existing item so we can copy over its metadata if (!string.IsNullOrEmpty(include)) { - yield return new Pair(include, item.Value); + yield return new KeyValuePair(include, item.Value); } else if (includeNullEntries) { - yield return new Pair(null, item.Value); + yield return new KeyValuePair(null, item.Value); } } } @@ -2710,17 +2705,17 @@ internal static IEnumerable> ExpandQuotedExpressionFunction(Expa /// Intrinsic function that transforms expressions by invoking methods of System.String on the itemspec /// of the item in the pipeline. /// - internal static IEnumerable> ExecuteStringFunction( + internal static IEnumerable> ExecuteStringFunction( Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, - IEnumerable> itemsOfType, + IEnumerable> itemsOfType, string[] arguments) { // Transform: expression is like @(Compile->'%(foo)'), so create completely new items, // using the Include from the source items - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { Function

function = new Function

( typeof(string), @@ -2740,11 +2735,11 @@ internal static IEnumerable> ExecuteStringFunction( // We pass in the existing item so we can copy over its metadata if (include.Length > 0) { - yield return new Pair(include, item.Value); + yield return new KeyValuePair(include, item.Value); } else if (includeNullEntries) { - yield return new Pair(null, item.Value); + yield return new KeyValuePair(null, item.Value); } } } @@ -2752,15 +2747,15 @@ internal static IEnumerable> ExecuteStringFunction( ///

/// Intrinsic function that returns the items from itemsOfType with their metadata cleared, i.e. only the itemspec is retained. /// - internal static IEnumerable> ClearMetadata(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> ClearMetadata(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments == null || arguments.Length == 0, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { if (includeNullEntries || item.Key != null) { - yield return new Pair(item.Key, null); + yield return new KeyValuePair(item.Key, null); } } } @@ -2769,13 +2764,13 @@ internal static IEnumerable> ClearMetadata(Expander expand /// Intrinsic function that returns only those items that have a not-blank value for the metadata specified /// Using a case insensitive comparison. /// - internal static IEnumerable> HasMetadata(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> HasMetadata(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments?.Length == 1, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); string metadataName = arguments[0]; - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { string metadataValue = null; @@ -2794,7 +2789,7 @@ internal static IEnumerable> HasMetadata(Expander expander if (!string.IsNullOrEmpty(metadataValue)) { // return a result through the enumerator - yield return new Pair(item.Key, item.Value); + yield return item; } } } @@ -2803,14 +2798,14 @@ internal static IEnumerable> HasMetadata(Expander expander /// Intrinsic function that returns only those items have the given metadata value /// Using a case insensitive comparison. /// - internal static IEnumerable> WithMetadataValue(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> WithMetadataValue(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments?.Length == 2, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); string metadataName = arguments[0]; string metadataValueToFind = arguments[1]; - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { string metadataValue = null; @@ -2827,7 +2822,7 @@ internal static IEnumerable> WithMetadataValue(Expander ex if (metadataValue != null && String.Equals(metadataValue, metadataValueToFind, StringComparison.OrdinalIgnoreCase)) { // return a result through the enumerator - yield return new Pair(item.Key, item.Value); + yield return item; } } } @@ -2836,14 +2831,14 @@ internal static IEnumerable> WithMetadataValue(Expander ex /// Intrinsic function that returns those items don't have the given metadata value /// Using a case insensitive comparison. /// - internal static IEnumerable> WithoutMetadataValue(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> WithoutMetadataValue(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments?.Length == 2, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); string metadataName = arguments[0]; string metadataValueToFind = arguments[1]; - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { string metadataValue = null; @@ -2860,7 +2855,7 @@ internal static IEnumerable> WithoutMetadataValue(Expander if (!String.Equals(metadataValue, metadataValueToFind, StringComparison.OrdinalIgnoreCase)) { // return a result through the enumerator - yield return new Pair(item.Key, item.Value); + yield return item; } } } @@ -2869,7 +2864,7 @@ internal static IEnumerable> WithoutMetadataValue(Expander /// Intrinsic function that returns a boolean to indicate if any of the items have the given metadata value /// Using a case insensitive comparison. /// - internal static IEnumerable> AnyHaveMetadataValue(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) + internal static IEnumerable> AnyHaveMetadataValue(Expander expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable> itemsOfType, string[] arguments) { ProjectErrorUtilities.VerifyThrowInvalidProject(arguments?.Length == 2, elementLocation, "InvalidItemFunctionSyntax", functionName, arguments == null ? 0 : arguments.Length); @@ -2877,7 +2872,7 @@ internal static IEnumerable> AnyHaveMetadataValue(Expander string metadataValueToFind = arguments[1]; bool metadataFound = false; - foreach (Pair item in itemsOfType) + foreach (KeyValuePair item in itemsOfType) { if (item.Value != null) { @@ -2898,7 +2893,7 @@ internal static IEnumerable> AnyHaveMetadataValue(Expander metadataFound = true; // return a result through the enumerator - yield return new Pair("true", item.Value); + yield return new KeyValuePair("true", item.Value); // break out as soon as we found a match yield break; @@ -2909,7 +2904,7 @@ internal static IEnumerable> AnyHaveMetadataValue(Expander if (!metadataFound) { // We did not locate an item with the required metadata - yield return new Pair("false", null); + yield return new KeyValuePair("false", null); } } } @@ -2971,7 +2966,7 @@ public IElementLocation ElementLocation /// /// Execute this transform function with the arguments contained within this TransformFunction instance. /// - public IEnumerable> Execute(Expander expander, bool includeNullEntries, IEnumerable> itemsOfType) + public IEnumerable> Execute(Expander expander, bool includeNullEntries, IEnumerable> itemsOfType) { // Execute via the delegate return _transform(expander, _elementLocation, includeNullEntries, _functionName, itemsOfType, _arguments); diff --git a/src/Build/Evaluation/IItemFactory.cs b/src/Build/Evaluation/IItemFactory.cs index 2125968bf6c..986386cd7a0 100644 --- a/src/Build/Evaluation/IItemFactory.cs +++ b/src/Build/Evaluation/IItemFactory.cs @@ -68,6 +68,6 @@ ProjectItemElement ItemElement /// /// Applies the supplied metadata to the destination items. /// - void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems); + void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems); } } diff --git a/src/Build/Evaluation/LazyItemEvaluator.ItemFactoryWrapper.cs b/src/Build/Evaluation/LazyItemEvaluator.ItemFactoryWrapper.cs index 722d467c342..99c7166189b 100644 --- a/src/Build/Evaluation/LazyItemEvaluator.ItemFactoryWrapper.cs +++ b/src/Build/Evaluation/LazyItemEvaluator.ItemFactoryWrapper.cs @@ -75,7 +75,7 @@ public I CreateItem(string include, I baseItem, string definingProject) return _wrappedItemFactory.CreateItem(include, baseItem, definingProject); } - public void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems) + public void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems) { SetItemElement(); _wrappedItemFactory.SetMetadata(metadata, destinationItems); diff --git a/src/Build/Evaluation/LazyItemEvaluator.LazyItemOperation.cs b/src/Build/Evaluation/LazyItemEvaluator.LazyItemOperation.cs index 43fffb961a6..fe8b1805bab 100644 --- a/src/Build/Evaluation/LazyItemEvaluator.LazyItemOperation.cs +++ b/src/Build/Evaluation/LazyItemEvaluator.LazyItemOperation.cs @@ -230,7 +230,7 @@ protected void DecorateItemsWithMetadata(IEnumerable itemBa _expander.Metadata = metadataTable; // Also keep a list of everything so we can get the predecessor objects correct. - List> metadataList = new(metadata.Length); + List> metadataList = new(metadata.Length); foreach (var metadataElement in metadata) { @@ -252,7 +252,7 @@ protected void DecorateItemsWithMetadata(IEnumerable itemBa evaluatedValue = FileUtilities.MaybeAdjustFilePath(evaluatedValue, metadataElement.ContainingProject.DirectoryPath); metadataTable.SetValue(metadataElement, evaluatedValue); - metadataList.Add(new Pair(metadataElement, evaluatedValue)); + metadataList.Add(new KeyValuePair(metadataElement, evaluatedValue)); } // Apply those metadata to each item diff --git a/src/Build/Instance/ProjectItemInstance.cs b/src/Build/Instance/ProjectItemInstance.cs index 4db93ab3bb0..cf6fc186770 100644 --- a/src/Build/Instance/ProjectItemInstance.cs +++ b/src/Build/Instance/ProjectItemInstance.cs @@ -2007,7 +2007,7 @@ public ProjectItemInstance CreateItem(string evaluatedInclude, string evaluatedI /// /// Applies the supplied metadata to the destination item. /// - public void SetMetadata(IEnumerable> metadataList, IEnumerable destinationItems) + public void SetMetadata(IEnumerable> metadataList, IEnumerable destinationItems) { // Set up a single dictionary that can be applied to all the items CopyOnWritePropertyDictionary metadata = new CopyOnWritePropertyDictionary(); @@ -2172,7 +2172,7 @@ public TaskItem CreateItem(string includeEscaped, string includeBeforeWildcardEx /// /// Applies the supplied metadata to the destination item. /// - public void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems) + public void SetMetadata(IEnumerable> metadata, IEnumerable destinationItems) { // Not difficult to implement, but we do not expect to go here. ErrorUtilities.ThrowInternalErrorUnreachable(); diff --git a/src/Build/Logging/ProfilerLogger.cs b/src/Build/Logging/ProfilerLogger.cs index a67d513a099..7f12efba35c 100644 --- a/src/Build/Logging/ProfilerLogger.cs +++ b/src/Build/Logging/ProfilerLogger.cs @@ -219,7 +219,7 @@ private static Dictionary PruneSmallItems( // Let's build an index of profiled locations by id, to speed up subsequent queries var idTable = aggregatedLocations.ToDictionary(pair => pair.Key.Id, - pair => new Pair(pair.Key, pair.Value)); + pair => new KeyValuePair(pair.Key, pair.Value)); // We want to keep all evaluation pass entries plus the big enough regular entries foreach (var prunedPair in aggregatedLocations.Where(pair => @@ -237,7 +237,7 @@ private static Dictionary PruneSmallItems( /// /// Finds the first ancestor of parentId (which could be itself) that is either an evaluation pass location or a big enough profiled data. /// - private static long? FindBigEnoughParentId(IDictionary> idTable, + private static long? FindBigEnoughParentId(IDictionary> idTable, long? parentId) { // The parent id is null, which means the item was pointing to an evaluation pass item. So we keep it as is. diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj index 9a5b1175b0e..1ae94c41fb7 100644 --- a/src/Build/Microsoft.Build.csproj +++ b/src/Build/Microsoft.Build.csproj @@ -86,9 +86,6 @@ SharedUtilities\NGen.cs - - SharedUtilities\Pair.cs - BackEnd\Components\RequestBuilder\IntrinsicTasks\PropertyParser.cs True diff --git a/src/Shared/Pair.cs b/src/Shared/Pair.cs deleted file mode 100644 index ef5073b4835..00000000000 --- a/src/Shared/Pair.cs +++ /dev/null @@ -1,60 +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.Diagnostics.CodeAnalysis; - -#nullable disable - -namespace Microsoft.Build.Shared -{ - /// - /// This struct is functionally identical to KeyValuePair, but avoids - /// CA908 warnings (types that in ngen images that will JIT). - /// Instead of generic collections of KeyValuePair, use Pair. - /// - /// - /// This trick is based on advice from - /// http://sharepoint/sites/codeanalysis/Wiki%20Pages/Rule%20-%20Avoid%20Types%20That%20Require%20JIT%20Compilation%20In%20Precompiled%20Assemblies.aspx. - /// It works because although this is a value type, it is not defined in mscorlib. - /// - /// Key - /// Value - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "Not possible as Equals cannot be implemented on the struct members")] - internal struct Pair - { - /// - /// Key - /// - private TKey _key; - - /// - /// Value - /// - private TValue _value; - - /// - /// Constructor - /// - public Pair(TKey key, TValue value) - { - _key = key; - _value = value; - } - - /// - /// Key - /// - internal readonly TKey Key - { - get { return _key; } - } - - /// - /// Value - /// - internal readonly TValue Value - { - get { return _value; } - } - } -} diff --git a/src/Shared/Tracing.cs b/src/Shared/Tracing.cs index d26f7127305..a71f01f150d 100644 --- a/src/Shared/Tracing.cs +++ b/src/Shared/Tracing.cs @@ -141,7 +141,6 @@ internal static void List(IEnumerable items) /// Dump all the named counters, if any /// [Conditional("DEBUG")] - [SuppressMessage("Microsoft.MSInternal", "CA908:AvoidTypesThatRequireJitCompilationInPrecompiledAssemblies", Justification = "Debug only")] internal static void Dump() { if (s_counts.Count > 0) From fecef0fdffe59ba8b0251701a23be48bbd552726 Mon Sep 17 00:00:00 2001 From: dotnet bot Date: Tue, 26 Sep 2023 23:26:56 -0700 Subject: [PATCH 09/11] Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8450263 (#9270) * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8450146 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8450146 --- src/Build/Resources/xlf/Strings.cs.xlf | 4 +-- src/Build/Resources/xlf/Strings.de.xlf | 2 +- src/Build/Resources/xlf/Strings.es.xlf | 4 +-- src/Build/Resources/xlf/Strings.fr.xlf | 4 +-- src/Build/Resources/xlf/Strings.it.xlf | 4 +-- src/Build/Resources/xlf/Strings.ja.xlf | 4 +-- src/Build/Resources/xlf/Strings.ko.xlf | 2 +- src/Build/Resources/xlf/Strings.pl.xlf | 2 +- src/Build/Resources/xlf/Strings.pt-BR.xlf | 4 +-- src/Build/Resources/xlf/Strings.ru.xlf | 4 +-- src/Build/Resources/xlf/Strings.tr.xlf | 2 +- src/Build/Resources/xlf/Strings.zh-Hans.xlf | 4 +-- src/Build/Resources/xlf/Strings.zh-Hant.xlf | 4 +-- src/MSBuild/Resources/xlf/Strings.cs.xlf | 10 +++---- src/MSBuild/Resources/xlf/Strings.de.xlf | 11 ++++---- src/MSBuild/Resources/xlf/Strings.es.xlf | 10 +++---- src/MSBuild/Resources/xlf/Strings.fr.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.it.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.ja.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.ko.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.pl.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.pt-BR.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.ru.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.tr.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf | 28 +++++++++---------- src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf | 28 +++++++++---------- src/Tasks/Resources/xlf/Strings.cs.xlf | 2 +- src/Tasks/Resources/xlf/Strings.de.xlf | 2 +- src/Tasks/Resources/xlf/Strings.es.xlf | 2 +- src/Tasks/Resources/xlf/Strings.fr.xlf | 2 +- src/Tasks/Resources/xlf/Strings.it.xlf | 2 +- src/Tasks/Resources/xlf/Strings.ja.xlf | 2 +- src/Tasks/Resources/xlf/Strings.ko.xlf | 2 +- src/Tasks/Resources/xlf/Strings.pl.xlf | 2 +- src/Tasks/Resources/xlf/Strings.pt-BR.xlf | 2 +- src/Tasks/Resources/xlf/Strings.ru.xlf | 2 +- src/Tasks/Resources/xlf/Strings.tr.xlf | 2 +- src/Tasks/Resources/xlf/Strings.zh-Hans.xlf | 2 +- src/Tasks/Resources/xlf/Strings.zh-Hant.xlf | 4 +-- 39 files changed, 192 insertions(+), 191 deletions(-) diff --git a/src/Build/Resources/xlf/Strings.cs.xlf b/src/Build/Resources/xlf/Strings.cs.xlf index 3fbad3926d9..e47a6be2f0e 100644 --- a/src/Build/Resources/xlf/Strings.cs.xlf +++ b/src/Build/Resources/xlf/Strings.cs.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: Mezipaměť projektu selhala při zpracování výsledku sestavení pro následující projekt: {0}. @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Přístupy k souborům sestav se v současné době podporují jenom pomocí varianty x64 nástroje MSBuild. diff --git a/src/Build/Resources/xlf/Strings.de.xlf b/src/Build/Resources/xlf/Strings.de.xlf index 296f088f3e9..afc7548add2 100644 --- a/src/Build/Resources/xlf/Strings.de.xlf +++ b/src/Build/Resources/xlf/Strings.de.xlf @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Das Melden von Dateizugriffen wird derzeit nur mit der x64-Variante von MSBuild unterstützt. diff --git a/src/Build/Resources/xlf/Strings.es.xlf b/src/Build/Resources/xlf/Strings.es.xlf index 372427a4814..b239a2147f8 100644 --- a/src/Build/Resources/xlf/Strings.es.xlf +++ b/src/Build/Resources/xlf/Strings.es.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: error en la caché del proyecto al controlar un resultado de compilación para el siguiente proyecto: {0}. @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Los accesos a archivos de informes solo se admiten actualmente con el tipo x64 de MSBuild. diff --git a/src/Build/Resources/xlf/Strings.fr.xlf b/src/Build/Resources/xlf/Strings.fr.xlf index e7aaadcb3dc..1a7b7f44d73 100644 --- a/src/Build/Resources/xlf/Strings.fr.xlf +++ b/src/Build/Resources/xlf/Strings.fr.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: le cache du projet a échoué lors de la gestion d’un résultat de build pour le projet suivant : {0}. @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Les accès aux fichiers de création de rapports sont uniquement pris en charge à l’aide de la saveur x64 de MSBuild. diff --git a/src/Build/Resources/xlf/Strings.it.xlf b/src/Build/Resources/xlf/Strings.it.xlf index 1315696454c..2b84a74df2e 100644 --- a/src/Build/Resources/xlf/Strings.it.xlf +++ b/src/Build/Resources/xlf/Strings.it.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: errore della cache del progetto durante la gestione di un risultato di compilazione per il progetto seguente: {0}. @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Gli accessi ai file di report sono attualmente supportati solo con la versione x64 di MSBuild. diff --git a/src/Build/Resources/xlf/Strings.ja.xlf b/src/Build/Resources/xlf/Strings.ja.xlf index 9b9004b04df..b542f06c26c 100644 --- a/src/Build/Resources/xlf/Strings.ja.xlf +++ b/src/Build/Resources/xlf/Strings.ja.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: 次のプロジェクトのビルド結果を処理中にプロジェクト キャッシュが失敗しました: {0}。 @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + ファイル アクセスのレポートは、現在、MSBuild の x64 フレーバーを使用してのみサポートされています。 diff --git a/src/Build/Resources/xlf/Strings.ko.xlf b/src/Build/Resources/xlf/Strings.ko.xlf index 90c1b6f61d0..cc93c3d1c32 100644 --- a/src/Build/Resources/xlf/Strings.ko.xlf +++ b/src/Build/Resources/xlf/Strings.ko.xlf @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + 파일 액세스 보고는 현재 x64 버전의 MSBuild를 사용하는 경우에만 지원됩니다. diff --git a/src/Build/Resources/xlf/Strings.pl.xlf b/src/Build/Resources/xlf/Strings.pl.xlf index 6a25061213a..c41c1a12d2b 100644 --- a/src/Build/Resources/xlf/Strings.pl.xlf +++ b/src/Build/Resources/xlf/Strings.pl.xlf @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Raportowanie dostępu do plików jest obecnie obsługiwane tylko przy użyciu wersji x64 programu MSBuild. diff --git a/src/Build/Resources/xlf/Strings.pt-BR.xlf b/src/Build/Resources/xlf/Strings.pt-BR.xlf index c70492099c6..56b0d6b36f5 100644 --- a/src/Build/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Build/Resources/xlf/Strings.pt-BR.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: O cache do projeto falhou ao manipular um resultado de construção para o seguinte projeto: {0}. @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Atualmente, o relatório de acessos a arquivos só tem suporte usando o tipo x64 do MSBuild. diff --git a/src/Build/Resources/xlf/Strings.ru.xlf b/src/Build/Resources/xlf/Strings.ru.xlf index b2620699ab3..07817ef4752 100644 --- a/src/Build/Resources/xlf/Strings.ru.xlf +++ b/src/Build/Resources/xlf/Strings.ru.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: сбой кэша проекта при обработке результата сборки для следующего проекта: {0}. @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Доступ к файлам отчетов сейчас поддерживается только при использовании 64-разрядного варианта приложения MSBuild. diff --git a/src/Build/Resources/xlf/Strings.tr.xlf b/src/Build/Resources/xlf/Strings.tr.xlf index 7e9e6419511..19239812ab3 100644 --- a/src/Build/Resources/xlf/Strings.tr.xlf +++ b/src/Build/Resources/xlf/Strings.tr.xlf @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + Raporlama dosyası erişimleri şu anda yalnızca MSBuild x64 varyantı kullanıldığında destekleniyor. diff --git a/src/Build/Resources/xlf/Strings.zh-Hans.xlf b/src/Build/Resources/xlf/Strings.zh-Hans.xlf index 259cedc8c5f..757c28ce80f 100644 --- a/src/Build/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Build/Resources/xlf/Strings.zh-Hans.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: 处理以下项目的生成结果时,项目缓存失败: {0}。 @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + 当前仅支持使用 x64 风格的 MSBuild 来报告文件访问情况。 diff --git a/src/Build/Resources/xlf/Strings.zh-Hant.xlf b/src/Build/Resources/xlf/Strings.zh-Hant.xlf index d2bc331c9cc..b2bdd01d43e 100644 --- a/src/Build/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Build/Resources/xlf/Strings.zh-Hant.xlf @@ -266,7 +266,7 @@ MSB4269: The project cache failed while handling a build result for the following project: {0}. - MSB4269: The project cache failed while handling a build result for the following project: {0}. + MSB4269: 處理下列專案的組建結果時,專案快取失敗: {0}。 @@ -377,7 +377,7 @@ Reporting file accesses is only currently supported using the x64 flavor of MSBuild. - Reporting file accesses is only currently supported using the x64 flavor of MSBuild. + 目前只支援使用 MSBuild 的 x64 變體來報告檔案存取。 diff --git a/src/MSBuild/Resources/xlf/Strings.cs.xlf b/src/MSBuild/Resources/xlf/Strings.cs.xlf index 78832488b34..9a4dee64212 100644 --- a/src/MSBuild/Resources/xlf/Strings.cs.xlf +++ b/src/MSBuild/Resources/xlf/Strings.cs.xlf @@ -106,11 +106,11 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + Způsobí, že MSBuild bude hlásit přístupy k souborům ve všech konfigurovaných + modulech plug-in pro mezipaměť projektu. - This flag is experimental and may not work as intended. + Tento příznak je experimentální a nemusí fungovat podle očekávání. LOCALIZATION: "-reportFileAccesses" should not be localized. @@ -139,7 +139,7 @@ MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: Hodnota přístupů k souborům sestavy není platná. {0} {StrBegin="MSBUILD : error MSB1063: "} UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. diff --git a/src/MSBuild/Resources/xlf/Strings.de.xlf b/src/MSBuild/Resources/xlf/Strings.de.xlf index 1ded81f78ff..0a93c2b4b6d 100644 --- a/src/MSBuild/Resources/xlf/Strings.de.xlf +++ b/src/MSBuild/Resources/xlf/Strings.de.xlf @@ -105,11 +105,12 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|Falsch] + Führt dazu, dass MSBuild Dateizugriffe an alle konfigurierten + meldet + Projektcache-Plug-Ins. - This flag is experimental and may not work as intended. + Dieses Kennzeichen ist experimentell und funktioniert möglicherweise nicht wie vorgesehen. LOCALIZATION: "-reportFileAccesses" should not be localized. @@ -138,7 +139,7 @@ MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: Der Wert für den Zugriff auf die Berichtsdatei ist ungültig. {0} {StrBegin="MSBUILD : error MSB1063: "} UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. diff --git a/src/MSBuild/Resources/xlf/Strings.es.xlf b/src/MSBuild/Resources/xlf/Strings.es.xlf index 2c781137ebc..cfa87dc7547 100644 --- a/src/MSBuild/Resources/xlf/Strings.es.xlf +++ b/src/MSBuild/Resources/xlf/Strings.es.xlf @@ -105,11 +105,11 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|Falso] + Hace que MSBuild informe de los accesos a los archivos a cualquier + complemento de caché de proyectos. - This flag is experimental and may not work as intended. +Esta marca es experimental y puede que no funcione según lo previsto. LOCALIZATION: "-reportFileAccesses" should not be localized. @@ -138,7 +138,7 @@ MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: el valor de acceso al archivo de informe no es válido. {0} {StrBegin="MSBUILD : error MSB1063: "} UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. diff --git a/src/MSBuild/Resources/xlf/Strings.fr.xlf b/src/MSBuild/Resources/xlf/Strings.fr.xlf index 02086a97472..b4b2ae8bfde 100644 --- a/src/MSBuild/Resources/xlf/Strings.fr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.fr.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + Entraîne le signalement par MSBuild des accès par fichiers aux plug-ins + cache de projet configurés. - This flag is experimental and may not work as intended. + Cet indicateur est expérimental et peut ne pas fonctionner comme prévu. LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: la valeur d’accès au fichier de rapport n’est pas valide. {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.it.xlf b/src/MSBuild/Resources/xlf/Strings.it.xlf index dcd2b4190a6..b7e8235cf4c 100644 --- a/src/MSBuild/Resources/xlf/Strings.it.xlf +++ b/src/MSBuild/Resources/xlf/Strings.it.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + Fa in modo che MSBuild segnali gli accessi ai file a qualsiasi file configurato + plug-in della cache del progetto. - This flag is experimental and may not work as intended. +Questo flag è sperimentale e potrebbe non funzionare come previsto. LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: il valore degli accessi al file di report non è valido. {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.ja.xlf b/src/MSBuild/Resources/xlf/Strings.ja.xlf index 2b6674deb3c..b10dcf784c2 100644 --- a/src/MSBuild/Resources/xlf/Strings.ja.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ja.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + MSBuild が、構成されているプロジェクト キャッシュ プラグインへの + ファイル アクセスを報告します。 - This flag is experimental and may not work as intended. + このフラグは実験的なものであり、意図したとおりに動作しない可能性があります。 LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: レポート ファイルのアクセス値が無効です。 {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.ko.xlf b/src/MSBuild/Resources/xlf/Strings.ko.xlf index 7db44952044..d6d76449a65 100644 --- a/src/MSBuild/Resources/xlf/Strings.ko.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ko.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + MSBuild에서 모든 구성된 프로젝트 캐시 플러그 인에 대한 + 파일 액세스를 보고하도록 합니다. - This flag is experimental and may not work as intended. + 이 플래그는 실험적이며 예상대로 작동하지 않을 수 있습니다. LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: 보고서 파일 액세스 값이 잘못되었습니다. {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.pl.xlf b/src/MSBuild/Resources/xlf/Strings.pl.xlf index 0a63a3a2de9..2a48d1d5450 100644 --- a/src/MSBuild/Resources/xlf/Strings.pl.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pl.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + Powoduje, że program MSBuild zgłasza dostępy do wszystkich skonfigurowanych plików + wtyczek pamięci podręcznej projektu. - This flag is experimental and may not work as intended. +Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: wartość dostępów do pliku raportu jest nieprawidłowa. {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf index edad4e8e9fb..15c9b624a84 100644 --- a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + Faz com que o MSBuild relate acessos a arquivos para qualquer plug-in + de cache de projeto configurado. - This flag is experimental and may not work as intended. + Este sinalizador é experimental e pode não funcionar conforme o esperado. LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: o valor de acesso ao arquivo de relatório não é válido. {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.ru.xlf b/src/MSBuild/Resources/xlf/Strings.ru.xlf index 8fb34c6a63c..6dca92a8e84 100644 --- a/src/MSBuild/Resources/xlf/Strings.ru.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ru.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + Включение отчетов MSBuild о доступе к файлам для всех настроенных + подключаемых модулей кэша проекта. - This flag is experimental and may not work as intended. + Этот флаг является экспериментальным и может работать неправильно. LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: переданное значение отчета о доступе к файлам является недопустимым. {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.tr.xlf b/src/MSBuild/Resources/xlf/Strings.tr.xlf index 54193f8ac79..ff6f95f2eae 100644 --- a/src/MSBuild/Resources/xlf/Strings.tr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.tr.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + MSBuild’in yapılandırılmış proje önbelleği eklentilerine dosya + erişimlerini bildirmesine neden olur. - This flag is experimental and may not work as intended. + Bu bayrak deneme amaçlıdır ve istendiği gibi çalışmayabilir. LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: Dosya erişimleri değerinin geçerli olmadığını bildirir. {0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf b/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf index 27156f3146d..db252831300 100644 --- a/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + 导致 MSBuild 报告对任何已配置 + 项目缓存插件的文件访问。 - This flag is experimental and may not work as intended. + 此标志是实验性的,可能无法按预期工作。 LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: 报表文件访问值无效。{0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf index ef9bed36a85..f5907cf51e5 100644 --- a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf @@ -105,25 +105,15 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|False] - Causes MSBuild to report file accesses to any configured - project cache plugins. + -reportFileAccesses[:True|False] + 導致 MSBuild 報告任何已設定之專案快取外掛程式的 + 檔案存取。 - This flag is experimental and may not work as intended. + 此旗標為實驗性質,可能無法如預期般運作。 LOCALIZATION: "-reportFileAccesses" should not be localized. LOCALIZATION: None of the lines should be longer than a standard width console window, eg 80 chars. - - - - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - MSBUILD : error MSB1063: Report file accesses value is not valid. {0} - - {StrBegin="MSBUILD : error MSB1063: "} - UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. - This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. - LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. @@ -144,6 +134,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1063: Report file accesses value is not valid. {0} + MSBUILD : error MSB1063: 報告檔案存取值無效。{0} + + {StrBegin="MSBUILD : error MSB1063: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/Tasks/Resources/xlf/Strings.cs.xlf b/src/Tasks/Resources/xlf/Strings.cs.xlf index 48908353f51..de8e083a50f 100644 --- a/src/Tasks/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Resources/xlf/Strings.cs.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: „Kopírování {1} do {2} {0} a personál je {3}„ {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.de.xlf b/src/Tasks/Resources/xlf/Strings.de.xlf index 2a0c1fe29bc..88a678c2770 100644 --- a/src/Tasks/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Resources/xlf/Strings.de.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "Erhalt von{0} Kopieren von {1} zu {2} und HR ist {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.es.xlf b/src/Tasks/Resources/xlf/Strings.es.xlf index 6f0da855557..bc6eeddd239 100644 --- a/src/Tasks/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Resources/xlf/Strings.es.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "Se obtuvo {0} al copiar {1} en {2} y HR es {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.fr.xlf b/src/Tasks/Resources/xlf/Strings.fr.xlf index 3b97abc47da..cb867183cd1 100644 --- a/src/Tasks/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Resources/xlf/Strings.fr.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: « Nous avons obtenu {0} copie de {1} vers {2} et HR est {3} » {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.it.xlf b/src/Tasks/Resources/xlf/Strings.it.xlf index e2ac088512d..5d7713418bf 100644 --- a/src/Tasks/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Resources/xlf/Strings.it.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "Ottenuto {0} copiando {1} in {2} e HR è {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.ja.xlf b/src/Tasks/Resources/xlf/Strings.ja.xlf index 99c86f7b9f1..cdfc6fa3e35 100644 --- a/src/Tasks/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Resources/xlf/Strings.ja.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "{1} を {2} にコピー中に {0} が発生しました。HR は {3} です" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.ko.xlf b/src/Tasks/Resources/xlf/Strings.ko.xlf index e01975fed70..f92a3ffa204 100644 --- a/src/Tasks/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Resources/xlf/Strings.ko.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "{1}을(를) {2}(으)로 복사하는 {0}이 있고 HR은 {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.pl.xlf b/src/Tasks/Resources/xlf/Strings.pl.xlf index 8798bf5d4c1..c7df93ee1b1 100644 --- a/src/Tasks/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Resources/xlf/Strings.pl.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: „Mam {0} kopiowane z {1} do {2}, a HR to {3}” {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Resources/xlf/Strings.pt-BR.xlf index 1ad49300fd6..56ca7836a03 100644 --- a/src/Tasks/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Resources/xlf/Strings.pt-BR.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "Recebi {0} copiando {1} para {2} e o RH é {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.ru.xlf b/src/Tasks/Resources/xlf/Strings.ru.xlf index a99ed504844..584ca7a22f5 100644 --- a/src/Tasks/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Resources/xlf/Strings.ru.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "Выполнено копирование {0} {1} в {2} и HR — {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.tr.xlf b/src/Tasks/Resources/xlf/Strings.tr.xlf index 7debdda9f2b..3eb1d10877e 100644 --- a/src/Tasks/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Resources/xlf/Strings.tr.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "{0} için {1} yolu {2} yoluna kopyalandı ve HR: {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Resources/xlf/Strings.zh-Hans.xlf index 4075d3f7566..7692c55dfe7 100644 --- a/src/Tasks/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Resources/xlf/Strings.zh-Hans.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: "将 {1} 复制到 {2} 时出现 {0},HR 为 {3}" {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") diff --git a/src/Tasks/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Resources/xlf/Strings.zh-Hant.xlf index c0cc623a088..3fd82ff8157 100644 --- a/src/Tasks/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Resources/xlf/Strings.zh-Hant.xlf @@ -193,7 +193,7 @@ MSB3894: "Got {0} copying {1} to {2} and HR is {3}" - MSB3894: "Got {0} copying {1} to {2} and HR is {3}" + MSB3894: 「收到將 {1} 複製到 {2},且 HR 為 {3} 的 {0}」 {StrBegin="MSB3894: "} LOCALIZATION: {0} is exception.ToString(), {1} and {2} are paths, {3} is a number") @@ -228,7 +228,7 @@ "MSB3895: Retrying on ERROR_ACCESS_DENIED because environment variable MSBUILDALWAYSRETRY = 1" - "MSB3895: Retrying on ERROR_ACCESS_DENIED because environment variable MSBUILDALWAYSRETRY = 1" + MSB3895: 「正在 ERROR_ACCESS_DENIED 上重試,因為環境變數 MSBUILDALWAYSRETRY = 1」 {StrBegin="MSB3895: "} LOCALIZATION: Do NOT translate MSBUILDALWAYSRETRY") From ba2883e550b36f9d1671483a7eab81edf7b51c2c Mon Sep 17 00:00:00 2001 From: Jenny Bai Date: Wed, 27 Sep 2023 13:35:16 +0000 Subject: [PATCH 10/11] Return false if there are no existent inputs to GenerateResource (#9208) Fixes #9199 by avoiding an unhandled exception: ``` "C:\temp\testgenres\project.proj" (default target) (1) -> MSBUILD : error : This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled [C:\temp\testgenres\project.proj] MSBUILD : error : Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: There should be resource files to process [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args) [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Tasks.GenerateResource.TransformResourceFilesUsingResGen(List`1 inputsToProcess, List`1 outputsToProcess) [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Tasks.GenerateResource.GenerateResourcesUsingResGen(List`1 inputsToProcess, List`1 outputsToProcess) [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Tasks.GenerateResource.Execute() [C:\temp\testgenres\project.proj] ``` --- .../GenerateResource_Tests.cs | 23 +++++++++++++++---- src/Tasks/GenerateResource.cs | 18 +++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/Tasks.UnitTests/ResourceHandling/GenerateResource_Tests.cs b/src/Tasks.UnitTests/ResourceHandling/GenerateResource_Tests.cs index f704ef169a1..5b672f3b88c 100644 --- a/src/Tasks.UnitTests/ResourceHandling/GenerateResource_Tests.cs +++ b/src/Tasks.UnitTests/ResourceHandling/GenerateResource_Tests.cs @@ -11,6 +11,7 @@ using Microsoft.Build.Framework; using Microsoft.Build.Shared; using Microsoft.Build.Tasks; +using Microsoft.Build.UnitTests.Shared; using Microsoft.Build.Utilities; using Shouldly; using Xunit; @@ -338,7 +339,7 @@ public void ForceOutOfDate() /* Unmerged change from project 'Microsoft.Build.Tasks.UnitTests (net7.0)' Before: Utilities.AssertLogContainsResource(t, "GenerateResource.OutputDoesntExist", t.OutputResources[0].ItemSpec); - + Utilities.AssertStateFileWasWritten(t); After: Utilities.AssertLogContainsResource(t, "GenerateResource.OutputDoesntExist", t.OutputResources[0].ItemSpec); @@ -1718,7 +1719,7 @@ public void FailedResXReader() /* Unmerged change from project 'Microsoft.Build.Tasks.UnitTests (net7.0)' Before: Assert.False(success); - + Utilities.AssertStateFileWasWritten(t); After: Assert.False(success); @@ -1797,7 +1798,7 @@ public void FailedResXReaderWithAllOutputResourcesSpecified() /* Unmerged change from project 'Microsoft.Build.Tasks.UnitTests (net7.0)' Before: Assert.False(success); - + Utilities.AssertStateFileWasWritten(t); After: Assert.False(success); @@ -2317,7 +2318,7 @@ public void OutputFilesPartialInputs() /* Unmerged change from project 'Microsoft.Build.Tasks.UnitTests (net7.0)' Before: Assert.Equal(t.FilesWritten[2].ItemSpec, Path.ChangeExtension(t.Sources[3].ItemSpec, ".resources")); - + Utilities.AssertStateFileWasWritten(t); After: Assert.Equal(t.FilesWritten[2].ItemSpec, Path.ChangeExtension(t.Sources[3].ItemSpec, ".resources")); @@ -3653,6 +3654,20 @@ GenerateResource ExecuteTask() Utilities.FileUpdated(resourcesFile, initialWriteTime).ShouldBeFalse(); } } + + /// + /// https://github.com/dotnet/msbuild/issues/9199 + /// + [Fact] + public void NotValidSources() + { + GenerateResource t = new GenerateResource { BuildEngine = new MockEngine(_output) }; + t.Sources = new ITaskItem[] { new TaskItem("non-existent") }; + t.OutputResources = new ITaskItem[] { new TaskItem("out") }; + Assert.False(t.Execute()); + ((MockEngine)t.BuildEngine).AssertLogContains("MSB3552"); + Assert.Equal(1, ((MockEngine)t.BuildEngine).Errors); + } } } diff --git a/src/Tasks/GenerateResource.cs b/src/Tasks/GenerateResource.cs index 3c198c1d512..cb84eb5b8ae 100644 --- a/src/Tasks/GenerateResource.cs +++ b/src/Tasks/GenerateResource.cs @@ -714,14 +714,22 @@ public override bool Execute() GetResourcesToProcess(out inputsToProcess, out outputsToProcess, out cachedOutputFiles); - if (inputsToProcess.Count == 0 && !Log.HasLoggedErrors) + if (inputsToProcess.Count == 0) { - if (cachedOutputFiles.Count > 0) + if (!Log.HasLoggedErrors) { - OutputResources = cachedOutputFiles.ToArray(); - } + if (cachedOutputFiles.Count > 0) + { + OutputResources = cachedOutputFiles.ToArray(); + } - Log.LogMessageFromResources("GenerateResource.NothingOutOfDate"); + Log.LogMessageFromResources("GenerateResource.NothingOutOfDate"); + } + else + { + // No valid sources found--failures should have been logged in GetResourcesToProcess + return false; + } } else if (FailIfNotIncremental) { From 8782d377508674acc9bc003d988a52110f09a0d6 Mon Sep 17 00:00:00 2001 From: Jonathan Dodds Date: Wed, 27 Sep 2023 10:05:00 -0400 Subject: [PATCH 11/11] Stub tasks that are not supported on .NET (#9153) Following the pattern used for the `ResolveComReference` task, create stubs for .NET that provide a clear error message indicating the task is not supported on .NET. Fixes #3499. --- src/Tasks/Al.cs | 133 +++++++++++++++++++++++- src/Tasks/AspNetCompiler.cs | 72 ++++++++++++- src/Tasks/CompatibilitySuppressions.xml | 66 +++++++++++- src/Tasks/GenerateBootstrapper.cs | 86 ++++++++++++++- src/Tasks/GenerateTrustInfo.cs | 53 +++++++++- src/Tasks/GetFrameworkSDKPath.cs | 67 +++++++++++- src/Tasks/Microsoft.Build.Tasks.csproj | 62 +++++------ src/Tasks/Microsoft.Common.tasks | 4 +- src/Tasks/RegisterAssembly.cs | 49 ++++++++- src/Tasks/ResolveComReference.cs | 21 ++-- src/Tasks/ResolveNativeReference.cs | 64 +++++++++++- src/Tasks/TaskRequiresFramework.cs | 30 ++++++ src/Tasks/UnregisterAssembly.cs | 44 +++++++- src/Tasks/UpdateManifest.cs | 47 ++++++++- src/Tasks/WinMDExp.cs | 75 ++++++++++++- 15 files changed, 800 insertions(+), 73 deletions(-) create mode 100644 src/Tasks/TaskRequiresFramework.cs diff --git a/src/Tasks/Al.cs b/src/Tasks/Al.cs index 7d9ad8fa1a8..0b587df5b74 100644 --- a/src/Tasks/Al.cs +++ b/src/Tasks/Al.cs @@ -1,21 +1,26 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#if NETFRAMEWORK using System; -using Microsoft.Build.Framework; using Microsoft.Build.Shared.FileSystem; using Microsoft.Build.Utilities; +#endif + +using Microsoft.Build.Framework; #nullable disable namespace Microsoft.Build.Tasks { +#if NETFRAMEWORK + /// /// This class defines the "AL" XMake task, which enables using al.exe to link /// modules and resource files into assemblies. /// - public class AL : ToolTaskExtension + public class AL : ToolTaskExtension, IALTaskContract { #region Properties /* @@ -387,6 +392,130 @@ public override bool Execute() return base.Execute(); } + #endregion + } + +#else + + /// + /// Stub AL task for .NET Core. + /// + public sealed class AL : TaskRequiresFramework, IALTaskContract + { + public AL() + : base(nameof(AL)) + { + } + + #region Properties + + public string AlgorithmId { get; set; } + + public string BaseAddress { get; set; } + + public string CompanyName { get; set; } + + public string Configuration { get; set; } + + public string Copyright { get; set; } + + public string Culture { get; set; } + + public bool DelaySign { get; set; } + + public string Description { get; set; } + + public string EvidenceFile { get; set; } + + public string FileVersion { get; set; } + + public string Flags { get; set; } + + public bool GenerateFullPaths { get; set; } + + public string KeyFile { get; set; } + + public string KeyContainer { get; set; } + + public string MainEntryPoint { get; set; } + + [Output] + public ITaskItem OutputAssembly { get; set; } + + public string Platform { get; set; } + + public bool Prefer32Bit { get; set; } + + public string ProductName { get; set; } + + public string ProductVersion { get; set; } + + public string[] ResponseFiles { get; set; } + + public string TargetType { get; set; } + + public string TemplateFile { get; set; } + + public string Title { get; set; } + + public string Trademark { get; set; } + + public string Version { get; set; } + + public string Win32Icon { get; set; } + + public string Win32Resource { get; set; } + + public ITaskItem[] SourceModules { get; set; } + + public ITaskItem[] EmbedResources { get; set; } + + public ITaskItem[] LinkResources { get; set; } + + public string SdkToolsPath { get; set; } + + #endregion + } + +#endif + + internal interface IALTaskContract + { + #region Properties + + string AlgorithmId { get; set; } + string BaseAddress { get; set; } + string CompanyName { get; set; } + string Configuration { get; set; } + string Copyright { get; set; } + string Culture { get; set; } + bool DelaySign { get; set; } + string Description { get; set; } + string EvidenceFile { get; set; } + string FileVersion { get; set; } + string Flags { get; set; } + bool GenerateFullPaths { get; set; } + string KeyFile { get; set; } + string KeyContainer { get; set; } + string MainEntryPoint { get; set; } + ITaskItem OutputAssembly { get; set; } + string Platform { get; set; } + bool Prefer32Bit { get; set; } + string ProductName { get; set; } + string ProductVersion { get; set; } + string[] ResponseFiles { get; set; } + string TargetType { get; set; } + string TemplateFile { get; set; } + string Title { get; set; } + string Trademark { get; set; } + string Version { get; set; } + string Win32Icon { get; set; } + string Win32Resource { get; set; } + ITaskItem[] SourceModules { get; set; } + ITaskItem[] EmbedResources { get; set; } + ITaskItem[] LinkResources { get; set; } + string SdkToolsPath { get; set; } + #endregion } } diff --git a/src/Tasks/AspNetCompiler.cs b/src/Tasks/AspNetCompiler.cs index 1e1d3b4b2be..3570cc44010 100644 --- a/src/Tasks/AspNetCompiler.cs +++ b/src/Tasks/AspNetCompiler.cs @@ -1,16 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#if NETFRAMEWORK using Microsoft.Build.Utilities; +#endif #nullable disable namespace Microsoft.Build.Tasks { +#if NETFRAMEWORK + /// /// The AspNetCompiler task, which is a wrapper around aspnet_compiler.exe /// - public class AspNetCompiler : ToolTaskExtension + public class AspNetCompiler : ToolTaskExtension, IAspNetCompilerTaskContract { /* C:\WINDOWS\Microsoft.NET\Framework\v2.0.x86dbg>aspnet_compiler /? @@ -338,4 +342,70 @@ protected override bool ValidateParameters() return true; } } + +#else + + public sealed class AspNetCompiler : TaskRequiresFramework, IAspNetCompilerTaskContract + { + public AspNetCompiler() + : base(nameof(AspNetCompiler)) + { + } + + #region Properties + + public bool AllowPartiallyTrustedCallers { get; set; } + + public bool DelaySign { get; set; } + + public bool FixedNames { get; set; } + + public string KeyContainer { get; set; } + + public string KeyFile { get; set; } + + public string MetabasePath { get; set; } + + public string PhysicalPath { get; set; } + + public string TargetPath { get; set; } + + public string VirtualPath { get; set; } + + public bool Updateable { get; set; } + + public bool Force { get; set; } + + public bool Debug { get; set; } + + public bool Clean { get; set; } + + public string TargetFrameworkMoniker { get; set; } + + #endregion + } + +#endif + + internal interface IAspNetCompilerTaskContract + { + #region Properties + + bool AllowPartiallyTrustedCallers { get; set; } + bool DelaySign { get; set; } + bool FixedNames { get; set; } + string KeyContainer { get; set; } + string KeyFile { get; set; } + string MetabasePath { get; set; } + string PhysicalPath { get; set; } + string TargetPath { get; set; } + string VirtualPath { get; set; } + bool Updateable { get; set; } + bool Force { get; set; } + bool Debug { get; set; } + bool Clean { get; set; } + string TargetFrameworkMoniker { get; set; } + + #endregion + } } diff --git a/src/Tasks/CompatibilitySuppressions.xml b/src/Tasks/CompatibilitySuppressions.xml index f89f776d767..9647c21c161 100644 --- a/src/Tasks/CompatibilitySuppressions.xml +++ b/src/Tasks/CompatibilitySuppressions.xml @@ -1,16 +1,76 @@  - - + + CP0007 + T:Microsoft.Build.Tasks.AL + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.AspNetCompiler + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.GenerateBootstrapper + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.GenerateTrustInfo + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.GetFrameworkSdkPath + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.RegisterAssembly + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + CP0007 T:Microsoft.Build.Tasks.ResolveComReference ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll ref/net472/Microsoft.Build.Tasks.Core.dll + + CP0007 + T:Microsoft.Build.Tasks.ResolveNativeReference + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.UnregisterAssembly + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.UpdateManifest + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + + + CP0007 + T:Microsoft.Build.Tasks.WinMDExp + ref/netstandard2.0/Microsoft.Build.Tasks.Core.dll + ref/net472/Microsoft.Build.Tasks.Core.dll + true - + true - + + true + + + true + + + true + + + true + + + + true + + + true + + + true + + +
+ + true @@ -598,15 +624,6 @@ true - - true - - - true - - - true - true @@ -617,16 +634,10 @@ true - - true - true - - true - true @@ -637,13 +648,6 @@ true - - true - - - true - - @@ -974,11 +978,9 @@ - + - + diff --git a/src/Tasks/Microsoft.Common.tasks b/src/Tasks/Microsoft.Common.tasks index beab1878e60..f8e09491af3 100644 --- a/src/Tasks/Microsoft.Common.tasks +++ b/src/Tasks/Microsoft.Common.tasks @@ -63,7 +63,7 @@ - + @@ -84,7 +84,7 @@ - + diff --git a/src/Tasks/RegisterAssembly.cs b/src/Tasks/RegisterAssembly.cs index 0fb8e616bb3..542e2a8f08b 100644 --- a/src/Tasks/RegisterAssembly.cs +++ b/src/Tasks/RegisterAssembly.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#if FEATURE_APPDOMAIN +#if NETFRAMEWORK && FEATURE_APPDOMAIN using System; using System.Diagnostics; @@ -11,20 +11,25 @@ using System.Runtime.InteropServices.ComTypes; using System.Security; -using Microsoft.Build.Framework; using Microsoft.Build.Shared; using Microsoft.Build.Shared.FileSystem; using Microsoft.Build.Utilities; +#endif + +using Microsoft.Build.Framework; + #nullable disable namespace Microsoft.Build.Tasks { +#if NETFRAMEWORK && FEATURE_APPDOMAIN + /// /// Registers a managed assembly for COM interop (equivalent of regasm.exe functionality, but this code doesn't actually call the exe). /// /// ITypeLibExporterNotifySink is necessary for the ITypeLibConverter.ConvertAssemblyToTypeLib call. - public class RegisterAssembly : AppDomainIsolatedTaskExtension, ITypeLibExporterNotifySink + public class RegisterAssembly : AppDomainIsolatedTaskExtension, ITypeLibExporterNotifySink, IRegisterAssemblyTaskContract { #region Properties @@ -360,5 +365,41 @@ private bool ExportTypeLib(Assembly asm, string typeLibFileName) #endregion } -} + +#elif !NETFRAMEWORK + + public sealed class RegisterAssembly : TaskRequiresFramework, IRegisterAssemblyTaskContract + { + public RegisterAssembly() + : base(nameof(RegisterAssembly)) + { + } + + #region Properties + + public ITaskItem[] Assemblies { get; set; } + + [Output] + public ITaskItem[] TypeLibFiles { get; set; } + + public bool CreateCodeBase { get; set; } + + public ITaskItem AssemblyListFile { get; set; } + + #endregion + } + #endif + + internal interface IRegisterAssemblyTaskContract + { + #region Properties + + ITaskItem[] Assemblies { get; set; } + ITaskItem[] TypeLibFiles { get; set; } + bool CreateCodeBase { get; set; } + ITaskItem AssemblyListFile { get; set; } + + #endregion + } +} diff --git a/src/Tasks/ResolveComReference.cs b/src/Tasks/ResolveComReference.cs index 0a3eb949eef..a9fcee543f6 100644 --- a/src/Tasks/ResolveComReference.cs +++ b/src/Tasks/ResolveComReference.cs @@ -139,8 +139,13 @@ internal interface IResolveComReferenceTaskContract /// /// Main class for the COM reference resolution task for .NET Core /// - public sealed partial class ResolveComReference : Microsoft.Build.Tasks.TaskExtension, IResolveComReferenceTaskContract + public sealed partial class ResolveComReference : TaskRequiresFramework, IResolveComReferenceTaskContract { + public ResolveComReference() + : base(nameof(ResolveComReference)) + { + } + #pragma warning disable format // region formatting is different in net7.0 and net472, and cannot be fixed for both #region Properties @@ -183,20 +188,6 @@ public sealed partial class ResolveComReference : Microsoft.Build.Tasks.TaskExte public string TargetFrameworkVersion { get; set; } = String.Empty; #endregion - - #region ITask members - - /// - /// Task entry point. - /// - /// - public override bool Execute() - { - Log.LogErrorWithCodeFromResources("TaskRequiresFrameworkFailure", nameof(ResolveComReference)); - return false; - } - - #endregion #pragma warning restore format } diff --git a/src/Tasks/ResolveNativeReference.cs b/src/Tasks/ResolveNativeReference.cs index 66a5ac3c70b..484401442be 100644 --- a/src/Tasks/ResolveNativeReference.cs +++ b/src/Tasks/ResolveNativeReference.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. +#if NETFRAMEWORK using System; using System.IO; using System.Collections; @@ -9,20 +10,25 @@ using System.Diagnostics; #endif using System.Linq; -using Microsoft.Build.Framework; + using Microsoft.Build.Shared; using Microsoft.Build.Shared.FileSystem; using Microsoft.Build.Tasks.Deployment.ManifestUtilities; using Microsoft.Build.Utilities; +#endif + +using Microsoft.Build.Framework; #nullable disable namespace Microsoft.Build.Tasks { +#if NETFRAMEWORK + /// /// Main class for the native reference resolution task. /// - public class ResolveNativeReference : TaskExtension + public class ResolveNativeReference : TaskExtension, IResolveNativeReferenceTaskConract { #region Constructors @@ -340,4 +346,58 @@ internal bool ExtractFromManifest( } #endregion } + +#else + + public sealed class ResolveNativeReference : TaskRequiresFramework, IResolveNativeReferenceTaskConract + { + public ResolveNativeReference() + : base(nameof(ResolveNativeReference)) + { + } + + #region Properties + + public ITaskItem[] NativeReferences { get; set; } + + public string[] AdditionalSearchPaths { get; set; } + + [Output] + public ITaskItem[] ContainingReferenceFiles { get; set; } + + [Output] + public ITaskItem[] ContainedPrerequisiteAssemblies { get; set; } + + [Output] + public ITaskItem[] ContainedComComponents { get; set; } + + [Output] + public ITaskItem[] ContainedTypeLibraries { get; set; } + + [Output] + public ITaskItem[] ContainedLooseTlbFiles { get; set; } + + [Output] + public ITaskItem[] ContainedLooseEtcFiles { get; set; } + + #endregion + } + +#endif + + internal interface IResolveNativeReferenceTaskConract + { + #region Properties + + ITaskItem[] NativeReferences { get; set; } + string[] AdditionalSearchPaths { get; set; } + ITaskItem[] ContainingReferenceFiles { get; set; } + ITaskItem[] ContainedPrerequisiteAssemblies { get; set; } + ITaskItem[] ContainedComComponents { get; set; } + ITaskItem[] ContainedTypeLibraries { get; set; } + ITaskItem[] ContainedLooseTlbFiles { get; set; } + ITaskItem[] ContainedLooseEtcFiles { get; set; } + + #endregion + } } diff --git a/src/Tasks/TaskRequiresFramework.cs b/src/Tasks/TaskRequiresFramework.cs new file mode 100644 index 00000000000..e681eb903b5 --- /dev/null +++ b/src/Tasks/TaskRequiresFramework.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + + +using System; + +namespace Microsoft.Build.Tasks +{ +#if NETFRAMEWORK + [Obsolete("The class should not be used in .Net Framework.", true)] +#endif + public abstract class TaskRequiresFramework : TaskExtension + { + internal TaskRequiresFramework(string taskName) => TaskName = taskName; + + private string TaskName { get; set; } + +#if !NETFRAMEWORK + /// + /// Task entry point. + /// + /// + public override bool Execute() + { + Log.LogErrorWithCodeFromResources("TaskRequiresFrameworkFailure", TaskName); + return false; + } +#endif + } +} diff --git a/src/Tasks/UnregisterAssembly.cs b/src/Tasks/UnregisterAssembly.cs index 4c297df27fd..6721625deb5 100644 --- a/src/Tasks/UnregisterAssembly.cs +++ b/src/Tasks/UnregisterAssembly.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#if FEATURE_APPDOMAIN +#if NETFRAMEWORK && FEATURE_APPDOMAIN using System; #if DEBUG @@ -14,19 +14,23 @@ using System.Threading; using System.Runtime.InteropServices.ComTypes; -using Microsoft.Build.Framework; using Microsoft.Build.Shared; using Microsoft.Build.Shared.FileSystem; +#endif + +using Microsoft.Build.Framework; #nullable disable namespace Microsoft.Build.Tasks { +#if NETFRAMEWORK && FEATURE_APPDOMAIN + /// /// Registers a managed assembly for COM interop (equivalent of regasm.exe functionality, but this code /// doesn't actually call the exe). /// - public class UnregisterAssembly : AppDomainIsolatedTaskExtension + public class UnregisterAssembly : AppDomainIsolatedTaskExtension, IUnregisterAssemblyTaskContract { #region Properties @@ -289,5 +293,37 @@ private bool Unregister(string assemblyPath, string typeLibPath) private const string unregisteringLockName = "MSBUILD_V_3_5_UNREGISTER_LOCK"; #endregion } -} + +#elif !NETFRAMEWORK + + public sealed class UnregisterAssembly : TaskRequiresFramework, IUnregisterAssemblyTaskContract + { + public UnregisterAssembly() + : base(nameof(UnregisterAssembly)) + { + } + + #region Properties + + public ITaskItem[] Assemblies { get; set; } + + public ITaskItem[] TypeLibFiles { get; set; } + + public ITaskItem AssemblyListFile { get; set; } + + #endregion + } + #endif + + public interface IUnregisterAssemblyTaskContract + { + #region Properties + + ITaskItem[] Assemblies { get; set; } + ITaskItem[] TypeLibFiles { get; set; } + ITaskItem AssemblyListFile { get; set; } + + #endregion + } +} diff --git a/src/Tasks/UpdateManifest.cs b/src/Tasks/UpdateManifest.cs index 0e9e78bef9c..109f7ee732c 100644 --- a/src/Tasks/UpdateManifest.cs +++ b/src/Tasks/UpdateManifest.cs @@ -2,17 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Build.Framework; + +#if NETFRAMEWORK using Microsoft.Build.Tasks.Deployment.ManifestUtilities; using Microsoft.Build.Utilities; +#endif #nullable disable namespace Microsoft.Build.Tasks { +#if NETFRAMEWORK + /// /// Updates selected properties in a manifest and resigns. /// - public class UpdateManifest : Task + public class UpdateManifest : Task, IUpdateManifestTaskContract { [Required] public string ApplicationPath { get; set; } @@ -35,4 +40,44 @@ public override bool Execute() return true; } } + +#else + + public sealed class UpdateManifest : TaskRequiresFramework, IUpdateManifestTaskContract + { + public UpdateManifest() + : base(nameof(UpdateManifest)) + { + } + + #region Properties + + public string ApplicationPath { get; set; } + + public string TargetFrameworkVersion { get; set; } + + public ITaskItem ApplicationManifest { get; set; } + + public ITaskItem InputManifest { get; set; } + + [Output] + public ITaskItem OutputManifest { get; set; } + + #endregion + } + +#endif + + internal interface IUpdateManifestTaskContract + { + #region Properties + + string ApplicationPath { get; set; } + string TargetFrameworkVersion { get; set; } + ITaskItem ApplicationManifest { get; set; } + ITaskItem InputManifest { get; set; } + ITaskItem OutputManifest { get; set; } + + #endregion + } } diff --git a/src/Tasks/WinMDExp.cs b/src/Tasks/WinMDExp.cs index 28e2662c997..280b5dcb55c 100644 --- a/src/Tasks/WinMDExp.cs +++ b/src/Tasks/WinMDExp.cs @@ -1,21 +1,28 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#if NETFRAMEWORK using System; -using System.Diagnostics.CodeAnalysis; using System.IO; using System.Text; -using Microsoft.Build.Framework; + using Microsoft.Build.Shared; +#endif + +using System.Diagnostics.CodeAnalysis; + +using Microsoft.Build.Framework; #nullable disable namespace Microsoft.Build.Tasks { +#if NETFRAMEWORK + /// /// Exports a managed assembly to a windows runtime metadata. /// - public class WinMDExp : ToolTaskExtension + public class WinMDExp : ToolTaskExtension, IWinMDExpTaskContract { #region Properties @@ -274,4 +281,66 @@ protected override bool SkipTaskExecution() } #endregion } + +#else + + public sealed class WinMDExp : TaskRequiresFramework, IWinMDExpTaskContract + { + public WinMDExp() + : base(nameof(WinMDExp)) + { + } + + #region Properties + + public ITaskItem[] References { get; set; } + + public string DisabledWarnings { get; set; } + + public string InputDocumentationFile { get; set; } + + public string OutputDocumentationFile { get; set; } + + public string InputPDBFile { get; set; } + + public string OutputPDBFile { get; set; } + + public string WinMDModule { get; set; } + + [Output] + public string OutputWindowsMetadataFile { get; set; } + + public string SdkToolsPath { get; set; } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "UTF", Justification = "Not worth breaking customers because of case correction")] + public bool UTF8Output { get; set; } + + public bool TreatWarningsAsErrors { get; set; } + + public string AssemblyUnificationPolicy { get; set; } + + #endregion + } + +#endif + + internal interface IWinMDExpTaskContract + { + #region Properties + + ITaskItem[] References { get; set; } + string DisabledWarnings { get; set; } + string InputDocumentationFile { get; set; } + string OutputDocumentationFile { get; set; } + string InputPDBFile { get; set; } + string OutputPDBFile { get; set; } + string WinMDModule { get; set; } + string OutputWindowsMetadataFile { get; set; } + string SdkToolsPath { get; set; } + bool UTF8Output { get; set; } + bool TreatWarningsAsErrors { get; set; } + string AssemblyUnificationPolicy { get; set; } + + #endregion + } }