diff --git a/NuGet.config b/NuGet.config index 39f7e43b085..a2d178728ef 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,6 +3,14 @@ + + + + + + + + @@ -13,5 +21,14 @@ - + + + + + + + + + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4efa81113a0..5e650c5f565 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,7 +34,7 @@ resources: - repository: 1ESPipelineTemplates type: git name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release + ref: refs/tags/release-2025-07-08-1 extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b637a5d5d13..bd28bb174fd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,189 +1,189 @@ - - https://github.com/dotnet/winforms - 7006c1c2c5515bc4b648e5b3c2ea6a604867e0b9 + + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms + 3bcdfce6d4b5e6825ae33f1e464b73264e36017f - - https://github.com/dotnet/winforms - 7006c1c2c5515bc4b648e5b3c2ea6a604867e0b9 + + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms + 3bcdfce6d4b5e6825ae33f1e464b73264e36017f - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int - 0f7df5b8bcc4fad64fde43267ddf3d26a56cf69f + be75c1a5d6efbe1cfb373aa757c06550ca388883 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/runtime - 4985021ebfff545de02caa3386e3dd4b21784b95 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + fa7cdded37981a97cec9a3e233c4a6af58a91c57 - - https://github.com/dotnet/winforms - 7006c1c2c5515bc4b648e5b3c2ea6a604867e0b9 + + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms + 3bcdfce6d4b5e6825ae33f1e464b73264e36017f - + https://github.com/dotnet/arcade - 610e251fc34686333b98188320ca1eecd7e6af6c + 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80 - + https://github.com/dotnet/arcade - 610e251fc34686333b98188320ca1eecd7e6af6c + 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80 - + https://github.com/dotnet/arcade - 610e251fc34686333b98188320ca1eecd7e6af6c + 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80 https://github.com/dotnet/arcade f4e11a15c7b8a949d4a366e792a9843ff6e88cd5 - + https://github.com/dotnet/arcade - 610e251fc34686333b98188320ca1eecd7e6af6c + 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80 https://github.com/dotnet/sourcelink diff --git a/eng/Versions.props b/eng/Versions.props index 1cdd2138fc3..a2748f95b4d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -3,9 +3,10 @@ 9 0 - 0 - rc - 1 + 12 + rtm + + $(MajorVersion).$(MinorVersion).$(PatchVersion) - 9.0.0-rc.1.24407.3 + 9.0.11-servicing.25519.1 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24407.3 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 + 9.0.11-servicing.25517.16 + 9.0.11 + 9.0.11 + 9.0.11-servicing.25517.16 + 9.0.11 + 9.0.11 + 9.0.11 + 9.0.11 + 9.0.11 + 9.0.11 + 9.0.11 + 9.0.11 4.6.0-preview4.19176.11 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 - 9.0.0-rc.1.24406.14 + 9.0.11 + 9.0.11 + 9.0.11 + 9.0.11 + 9.0.11 - 7.0.0-preview-20221010.1 + 9.0.0-preview-20241010.1 9.0.0-beta.24053.1 - 9.0.0-beta.24408.1 + 9.0.0-beta.25562.4 @@ -120,6 +121,6 @@ System.Reflection.MetadataLoadContext - 9.0.0-rc.1.24407.6 + 9.0.0-rtm.25562.7 diff --git a/eng/WpfArcadeSdk/Sdk/Sdk.props b/eng/WpfArcadeSdk/Sdk/Sdk.props index 7286211535f..6d00a6ab758 100644 --- a/eng/WpfArcadeSdk/Sdk/Sdk.props +++ b/eng/WpfArcadeSdk/Sdk/Sdk.props @@ -15,7 +15,7 @@ $(WpfArcadeSdkToolsDir)GenXmlStringTable.pl preview - 11 + 12 true true diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 2b0a5c9e665..792b60b49d4 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -10,8 +10,8 @@ # displayName: Setup Private Feeds Credentials # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 +# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) # @@ -157,7 +157,7 @@ if ($dotnet31Source -ne $null) { AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password } -$dotnetVersions = @('5','6','7','8') +$dotnetVersions = @('5','6','7','8','9') foreach ($dotnetVersion in $dotnetVersions) { $feedPrefix = "dotnet" + $dotnetVersion; diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index b493479a1da..facb415ca6f 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -11,8 +11,8 @@ # - task: Bash@3 # displayName: Setup Internal Feeds # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $(Build.SourcesDirectory)/NuGet.config +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh +# arguments: $(System.DefaultWorkingDirectory)/NuGet.config # condition: ne(variables['Agent.OS'], 'Windows_NT') # - task: NuGetAuthenticate@1 # @@ -99,7 +99,7 @@ if [ "$?" == "0" ]; then PackageSources+=('dotnet3.1-internal-transport') fi -DotNetVersions=('5' '6' '7' '8') +DotNetVersions=('5' '6' '7' '8' '9') for DotNetVersion in ${DotNetVersions[@]} ; do FeedPrefix="dotnet${DotNetVersion}"; diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index c732bee9f4a..8da43d3b583 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -19,6 +19,7 @@ parameters: # publishing defaults artifacts: '' enableMicrobuild: false + microbuildUseESRP: true enablePublishBuildArtifacts: false enablePublishBuildAssets: false enablePublishTestResults: false @@ -33,11 +34,6 @@ parameters: artifactPublishSteps: [] runAsPublic: false -# Sbom related params - enableSbom: true - PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' - # 1es specific parameters is1ESPipeline: '' @@ -139,6 +135,11 @@ jobs: signType: $(_SignType) zipSources: false feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + ${{ if eq(parameters.microbuildUseESRP, true) }}: + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea + ${{ else }}: + ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca env: TeamName: $(_TeamName) MicroBuildOutputFolderOverride: '$(Agent.TempDirectory)' @@ -165,7 +166,7 @@ jobs: inputs: languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'internal') }} - richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin + richNavLogOutputDirectory: $(System.DefaultWorkingDirectory)/artifacts/bin uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} continueOnError: true @@ -188,7 +189,7 @@ jobs: inputs: testResultsFormat: 'xUnit' testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -199,7 +200,7 @@ jobs: inputs: testResultsFormat: 'VSTest' testResultsFiles: '*.trx' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -243,7 +244,7 @@ jobs: - task: CopyFiles@2 displayName: Gather buildconfiguration for build retry inputs: - SourceFolder: '$(Build.SourcesDirectory)/eng/common/BuildConfiguration' + SourceFolder: '$(System.DefaultWorkingDirectory)/eng/common/BuildConfiguration' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration' continueOnError: true diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 00feec8ebbc..edefa789d36 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -8,7 +8,7 @@ parameters: CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex GithubPat: $(BotAccount-dotnet-bot-repo-PAT) - SourcesDirectory: $(Build.SourcesDirectory) + SourcesDirectory: $(System.DefaultWorkingDirectory) CreatePr: true AutoCompletePr: false ReusePr: true @@ -68,7 +68,7 @@ jobs: - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: - task: Powershell@2 inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1 arguments: $(_GenerateLocProjectArguments) displayName: Generate LocProject.json condition: ${{ parameters.condition }} @@ -115,7 +115,7 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} args: displayName: Publish LocProject.json - pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/' + pathToPublish: '$(System.DefaultWorkingDirectory)/eng/Localize/' publishLocation: Container artifactName: Loc condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 3d3356e3196..6b5ff28cc70 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -32,6 +32,10 @@ parameters: is1ESPipeline: '' + repositoryAlias: self + + officialBuildId: '' + jobs: - job: Asset_Registry_Publish @@ -54,6 +58,11 @@ jobs: value: false # unconditional - needed for logs publishing (redactor tool version) - template: /eng/common/core-templates/post-build/common-variables.yml + - name: OfficialBuildId + ${{ if ne(parameters.officialBuildId, '') }}: + value: ${{ parameters.officialBuildId }} + ${{ else }}: + value: $(Build.BuildNumber) pool: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) @@ -72,7 +81,7 @@ jobs: - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - checkout: self + - checkout: ${{ parameters.repositoryAlias }} fetchDepth: 3 clean: true @@ -93,12 +102,12 @@ jobs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1 arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:OfficialBuildId=$(Build.BuildNumber) + /p:OfficialBuildId=$(OfficialBuildId) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} @@ -113,7 +122,7 @@ jobs: Add-Content -Path $filePath -Value "$(DefaultChannels)" Add-Content -Path $filePath -Value $(IsStableBuild) - $symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt" + $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt" if (Test-Path -Path $symbolExclusionfile) { Write-Host "SymbolExclusionFile exists" @@ -136,13 +145,18 @@ jobs: PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} is1ESPipeline: ${{ parameters.is1ESPipeline }} + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion 3 diff --git a/eng/common/core-templates/job/source-build.yml b/eng/common/core-templates/job/source-build.yml index c4713c8b6ed..5baedac1e03 100644 --- a/eng/common/core-templates/job/source-build.yml +++ b/eng/common/core-templates/job/source-build.yml @@ -26,11 +26,16 @@ parameters: # Specifies the build script to invoke to perform the build in the repo. The default # './build.sh' should work for typical Arcade repositories, but this is customizable for # difficult situations. + # buildArguments: '' + # Specifies additional build arguments to pass to the build script. # jobProperties: {} # A list of job properties to inject at the top level, for potential extensibility beyond # container and pool. platform: {} + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: '' # If set to true and running on a non-public project, @@ -91,3 +96,4 @@ jobs: parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} platform: ${{ parameters.platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml index 205fb5b3a39..662b9fcce15 100644 --- a/eng/common/core-templates/job/source-index-stage1.yml +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -1,7 +1,7 @@ parameters: runAsPublic: false - sourceIndexUploadPackageVersion: 2.0.0-20240522.1 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1 + sourceIndexUploadPackageVersion: 2.0.0-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] @@ -66,7 +66,7 @@ jobs: - script: ${{ parameters.sourceIndexBuildCommand }} displayName: Build Repository - - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output + - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output displayName: Process Binlog into indexable sln - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml index f2144252cc6..4571a7864df 100644 --- a/eng/common/core-templates/jobs/codeql-build.yml +++ b/eng/common/core-templates/jobs/codeql-build.yml @@ -25,7 +25,7 @@ jobs: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config - name: GuardianVersion value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml index ea69be4341c..bf33cdc2cc7 100644 --- a/eng/common/core-templates/jobs/jobs.yml +++ b/eng/common/core-templates/jobs/jobs.yml @@ -43,6 +43,8 @@ parameters: artifacts: {} is1ESPipeline: '' + repositoryAlias: self + officialBuildId: '' # Internal resources (telemetry, microbuild) can only be accessed from non-public projects, # and some (Microbuild) should only be applied to non-PR cases for internal builds. @@ -117,3 +119,5 @@ jobs: enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} + repositoryAlias: ${{ parameters.repositoryAlias }} + officialBuildId: ${{ parameters.officialBuildId }} diff --git a/eng/common/core-templates/jobs/source-build.yml b/eng/common/core-templates/jobs/source-build.yml index a10ccfbee6d..0b408a67bd5 100644 --- a/eng/common/core-templates/jobs/source-build.yml +++ b/eng/common/core-templates/jobs/source-build.yml @@ -21,6 +21,9 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: '' # If set to true and running on a non-public project, @@ -47,6 +50,7 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: @@ -55,4 +59,5 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index 454fd75c7af..221d1ac6de1 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -44,6 +44,11 @@ parameters: displayName: Publish installers and checksums type: boolean default: true + + - name: requireDefaultChannels + displayName: Fail the build if there are no default channel(s) registrations for the current build + type: boolean + default: false - name: SDLValidationParameters type: object @@ -144,7 +149,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - job: @@ -201,7 +206,7 @@ stages: filePath: eng\common\sdk-task.ps1 arguments: -task SigningValidation -restore -msbuildEngine vs /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' + /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' ${{ parameters.signingValidationAdditionalParameters }} - template: /eng/common/core-templates/steps/publish-logs.yml @@ -251,7 +256,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1 arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Extract/ -GHRepoName $(Build.Repository.Name) @@ -300,17 +305,23 @@ stages: - task: NuGetAuthenticate@1 + # Darc is targeting 8.0, so make sure it's installed + - task: UseDotNet@2 + inputs: + version: 8.0.x + - task: AzureCLI@2 displayName: Publish Using Darc inputs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(System.AccessToken)' -WaitPublishingFinish true + -RequireDefaultChannels ${{ parameters.requireDefaultChannels }} -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml index f7602980dbe..a7abd58c4bb 100644 --- a/eng/common/core-templates/post-build/setup-maestro-vars.yml +++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -36,7 +36,7 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - . $(Build.SourcesDirectory)\eng\common\tools.ps1 + . $(System.DefaultWorkingDirectory)\eng\common\tools.ps1 $darc = Get-Darc $buildInfo = & $darc get-build ` --id ${{ parameters.BARBuildId }} ` diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml index 64f881bffc3..4085512b690 100644 --- a/eng/common/core-templates/steps/enable-internal-sources.yml +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -17,8 +17,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token env: Token: ${{ parameters.legacyCredential }} # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. @@ -29,8 +29,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config - ${{ else }}: - template: /eng/common/templates/steps/get-federated-access-token.yml parameters: @@ -39,8 +39,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) # This is required in certain scenarios to install the ADO credential provider. # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others # (e.g. dotnet msbuild). diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index d938b60e1bb..7f5b84c4cb8 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -6,7 +6,7 @@ parameters: PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' PackageName: '.NET' ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom IgnoreDirectories: '' @@ -38,7 +38,7 @@ steps: PackageName: ${{ parameters.packageName }} BuildDropPath: ${{ parameters.buildDropPath }} PackageVersion: ${{ parameters.packageVersion }} - ManifestDirPath: ${{ parameters.manifestDirPath }} + ManifestDirPath: ${{ parameters.manifestDirPath }}/$(ARTIFACT_NAME) ${{ if ne(parameters.IgnoreDirectories, '') }}: AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}' diff --git a/eng/common/core-templates/steps/get-delegation-sas.yml b/eng/common/core-templates/steps/get-delegation-sas.yml index d2901470a7f..9db5617ea7d 100644 --- a/eng/common/core-templates/steps/get-delegation-sas.yml +++ b/eng/common/core-templates/steps/get-delegation-sas.yml @@ -31,7 +31,16 @@ steps: # Calculate the expiration of the SAS token and convert to UTC $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") - $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + # Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads + # of correlation payloads. https://github.com/dotnet/dnceng/issues/3484 + $sas = "" + do { + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + } while($sas.IndexOf('/') -ne -1) if ($LASTEXITCODE -ne 0) { Write-Error "Failed to generate SAS token." diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index 80788c52319..0623ac6e112 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -12,22 +12,22 @@ steps: inputs: targetType: inline script: | - New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ continueOnError: true condition: always() - task: PowerShell@2 displayName: Redact Logs inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/redact-logs.ps1 # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml - # Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' # If the file exists - sensitive data for redaction will be sourced from it # (single entry per line, lines starting with '# ' are considered comments and skipped) - arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs' + arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' -BinlogToolVersion ${{parameters.BinlogToolVersion}} - -TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' '$(publishing-dnceng-devdiv-code-r-build-re)' '$(MaestroAccessToken)' '$(dn-bot-all-orgs-artifact-feeds-rw)' @@ -42,7 +42,7 @@ steps: - task: CopyFiles@2 displayName: Gather post build logs inputs: - SourceFolder: '$(Build.SourcesDirectory)/PostBuildLogs' + SourceFolder: '$(System.DefaultWorkingDirectory)/PostBuildLogs' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index 2915d29bb7f..0718e4ba902 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -11,6 +11,10 @@ parameters: # for details. The entire object is described in the 'job' template for simplicity, even though # the usage of the properties on this object is split between the 'job' and 'steps' templates. platform: {} + + # Optional list of directories to ignore for component governance scans. + componentGovernanceIgnoreDirectories: [] + is1ESPipeline: false steps: @@ -79,6 +83,7 @@ steps: ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ --configuration $buildConfig \ --restore --build --pack $publishArgs -bl \ + ${{ parameters.platform.buildArguments }} \ $officialBuildArgs \ $internalRuntimeDownloadArgs \ $internalRestoreArgs \ @@ -96,7 +101,7 @@ steps: - task: CopyFiles@2 displayName: Prepare BuildLogs staging directory inputs: - SourceFolder: '$(Build.SourcesDirectory)' + SourceFolder: '$(System.DefaultWorkingDirectory)' Contents: | **/*.log **/*.binlog @@ -125,5 +130,8 @@ steps: parameters: displayName: Component Detection (Exclude upstream cache) is1ESPipeline: ${{ parameters.is1ESPipeline }} - componentGovernanceIgnoreDirectories: '$(Build.SourcesDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + ${{ if eq(length(parameters.componentGovernanceIgnoreDirectories), 0) }}: + componentGovernanceIgnoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + ${{ else }}: + componentGovernanceIgnoreDirectories: ${{ join(',', parameters.componentGovernanceIgnoreDirectories) }} disableComponentGovernance: ${{ eq(variables['System.TeamProject'], 'public') }} diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 9a4e285a5ae..9a7ecfbd42c 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -81,7 +81,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") else() set(TOOLCHAIN "riscv64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu/13.1.0") + set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu") endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") @@ -98,7 +98,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -115,7 +115,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") @@ -127,30 +127,25 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "riscv64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/riscv64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() if(ANDROID) @@ -272,21 +267,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") add_toolchain_linker_flag("--target=${TOOLCHAIN}") @@ -297,10 +292,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") diff --git a/eng/common/cross/x64/tizen/tizen.patch b/eng/common/cross/x64/tizen/tizen.patch new file mode 100644 index 00000000000..56fbc881095 --- /dev/null +++ b/eng/common/cross/x64/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib64/libc.so b/usr/lib64/libc.so +--- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf64-x86-64) +-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-x86-64.so.2 ) ) diff --git a/eng/common/cross/x86/tizen/tizen.patch b/eng/common/cross/x86/tizen/tizen.patch new file mode 100644 index 00000000000..f4fe8838ad6 --- /dev/null +++ b/eng/common/cross/x86/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf32-i386) +-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.2 ) ) diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 index 8fda30bdce2..e3374310563 100644 --- a/eng/common/darc-init.ps1 +++ b/eng/common/darc-init.ps1 @@ -1,6 +1,6 @@ param ( $darcVersion = $null, - $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16', + $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20', $verbosity = 'minimal', $toolpath = $null ) diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index c305ae6bd77..36dbd45e1ce 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -2,7 +2,7 @@ source="${BASH_SOURCE[0]}" darcVersion='' -versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16' +versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20' verbosity='minimal' while [[ $# > 0 ]]; do diff --git a/eng/common/generate-sbom-prep.ps1 b/eng/common/generate-sbom-prep.ps1 index 3e5c1c74a1c..a0c7d792a76 100644 --- a/eng/common/generate-sbom-prep.ps1 +++ b/eng/common/generate-sbom-prep.ps1 @@ -4,18 +4,26 @@ Param( . $PSScriptRoot\pipeline-logging-functions.ps1 +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +$ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" +$SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_' +$SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName + +Write-Host "Artifact name before : $ArtifactName" +Write-Host "Artifact name after : $SafeArtifactName" + Write-Host "Creating dir $ManifestDirPath" + # create directory for sbom manifest to be placed -if (!(Test-Path -path $ManifestDirPath)) +if (!(Test-Path -path $SbomGenerationDir)) { - New-Item -ItemType Directory -path $ManifestDirPath - Write-Host "Successfully created directory $ManifestDirPath" + New-Item -ItemType Directory -path $SbomGenerationDir + Write-Host "Successfully created directory $SbomGenerationDir" } else{ Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." } Write-Host "Updating artifact name" -$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_' -Write-Host "Artifact name $artifact_name" -Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name" +Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName" diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh index d5c76dc827b..b8ecca72bbf 100644 --- a/eng/common/generate-sbom-prep.sh +++ b/eng/common/generate-sbom-prep.sh @@ -14,19 +14,24 @@ done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" . $scriptroot/pipeline-logging-functions.sh + +# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. +artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" +safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" manifest_dir=$1 -if [ ! -d "$manifest_dir" ] ; then - mkdir -p "$manifest_dir" - echo "Sbom directory created." $manifest_dir +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +sbom_generation_dir="$manifest_dir/$safe_artifact_name" + +if [ ! -d "$sbom_generation_dir" ] ; then + mkdir -p "$sbom_generation_dir" + echo "Sbom directory created." $sbom_generation_dir else Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." fi -artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" echo "Artifact name before : "$artifact_name -# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. -safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" echo "Artifact name after : "$safe_artifact_name export ARTIFACT_NAME=$safe_artifact_name echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name" diff --git a/eng/common/internal/NuGet.config b/eng/common/internal/NuGet.config index 19d3d311b16..f70261ed689 100644 --- a/eng/common/internal/NuGet.config +++ b/eng/common/internal/NuGet.config @@ -4,4 +4,7 @@ + + + diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj index e925952d566..feaa6d20812 100644 --- a/eng/common/internal/Tools.csproj +++ b/eng/common/internal/Tools.csproj @@ -4,6 +4,7 @@ net472 false + false @@ -14,16 +15,6 @@ - - - - https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json; - - - $(RestoreSources); - https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json; - - diff --git a/eng/common/post-build/nuget-verification.ps1 b/eng/common/post-build/nuget-verification.ps1 index a365194a938..ac5c69ffcac 100644 --- a/eng/common/post-build/nuget-verification.ps1 +++ b/eng/common/post-build/nuget-verification.ps1 @@ -30,7 +30,7 @@ [CmdletBinding(PositionalBinding = $false)] param( [string]$NuGetExePath, - [string]$PackageSource = "https://api.nuget.org/v3/index.json", + [string]$PackageSource = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json", [string]$DownloadPath, [Parameter(ValueFromRemainingArguments = $true)] [string[]]$args diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 90b58e32a87..a261517ef90 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -5,7 +5,8 @@ param( [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, - [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters + [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters, + [Parameter(Mandatory=$false)][string] $RequireDefaultChannels ) try { @@ -33,6 +34,10 @@ try { if ("false" -eq $WaitPublishingFinish) { $optionalParams.Add("--no-wait") | Out-Null } + + if ("true" -eq $RequireDefaultChannels) { + $optionalParams.Add("--default-channels-required") | Out-Null + } & $darc add-build-to-channel ` --id $buildId ` diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index aab40de3fd9..4f0546dce12 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -64,7 +64,7 @@ try { $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty } if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { - $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.10.0-pre.4.0" -MemberType NoteProperty + $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.12.0" -MemberType NoteProperty } if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 5ef6c30ba92..4bf4cf41bd7 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -50,14 +50,14 @@ extends: - task: CopyFiles@2 displayName: Gather build output inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel' + SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel' ``` Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`). -# Development notes +## Development notes **Folder / file structure** diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 0c2928d5c79..81ea7a261f2 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -1,8 +1,24 @@ +parameters: +# Sbom related params + enableSbom: true + runAsPublic: false + PackageVersion: 9.0.0 + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' + jobs: - template: /eng/common/core-templates/job/job.yml parameters: is1ESPipeline: true + componentGovernanceSteps: + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: + - template: /eng/common/templates/steps/generate-sbom.yml + parameters: + PackageVersion: ${{ parameters.packageVersion }} + BuildDropPath: ${{ parameters.buildDropPath }} + ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom + publishArtifacts: false + # publish artifacts # for 1ES managed templates, use the templateContext.output to handle multiple outputs. templateContext: diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml index dbdd66d4a4b..f1311bbb1b3 100644 --- a/eng/common/templates-official/variables/sdl-variables.yml +++ b/eng/common/templates-official/variables/sdl-variables.yml @@ -4,4 +4,4 @@ variables: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 8da477dd69f..5bdd3dd85fd 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -4,8 +4,9 @@ parameters: componentGovernanceIgnoreDirectories: '' # Sbom related params enableSbom: true + runAsPublic: false PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml @@ -19,71 +20,63 @@ jobs: steps: - ${{ each step in parameters.steps }}: - ${{ step }} - + componentGovernanceSteps: - - template: /eng/common/templates/steps/component-governance.yml - parameters: - ${{ if eq(parameters.disableComponentGovernance, '') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: - disableComponentGovernance: false - ${{ else }}: - disableComponentGovernance: true + - template: /eng/common/templates/steps/component-governance.yml + parameters: + ${{ if eq(parameters.disableComponentGovernance, '') }}: + ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: + disableComponentGovernance: false ${{ else }}: - disableComponentGovernance: ${{ parameters.disableComponentGovernance }} - componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} - - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: - - template: /eng/common/templates/steps/generate-sbom.yml - parameters: - PackageVersion: ${{ parameters.packageVersion }} - BuildDropPath: ${{ parameters.buildDropPath }} - publishArtifacts: false - + disableComponentGovernance: true + ${{ else }}: + disableComponentGovernance: ${{ parameters.disableComponentGovernance }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} artifactPublishSteps: - - ${{ if ne(parameters.artifacts.publish, '') }}: - - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml - parameters: - is1ESPipeline: false - args: - displayName: Publish pipeline artifacts - pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts' - publishLocation: Container - artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} - continueOnError: true - condition: always() - - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml - parameters: - is1ESPipeline: false - args: - targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log' - artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} - displayName: 'Publish logs' - continueOnError: true - condition: always() - sbomEnabled: false # we don't need SBOM for logs - - - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: + - ${{ if ne(parameters.artifacts.publish, '') }}: + - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - template: /eng/common/core-templates/steps/publish-build-artifacts.yml parameters: is1ESPipeline: false args: - displayName: Publish Logs - pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' + displayName: Publish pipeline artifacts + pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts' publishLocation: Container - artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} + artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} continueOnError: true condition: always() - - - ${{ if eq(parameters.enableBuildRetry, 'true') }}: + - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml parameters: is1ESPipeline: false args: - targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration' - artifactName: 'BuildConfiguration' - displayName: 'Publish build retry configuration' + targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log' + artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} + displayName: 'Publish logs' continueOnError: true - sbomEnabled: false # we don't need SBOM for BuildConfiguration + condition: always() + sbomEnabled: false # we don't need SBOM for logs + + - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: false + args: + displayName: Publish Logs + pathToPublish: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' + publishLocation: Container + artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} + continueOnError: true + condition: always() + + - ${{ if eq(parameters.enableBuildRetry, 'true') }}: + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml + parameters: + is1ESPipeline: false + args: + targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration' + artifactName: 'BuildConfiguration' + displayName: 'Publish build retry configuration' + continueOnError: true + sbomEnabled: false # we don't need SBOM for BuildConfiguration diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9574f4eb9df..9b3ad8840fd 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -42,7 +42,7 @@ [bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true } # Enable repos to use a particular version of the on-line dotnet-install scripts. -# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1 +# default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1 [string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' } # True to use global NuGet cache instead of restoring packages to repository-local directory. @@ -262,7 +262,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) { if (!(Test-Path $installScript)) { Create-Directory $dotnetRoot $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit - $uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1" + $uri = "https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1" Retry({ Write-Host "GET $uri" @@ -320,7 +320,7 @@ function InstallDotNet([string] $dotnetRoot, $variations += @($installParameters) $dotnetBuilds = $installParameters.Clone() - $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public" + $dotnetbuilds.AzureFeed = "https://ci.dot.net/public" $variations += @($dotnetBuilds) if ($runtimeSourceFeed) { @@ -383,8 +383,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # If the version of msbuild is going to be xcopied, # use this version. Version matches a package here: - # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.10.0-pre.4.0 - $defaultXCopyMSBuildVersion = '17.10.0-pre.4.0' + # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.12.0 + $defaultXCopyMSBuildVersion = '17.12.0' if (!$vsRequirements) { if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { @@ -416,7 +416,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # Locate Visual Studio installation or download x-copy msbuild. $vsInfo = LocateVisualStudio $vsRequirements - if ($vsInfo -ne $null) { + if ($vsInfo -ne $null -and $env:ForceUseXCopyMSBuild -eq $null) { # Ensure vsInstallDir has a trailing slash $vsInstallDir = Join-Path $vsInfo.installationPath "\" $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] @@ -900,7 +900,7 @@ function IsWindowsPlatform() { } function Get-Darc($version) { - $darcPath = "$TempDir\darc\$(New-Guid)" + $darcPath = "$TempDir\darc\$([guid]::NewGuid())" if ($version -ne $null) { & $PSScriptRoot\darc-init.ps1 -toolpath $darcPath -darcVersion $version | Out-Host } else { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 00473c9f918..01b09b65796 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -54,7 +54,7 @@ warn_as_error=${warn_as_error:-true} use_installed_dotnet_cli=${use_installed_dotnet_cli:-true} # Enable repos to use a particular version of the on-line dotnet-install scripts. -# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh +# default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh dotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'} # True to use global NuGet cache instead of restoring packages to repository-local directory. @@ -232,7 +232,7 @@ function InstallDotNet { local public_location=("${installParameters[@]}") variations+=(public_location) - local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public") + local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public") variations+=(dotnetbuilds) if [[ -n "${6:-}" ]]; then @@ -295,7 +295,7 @@ function with_retries { function GetDotNetInstallScript { local root=$1 local install_script="$root/dotnet-install.sh" - local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh" + local install_script_url="https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh" if [[ ! -a "$install_script" ]]; then mkdir -p "$root" diff --git a/eng/pipeline-pr.yml b/eng/pipeline-pr.yml index 6864cfce5c1..1da03c1a538 100644 --- a/eng/pipeline-pr.yml +++ b/eng/pipeline-pr.yml @@ -198,106 +198,106 @@ jobs: continueOnError: true condition: and(eq(variables['_BuildConfig'], 'Release'), ne(variables['_Platform'], 'arm64')) - - task: PowerShell@2 - displayName: Install .NET Core - inputs: - filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - arguments: -InstallDir $(_programfiles) -Architecture $(_Platform) -Runtime dotnet -Channel 9.0 -Quality daily - condition: eq(variables['_Platform'], 'x64') + # - task: PowerShell@2 + # displayName: Install .NET Core + # inputs: + # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 + # arguments: -InstallDir $(_programfiles) -Architecture $(_Platform) -Runtime dotnet -Channel 9.0 -Quality daily + # condition: eq(variables['_Platform'], 'x64') - - task: PowerShell@2 - displayName: Install .NET Core(x86) - inputs: - filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - arguments: -InstallDir $(_programfilesx86) -Architecture $(_Platform) -Runtime dotnet -Channel 9.0 -Quality daily - condition: eq(variables['_Platform'], 'x86') + # - task: PowerShell@2 + # displayName: Install .NET Core(x86) + # inputs: + # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 + # arguments: -InstallDir $(_programfilesx86) -Architecture $(_Platform) -Runtime dotnet -Channel 9.0 -Quality daily + # condition: eq(variables['_Platform'], 'x86') - - task: PowerShell@2 - displayName: Install .NET WindowsDesktop - inputs: - filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - arguments: -InstallDir $(_programfiles) -Architecture $(_Platform) -Runtime windowsdesktop -Channel 9.0 -Quality daily - condition: eq(variables['_Platform'], 'x64') + # - task: PowerShell@2 + # displayName: Install .NET WindowsDesktop + # inputs: + # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 + # arguments: -InstallDir $(_programfiles) -Architecture $(_Platform) -Runtime windowsdesktop -Channel 9.0 -Quality daily + # condition: eq(variables['_Platform'], 'x64') - - task: PowerShell@2 - displayName: Install .NET WindowsDesktop(x86) - inputs: - filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - arguments: -InstallDir $(_programfilesx86) -Architecture $(_Platform) -Runtime windowsdesktop -Channel 9.0 -Quality daily - condition: eq(variables['_Platform'], 'x86') + # - task: PowerShell@2 + # displayName: Install .NET WindowsDesktop(x86) + # inputs: + # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 + # arguments: -InstallDir $(_programfilesx86) -Architecture $(_Platform) -Runtime windowsdesktop -Channel 9.0 -Quality daily + # condition: eq(variables['_Platform'], 'x86') - - task: PowerShell@2 - displayName: Replace WPF binaries - inputs: - targetType: 'inline' - script: '.\eng\copy-wpf.ps1 -testhost -destination .dotnet -$(_BuildConfig) -arch $(_Platform)' - condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) + # - task: PowerShell@2 + # displayName: Replace WPF binaries + # inputs: + # targetType: 'inline' + # script: '.\eng\copy-wpf.ps1 -testhost -destination .dotnet -$(_BuildConfig) -arch $(_Platform)' + # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - task: DownloadPipelineArtifact@2 - displayName: Fetch Test Binaries - inputs: - buildType: 'specific' - project: 'cbb18261-c48f-4abb-8651-8cdcb5474649' - pipeline: '81' - buildVersionToDownload: 'latestFromBranch' - branchName: 'refs/heads/main' - downloadPath: '$(System.ArtifactsDirectory)\testbinzip\' - checkDownloadedFiles: true - artifactName: Tests.$(_BuildConfig).$(_Platform).zip - condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) + # - task: DownloadPipelineArtifact@2 + # displayName: Fetch Test Binaries + # inputs: + # buildType: 'specific' + # project: 'cbb18261-c48f-4abb-8651-8cdcb5474649' + # pipeline: '81' + # buildVersionToDownload: 'latestFromBranch' + # branchName: 'refs/heads/main' + # downloadPath: '$(System.ArtifactsDirectory)\testbinzip\' + # checkDownloadedFiles: true + # artifactName: Tests.$(_BuildConfig).$(_Platform).zip + # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - task: ExtractFiles@1 - displayName: Extract Test Bins - inputs: - archiveFilePatterns: '$(System.ArtifactsDirectory)\testbinzip\*.zip' - destinationFolder: '$(System.ArtifactsDirectory)\testbins' - cleanDestinationFolder: true - overwriteExistingFiles: true - condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) + # - task: ExtractFiles@1 + # displayName: Extract Test Bins + # inputs: + # archiveFilePatterns: '$(System.ArtifactsDirectory)\testbinzip\*.zip' + # destinationFolder: '$(System.ArtifactsDirectory)\testbins' + # cleanDestinationFolder: true + # overwriteExistingFiles: true + # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - task: PowerShell@2 - displayName: Run Tests - inputs: - targetType: 'inline' - script: '.\CIRunDrts.cmd' - workingDirectory: '$(System.ArtifactsDirectory)\testbins' - condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) + # - task: PowerShell@2 + # displayName: Run Tests + # inputs: + # targetType: 'inline' + # script: '.\CIRunDrts.cmd' + # workingDirectory: '$(System.ArtifactsDirectory)\testbins' + # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - task: CopyFiles@2 - inputs: - SourceFolder: 'C:\Users\cloudtest\AppData\Roaming\QualityVault\Run\Report\' - Contents: '**' - TargetFolder: '$(System.DefaultWorkingDirectory)\Results\' - CleanTargetFolder: true - OverWrite: true - condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release')) + # - task: CopyFiles@2 + # inputs: + # SourceFolder: 'C:\Users\cloudtest\AppData\Roaming\QualityVault\Run\Report\' + # Contents: '**' + # TargetFolder: '$(System.DefaultWorkingDirectory)\Results\' + # CleanTargetFolder: true + # OverWrite: true + # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release')) - - task: CopyFiles@2 - inputs: - SourceFolder: 'C:\Users\cloudtest\AppData\Roaming\QualityVault\Run\Report\' - Contents: '**' - TargetFolder: '$(System.DefaultWorkingDirectory)\ResultsX86\' - CleanTargetFolder: true - OverWrite: true - condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release')) + # - task: CopyFiles@2 + # inputs: + # SourceFolder: 'C:\Users\cloudtest\AppData\Roaming\QualityVault\Run\Report\' + # Contents: '**' + # TargetFolder: '$(System.DefaultWorkingDirectory)\ResultsX86\' + # CleanTargetFolder: true + # OverWrite: true + # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release')) - - task: PublishPipelineArtifact@1 - inputs: - artifactName: 'TestResultsX64' - targetPath: '$(System.DefaultWorkingDirectory)\Results\' - condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release')) + # - task: PublishPipelineArtifact@1 + # inputs: + # artifactName: 'TestResultsX64' + # targetPath: '$(System.DefaultWorkingDirectory)\Results\' + # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release')) - - task: PublishPipelineArtifact@1 - inputs: - artifactName: 'TestResultsX86' - targetPath: '$(System.DefaultWorkingDirectory)\ResultsX86\' - condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release')) + # - task: PublishPipelineArtifact@1 + # inputs: + # artifactName: 'TestResultsX86' + # targetPath: '$(System.DefaultWorkingDirectory)\ResultsX86\' + # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release')) - - task: PublishTestResults@2 - inputs: - testResultsFormat: 'XUnit' - testResultsFiles: 'testResults.xml' - searchFolder: '$(System.DefaultWorkingDirectory)\Results\' - testRunTitle: 'Test results' - mergeTestResults: true - condition: eq(variables['System.TeamProject'], 'public') + # - task: PublishTestResults@2 + # inputs: + # testResultsFormat: 'XUnit' + # testResultsFiles: 'testResults.xml' + # searchFolder: '$(System.DefaultWorkingDirectory)\Results\' + # testRunTitle: 'Test results' + # mergeTestResults: true + # condition: eq(variables['System.TeamProject'], 'public') diff --git a/eng/pipeline.yml b/eng/pipeline.yml index 0504a9d5bbb..2b78b7eaab2 100644 --- a/eng/pipeline.yml +++ b/eng/pipeline.yml @@ -27,10 +27,10 @@ jobs: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: NetCore-Public - demands: ImageOverride -equals windows.vs2022preview.amd64.Open + demands: ImageOverride -equals windows.vs2022.amd64.Open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022preview.amd64 + demands: ImageOverride -equals windows.vs2022.amd64 helixRepo: $(repoName) jobs: - job: Windows_NT @@ -38,10 +38,10 @@ jobs: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: NetCore-Public - demands: ImageOverride -equals windows.vs2022preview.amd64.Open + demands: ImageOverride -equals windows.vs2022.amd64.Open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022preview.amd64 + demands: ImageOverride -equals windows.vs2022.amd64 variables: - name: Codeql.Enabled value: true diff --git a/global.json b/global.json index 8024e1f9ac3..841ec6459c7 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "9.0.100-preview.6.24328.19", + "dotnet": "9.0.112", "runtimes": { "dotnet": [ "2.1.7", @@ -12,14 +12,15 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24408.1", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24408.1" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25562.4", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25562.4" }, "sdk": { - "version": "9.0.100-preview.6.24328.19" + "version": "9.0.112" }, "native-tools": { "strawberry-perl": "5.38.0.1", - "net-framework-48-ref-assemblies": "0.0.0.1" + "net-framework-48-ref-assemblies": "0.0.0.1", + "windows-sdk-d3d-redist": "1.0.0" } } diff --git a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref.baseline.txt b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref.baseline.txt index 14616c02482..d4b7ffccb6b 100644 --- a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref.baseline.txt +++ b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref.baseline.txt @@ -41,7 +41,6 @@ CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'S CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.ResourceDictionary.DeferrableContent' changed from '[DesignerSerializationVisibilityAttribute(0)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]' in the implementation. CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.ResourceDictionary.Source' changed from '[DesignerSerializationVisibilityAttribute(0)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]' in the implementation. CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Setter.Property' changed from '[LocalizabilityAttribute(0, Modifiability=0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Modifiability=Modifiability.Unmodifiable, Readability=Readability.Unreadable)]' in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' exists on 'System.Windows.Setter.Value' in the contract but not the implementation. CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Setter.Value' changed from '[LocalizabilityAttribute(0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)]' in the implementation. CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.SetterBase' changed from '[LocalizabilityAttribute(16)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.Ignore)]' in the implementation. CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.StaticResourceExtension' changed from '[LocalizabilityAttribute(17)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]' in the implementation. @@ -262,4 +261,4 @@ CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVi CannotChangeAttribute : Attribute 'System.Windows.Markup.DesignerSerializationOptionsAttribute' on 'System.Windows.Markup.XmlAttributeProperties.GetXmlSpace(System.Windows.DependencyObject)' changed from '[DesignerSerializationOptionsAttribute(1)]' in the contract to '[DesignerSerializationOptionsAttribute(DesignerSerializationOptions.SerializeAsAttribute)]' in the implementation. CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.Media.Animation.Storyboard.GetTarget(System.Windows.DependencyObject)' changed from '[DesignerSerializationVisibilityAttribute(0)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]' in the implementation. CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Shapes.Shape' changed from '[LocalizabilityAttribute(0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)]' in the implementation. -Total Issues: 263 +Total Issues: 262 diff --git a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt index fcc74cf8643..66f72086f77 100644 --- a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt +++ b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt @@ -1 +1,2 @@ +Compat issues with assembly System.Windows.Controls.Ribbon: Total Issues: 0 diff --git a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt index 0e3a75ca1dd..641d6650c27 100644 --- a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt +++ b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt @@ -11,6 +11,7 @@ CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeA CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderFragment' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderFragmentRoot' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderHwndOverride' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderSimple' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IScrollItemProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IScrollProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ISelectionItemProvider' in the contract but not the implementation. @@ -19,9 +20,10 @@ CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeA CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITableItemProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITableProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITextProvider' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITextRangeProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IToggleProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITransformProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IValueProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IVirtualizedItemProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IWindowProvider' in the contract but not the implementation. -Total Issues: 25 +Total Issues: 27 diff --git a/src/Microsoft.DotNet.Wpf/redist/D3DCompiler/D3DCompiler.vcxproj b/src/Microsoft.DotNet.Wpf/redist/D3DCompiler/D3DCompiler.vcxproj index 9dd3c1bb39f..9a7771f5b45 100644 --- a/src/Microsoft.DotNet.Wpf/redist/D3DCompiler/D3DCompiler.vcxproj +++ b/src/Microsoft.DotNet.Wpf/redist/D3DCompiler/D3DCompiler.vcxproj @@ -25,16 +25,18 @@ - $(D3DCompilerDllBaseName)$(D3DCompilerVersion)$(WpfVersionSuffix) - - $(Windows10SdkPath)Redist\D3D\$(Architecture)\$(D3DCompilerDllBaseName)$(D3DCompilerVersion).dll + + + $(RepositoryToolsDir)native\bin\windows-sdk-d3d-redist\1.0.0\D3D\$(Architecture)\$(D3DCompilerDllBaseName)$(D3DCompilerVersion).dll 16.0 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/Fonts/GlobalUserInterface.CompositeFont b/src/Microsoft.DotNet.Wpf/src/PresentationCore/Fonts/GlobalUserInterface.CompositeFont index b41e0c71610..215b71ae385 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/Fonts/GlobalUserInterface.CompositeFont +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/Fonts/GlobalUserInterface.CompositeFont @@ -1745,9 +1745,13 @@ Target = "MingLiU-ExtB" Scale = "1.0" /> + @@ -1790,9 +1794,13 @@ Target = "MingLiU-ExtB" Scale = "1.0" /> + - + - + diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj index 036da859299..e1d7e7744d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj @@ -4,7 +4,8 @@ $(DefineConstants);CORE_NATIVEMETHODS;PRESENTATION_CORE;COMMONDPS $(NoWarn);0618;0436;1058;1705;3001;3002;3003;3009;3024 true - $(NoWarn) + + $(NoWarn);SYSLIB5005 false MS.Internal.PresentationCore None @@ -1464,6 +1465,8 @@ + + diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs index 75b00be3175..bc92460556c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs @@ -200,9 +200,9 @@ private void InvokeHandlersImpl(object source, RoutedEventArgs args, bool reRais TraceEventType.Stop, TraceRoutedEvent.InvokeHandlers, _traceArguments); - } - + Array.Clear(_traceArguments); + } } } else @@ -273,6 +273,8 @@ private void InvokeHandlersImpl(object source, RoutedEventArgs args, bool reRais TraceEventType.Stop, TraceRoutedEvent.InvokeHandlers, _traceArguments); + + Array.Clear(_traceArguments); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs index 3317723d168..09ff352f710 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs @@ -1190,7 +1190,7 @@ out decoder } catch { - bitmapStream.Close(); + bitmapStream?.Close(); #pragma warning disable 6500 decoderHandle = null; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs index 1f8ca58837a..98d29783864 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs @@ -178,22 +178,30 @@ static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? valu || !classInfo.HasMember("_items") || !classInfo.HasMember("_size") || classInfo.GetRawValue("_size") is not int size - || classInfo.GetRawValue("_items") is not SZArrayRecord arrayRecord + || classInfo.GetRawValue("_items") is not SZArrayRecord arrayRecord || size > arrayRecord.Length) { return false; } ArrayList arrayList = new(size); - object?[] array = arrayRecord.GetArray(); + SerializationRecord?[] array = arrayRecord.GetArray(); for (int i = 0; i < size; i++) { - if (array[i] is SerializationRecord) + SerializationRecord? elementRecord = array[i]; + if (elementRecord is null) { + arrayList.Add(null); + } + else if (elementRecord is PrimitiveTypeRecord primitiveTypeRecord) + { + arrayList.Add(primitiveTypeRecord.Value); + } + else + { + // It was a complex type (represented as a ClassRecord or an ArrayRecord) return false; } - - arrayList.Add(array[i]); } value = arrayList; @@ -259,27 +267,39 @@ static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? hash || !classInfo.HasMember("Values") // Note that hashtables with custom comparers and/or hash code providers will have non null Comparer || classInfo.GetSerializationRecord("Comparer") is not null - || classInfo.GetSerializationRecord("Keys") is not SZArrayRecord keysRecord - || classInfo.GetSerializationRecord("Values") is not SZArrayRecord valuesRecord + || classInfo.GetSerializationRecord("Keys") is not SZArrayRecord keysRecord + || classInfo.GetSerializationRecord("Values") is not SZArrayRecord valuesRecord || keysRecord.Length != valuesRecord.Length) { return false; } Hashtable temp = new(keysRecord.Length); - object?[] keys = keysRecord.GetArray(); - object?[] values = valuesRecord.GetArray(); + SerializationRecord?[] keys = keysRecord.GetArray(); + SerializationRecord?[] values = valuesRecord.GetArray(); for (int i = 0; i < keys.Length; i++) { - object? key = keys[i]; - object? value = values[i]; + SerializationRecord? key = keys[i]; + SerializationRecord? value = values[i]; - if (key is null or SerializationRecord || value is SerializationRecord) + if (key is null || key is not PrimitiveTypeRecord primitiveKey) { return false; } - temp[key] = value; + if (value is null) + { + temp[primitiveKey.Value] = null; // null values are allowed + } + else if (value is PrimitiveTypeRecord primitiveValue) + { + temp[primitiveKey.Value] = primitiveValue.Value; + } + else + { + // It was a complex type (represented as a ClassRecord or an ArrayRecord) + return false; + } } hashtable = temp; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj index 6e84493822b..9572a2184d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj @@ -5,7 +5,8 @@ $(DefineConstants);WeakEventTelemetry true false - $(NoWarn);0618;1058 + + $(NoWarn);0618;1058;SYSLIB5005 None AnyCPU;x64;arm64 false diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf index 1c4cb67c614..27083243e13 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf @@ -4755,7 +4755,7 @@ Do you want to replace it? Bottom - Bottom + 맨 아래 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/AppContextDefaultValues.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/AppContextDefaultValues.cs index c36d4c6ea5b..31241bb43a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/AppContextDefaultValues.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/AppContextDefaultValues.cs @@ -74,8 +74,9 @@ private static void InitializeNetFxSwitchDefaultsForNetCoreRuntime() LocalAppContext.DefineSwitchDefault(FrameworkAppContextSwitches.KeyboardNavigationFromHyperlinkInItemsControlIsNotRelativeToFocusedElementSwitchName, false); LocalAppContext.DefineSwitchDefault(FrameworkAppContextSwitches.ItemAutomationPeerKeepsItsItemAliveSwitchName, false); LocalAppContext.DefineSwitchDefault(FrameworkAppContextSwitches.DisableFluentThemeWindowBackdropSwitchName, false); + LocalAppContext.DefineSwitchDefault(FrameworkAppContextSwitches.DisableDynamicResourceOptimizationSwitchName, true); - // UseAdornerForTextboxSelectionRenderingSwitchName is always true, i.e., disabled by default. + // UseAdornerForTextboxSelectionRenderingSwitchName is always true, i.e., disabled by default. // Do not initialized this again - this was initialized earlier in PopulateDefaultValuesPartial unconditionally. // LocalAppContext.DefineSwitchDefault(FrameworkAppContextSwitches.UseAdornerForTextboxSelectionRenderingSwitchName, true); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs index 401cd0bc4dd..addb6ada908 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Control.cs @@ -192,7 +192,7 @@ public FontFamily FontFamily public static readonly DependencyProperty FontSizeProperty = TextElement.FontSizeProperty.AddOwner( typeof(Control), - new FrameworkPropertyMetadata(SystemFonts.MessageFontSize, + new FrameworkPropertyMetadata(SystemFonts.ThemeMessageFontSize, FrameworkPropertyMetadataOptions.Inherits)); /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs index 9c383fdf40e..ae2bae55c24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/DataGridTextColumn.cs @@ -320,7 +320,7 @@ public FontFamily FontFamily public static readonly DependencyProperty FontSizeProperty = TextElement.FontSizeProperty.AddOwner( typeof(DataGridTextColumn), - new FrameworkPropertyMetadata(SystemFonts.MessageFontSize, FrameworkPropertyMetadataOptions.Inherits, DataGridColumn.NotifyPropertyChangeForRefreshContent)); + new FrameworkPropertyMetadata(SystemFonts.ThemeMessageFontSize, FrameworkPropertyMetadataOptions.Inherits, DataGridColumn.NotifyPropertyChangeForRefreshContent)); /// /// The size of the desired font. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs index ef3905f69e8..7c08c1c6009 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/MenuItem.cs @@ -174,7 +174,7 @@ static MenuItem() ForegroundProperty.OverrideMetadata(typeof(MenuItem), new FrameworkPropertyMetadata(SystemColors.MenuTextBrush)); FontFamilyProperty.OverrideMetadata(typeof(MenuItem), new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily)); - FontSizeProperty.OverrideMetadata(typeof(MenuItem), new FrameworkPropertyMetadata(SystemFonts.MessageFontSize)); + FontSizeProperty.OverrideMetadata(typeof(MenuItem), new FrameworkPropertyMetadata(SystemFonts.ThemeMessageFontSize)); FontStyleProperty.OverrideMetadata(typeof(MenuItem), new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle)); FontWeightProperty.OverrideMetadata(typeof(MenuItem), new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight)); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs index 112830903ee..c065a503a73 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/RadioButton.cs @@ -161,7 +161,7 @@ private void UpdateRadioButtonGroup() else { // Uncheck all checked RadioButtons different from the current one - if (rb != this && (rb.IsChecked == true) && rootScope == KeyboardNavigation.GetVisualRoot(rb) && rootScope != null) + if (rb != this && (rb.IsChecked == true) && rootScope == KeyboardNavigation.GetVisualRoot(rb)) rb.UncheckRadioButton(); i++; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs index 2d2e9b6e36e..bf8d0c3b943 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs @@ -115,6 +115,9 @@ internal Rect[] GetBoundingRectangles(ITextPointer start, ITextPointer end, bool return Array.Empty(); } + start = start.CreatePointer(); + end = end.CreatePointer(); + TextRangeAdaptor.MoveToInsertionPosition(start, LogicalDirection.Forward); TextRangeAdaptor.MoveToInsertionPosition(end, LogicalDirection.Backward); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs index b97dd1fc326..fb4171eea01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextElement.cs @@ -647,7 +647,7 @@ public static FontStretch GetFontStretch(DependencyObject element) typeof(double), typeof(TextElement), new FrameworkPropertyMetadata( - SystemFonts.MessageFontSize, + SystemFonts.ThemeMessageFontSize, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits), new ValidateValueCallback(IsValidFontSize)); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs index b5157daf65e..d29ba997760 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/FrameworkElement.cs @@ -2411,7 +2411,7 @@ static FrameworkElement() // Coerce Callback for font properties for responding to system themes TextElement.FontFamilyProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontFamily))); - TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize))); + TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.ThemeMessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize))); TextElement.FontStyleProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontStyle))); TextElement.FontWeightProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontWeight))); @@ -5564,7 +5564,7 @@ private static object CoerceFontSize(DependencyObject o, object value) // For root elements with default values, return current system metric if local value has not been set if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontSizeProperty)) { - return SystemFonts.MessageFontSize; + return SystemFonts.ThemeMessageFontSize; } return value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs index 2d38ef796e1..2fd51dff509 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownProperties.cs @@ -10,7 +10,7 @@ namespace System.Windows.Baml2006 { partial class WpfSharedBamlSchemaContext: XamlSchemaContext { - const int KnownPropertyCount = 272; + const int KnownPropertyCount = 270; private WpfKnownMember CreateKnownMember(short bamlNumber) @@ -286,7 +286,6 @@ private WpfKnownMember CreateKnownMember(short bamlNumber) case 268: return Create_BamlProperty_XmlDataProvider_XmlSerializer(); case 269: return Create_BamlProperty_TextBox_IsReadOnly(); case 270: return Create_BamlProperty_RichTextBox_IsReadOnly(); - case 272: return Create_BamlProperty_Setter_Value(); default: throw new InvalidOperationException("Invalid BAML number"); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs index 987beeac7d7..0b2c324ad85 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/Baml2006/WpfGeneratedKnownTypes.cs @@ -8844,7 +8844,6 @@ private WpfKnownType Create_BamlType_Setter(bool isBamlType, bool useV3Rules) typeof(System.Windows.Setter), isBamlType, useV3Rules); bamlType.DefaultConstructor = delegate() { return new System.Windows.Setter(); }; - bamlType.ContentPropertyName = "Value"; bamlType.Freeze(); return bamlType; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypes.cs index 37d78317e1d..cbd2d5bcd41 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/KnownTypes.cs @@ -1107,8 +1107,7 @@ internal enum KnownProperties : short XmlDataProvider_XmlSerializer, MaxProperty, TextBox_IsReadOnly, - RichTextBox_IsReadOnly, - Setter_Value + RichTextBox_IsReadOnly } #if !BAMLDASM @@ -2787,9 +2786,6 @@ internal static string GetContentPropertyName(KnownElements knownElement) case KnownElements.ToolBarTray: name = "ToolBars"; break; - case KnownElements.Setter: - name = "Value"; - break; case KnownElements.ControlTemplate: case KnownElements.DataTemplate: case KnownElements.FrameworkTemplate: @@ -3680,10 +3676,6 @@ internal static short GetKnownPropertyAttributeId(KnownElements typeID, string f if (string.Equals(fieldName, "XmlSerializer", StringComparison.Ordinal)) return (short)KnownProperties.XmlDataProvider_XmlSerializer; break; - case KnownElements.Setter: - if (string.Equals(fieldName, "Value", StringComparison.Ordinal)) - return (short)KnownProperties.Setter_Value; - break; } return 0; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs index 1ff895daaea..17a7c5f1671 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/StyleXamlParser.cs @@ -712,6 +712,14 @@ public override void WriteElementStart(XamlElementStartNode xamlElementStartNode _inEventSetter = true; #endif } + else if ((depth == 2 && _setterElementEncountered) || + (depth == 3 && _setterPropertyEncountered)) + { + ThrowException(nameof(SR.ParserNoSetterChild), + xamlElementStartNode.TypeFullName, + xamlElementStartNode.LineNumber, + xamlElementStartNode.LinePosition); + } } // Handle custom serializers within the style section by creating an instance diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs index 12ac88c8fa5..9eb6e476f5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs @@ -24,7 +24,6 @@ namespace System.Windows /// [XamlSetMarkupExtensionAttribute("ReceiveMarkupExtension")] [XamlSetTypeConverterAttribute("ReceiveTypeConverter")] - [ContentProperty("Value")] public class Setter : SetterBase, ISupportInitialize { /// @@ -161,7 +160,6 @@ public DependencyProperty Property /// [System.Windows.Markup.DependsOn("Property")] [System.Windows.Markup.DependsOn("TargetName")] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // Not localizable by-default [TypeConverter(typeof(System.Windows.Markup.SetterTriggerConditionValueConverter))] public object Value diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs index 64d5aa50f86..2034e9141a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemFonts.cs @@ -422,15 +422,25 @@ public static TextDecorationCollection StatusFontTextDecorations /// Maps to SPI_NONCLIENTMETRICS /// public static double MessageFontSize + { + get + { + return ConvertFontHeight(SystemParameters.NonClientMetrics.lfMessageFont.lfHeight); + } + } + + internal static double ThemeMessageFontSize { get { // TODO : Find a better solution to this. Difference in default size of font in Fluent and other themes. - if(ThemeManager.IsFluentThemeEnabled) + if(ThemeManager.IsFluentThemeEnabled + || ThemeManager.IsFluentThemeDictionaryIncluded()) { - return ThemeManager.DefaultFluentThemeFontSize; + return MessageFontSize * ThemeManager.DefaultFluentFontSizeFactor ; } - return ConvertFontHeight(SystemParameters.NonClientMetrics.lfMessageFont.lfHeight); + + return MessageFontSize; } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs index 1755cdda247..f97cc0cf7ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ThemeManager.cs @@ -28,13 +28,11 @@ internal static void OnSystemThemeChanged() FluentThemeState newFluentThemeState = new FluentThemeState(Application.Current.ThemeMode.Value, useLightColors); - if (s_currentFluentThemeState == newFluentThemeState) + if (s_currentFluentThemeState != newFluentThemeState) { - return; + AddOrUpdateThemeResources(Application.Current.Resources, GetThemeDictionary(Application.Current.ThemeMode)); } - AddOrUpdateThemeResources(Application.Current.Resources, GetThemeDictionary(Application.Current.ThemeMode)); - foreach (Window window in Application.Current.Windows) { if (window.ThemeMode == ThemeMode.None) @@ -204,6 +202,11 @@ internal static ResourceDictionary GetThemeDictionary(ThemeMode themeMode) return rd; } + internal static bool IsFluentThemeDictionaryIncluded() + { + return Application.Current != null && LastIndexOfFluentThemeDictionary(Application.Current.Resources) != -1; + } + #endregion @@ -323,7 +326,7 @@ internal static bool IsFluentThemeEnabled internal static bool IgnoreWindowResourcesChange { get; set; } = false; - internal static double DefaultFluentThemeFontSize => 14; + internal const double DefaultFluentFontSizeFactor = 14.0 / 12.0 ; internal static WindowCollection FluentEnabledWindows { get; set; } = new WindowCollection(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs index 0b08b7edfe8..15b0071ed2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs @@ -1152,7 +1152,6 @@ internal SessionEndingCancelEventArgs() { } public delegate void SessionEndingCancelEventHandler(object sender, System.Windows.SessionEndingCancelEventArgs e); [System.Windows.Markup.XamlSetMarkupExtensionAttribute("ReceiveMarkupExtension")] [System.Windows.Markup.XamlSetTypeConverterAttribute("ReceiveTypeConverter")] - [System.Windows.Markup.ContentPropertyAttribute("Value")] public partial class Setter : System.Windows.SetterBase, System.ComponentModel.ISupportInitialize { public Setter() { } diff --git a/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemPathResolver.cpp b/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemPathResolver.cpp index 74885fa0362..5feb2d5d959 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemPathResolver.cpp +++ b/src/Microsoft.DotNet.Wpf/src/System.Printing/CPP/src/PrintSystemPathResolver.cpp @@ -305,7 +305,7 @@ ValidateAndCaptureServerName( { if (serverName->StartsWith("\\\\", StringComparison::Ordinal)) { - isValid = isValid & (serverName->IndexOf('\\', 3) < 0); + isValid = isValid & (serverName->IndexOf(L'\\', 3) < 0); } } } @@ -414,7 +414,7 @@ ValidateUNCName( (!(name->IndexOf(',') >= 0)) && name->StartsWith("\\\\", StringComparison::Ordinal) && (!(name->StartsWith("\\\\\\", StringComparison::Ordinal))) && - (name->IndexOf('\\', 3) >= 0)) + (name->IndexOf(L'\\', 3) >= 0)) { isValid = true; } @@ -470,7 +470,7 @@ ValidateUNCPath( (!(name->IndexOf(',') >= 0)) && name->StartsWith("\\\\", StringComparison::Ordinal) && (!(name->StartsWith("\\\\\\", StringComparison::Ordinal))) && - (name->IndexOf('\\', 3) >= 0) && + (name->IndexOf(L'\\', 3) >= 0) && (!(name->StartsWith("\\\\http://", StringComparison::OrdinalIgnoreCase)))) { isValid = true; diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/KnownStrings.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/KnownStrings.cs index 378af8ae8ff..26522910979 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/KnownStrings.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/KnownStrings.cs @@ -35,7 +35,7 @@ internal static class KnownStrings public const string DefaultPrefix = "p"; public const string ReferenceName = "__ReferenceID"; - public static ReadOnlySpan WhitespaceChars => [' ', '\t', '\n', '\r', '\f']; + public static readonly char[] WhitespaceChars = [' ', '\t', '\n', '\r', '\f']; public const char SpaceChar = ' '; public const char TabChar = '\t'; public const char NewlineChar = '\n'; diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/Generator/ThemeGenerator.Fluent.ps1 b/src/Microsoft.DotNet.Wpf/src/Themes/Generator/ThemeGenerator.Fluent.ps1 index bc0cc057c20..590ab510c82 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/Generator/ThemeGenerator.Fluent.ps1 +++ b/src/Microsoft.DotNet.Wpf/src/Themes/Generator/ThemeGenerator.Fluent.ps1 @@ -20,7 +20,8 @@ foreach($themeColor in $themeColors) xmlns:system="clr-namespace:System;assembly=System.Runtime" xmlns:ui="clr-namespace:System.Windows.Documents;assembly=PresentationUI" xmlns:theme="clr-namespace:Microsoft.Windows.Themes" - xmlns:framework="clr-namespace:MS.Internal;assembly=PresentationFramework" + xmlns:ms="clr-namespace:MS.Internal;assembly=PresentationFramework" + xmlns:standard="clr-namespace:Standard;assembly=PresentationFramework" xmlns:base="clr-namespace:System.Windows;assembly=WindowsBase"> ' diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs index 65fab25d822..6f3efd4af58 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs @@ -17,7 +17,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur return 0.0; } - if (values[1] is not double factor) + if (values[1] is not double factor || factor == double.NaN) { return 0.0; } diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml index 2c0b16fabf6..305a819d347 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml @@ -269,7 +269,7 @@ - + @@ -278,23 +278,17 @@ - - - - + - - + + - - - - + - - + + @@ -367,21 +361,49 @@ - - - - - - - - - + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -429,6 +451,7 @@ + @@ -480,9 +503,10 @@ - + + #FF2B2B2B @@ -492,6 +516,8 @@ + + @@ -532,6 +558,10 @@ + + + + @@ -546,7 +576,13 @@ - + + + + + + + @@ -558,8 +594,12 @@ + + + + @@ -575,6 +615,11 @@ + + + + + diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml index a5974b8390a..f3816bf3328 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/HC.xaml @@ -233,21 +233,49 @@ - - - - - - - - - + + + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -298,6 +326,7 @@ + @@ -352,14 +381,18 @@ + #FF2B2B2B + + + @@ -400,6 +433,10 @@ + + + + @@ -415,7 +452,13 @@ - + + + + + + + @@ -427,8 +470,12 @@ + + + + @@ -444,6 +491,11 @@ + + + + + @@ -485,6 +537,9 @@ + + + @@ -588,7 +643,7 @@ #2D3236 - Transparent + #2D3236 #2D3236 #2D3236 #2D3236 diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml index 50f0fbafe84..c2d9f00ae13 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Light.xaml @@ -282,13 +282,10 @@ - - - - + - - + + @@ -361,21 +358,49 @@ - - - - - - - - - + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -423,6 +448,7 @@ + @@ -474,7 +500,7 @@ - + #FFF2F2F2 @@ -487,6 +513,8 @@ + + @@ -527,6 +555,10 @@ + + + + @@ -541,7 +573,13 @@ - + + + + + + + @@ -553,8 +591,13 @@ + + + + + @@ -570,6 +613,11 @@ + + + + + diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Variables.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Variables.xaml index 3e764fc25f9..a1880057fb7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Variables.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Variables.xaml @@ -29,13 +29,11 @@ 1 2 - 10,8,10,7 + 10,5,10,6 14 24 0 - 32 - 24 24 0 0 diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Button.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Button.xaml index 982e95ed7d2..f8514d640ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Button.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Button.xaml @@ -26,14 +26,13 @@ - - + - diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Calendar.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Calendar.xaml index 27b86d2980e..60e2e98a0d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Calendar.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Calendar.xaml @@ -486,11 +486,11 @@ - - + + - + @@ -498,11 +498,9 @@ x:Name="PART_Root" Margin="0" Padding="0" - Background="{DynamicResource CalendarViewBackground}" - BorderBrush="{DynamicResource CalendarViewBorderBrush}" - BorderThickness="1" - HorizontalAlignment="{TemplateBinding HorizontalAlignment}" - VerticalAlignment="{TemplateBinding VerticalAlignment}" + Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4"> diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/CheckBox.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/CheckBox.xaml index 41ca5bebbf1..b553c0bfa91 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/CheckBox.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/CheckBox.xaml @@ -16,58 +16,60 @@ #FFFF0000 - 11,5,11,6 - 1 - 8,0,0,0 + 1 + 8,5,0,0 14 - 22 - 22 + 20 + 32 + 120 + - - - - + + - + - diff --git a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml index d4825775b7e..4d3f91ccd4a 100644 --- a/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml +++ b/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml @@ -1,4 +1,4 @@ - + @@ -66,12 +66,10 @@ --> 1 2 - 10,8,10,7 + 10,5,10,6 14 24 0 - 32 - 24 24 0 0 @@ -293,22 +291,16 @@ - - - - + - - + + - - - - + - - + + @@ -374,21 +366,49 @@ - - - - - - - - - + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -430,6 +450,7 @@ + @@ -471,8 +492,9 @@ - + + #FF2B2B2B @@ -481,6 +503,8 @@ + + @@ -514,6 +538,9 @@ + + + @@ -526,7 +553,13 @@ - + + + + + + + @@ -538,8 +571,12 @@ + + + + @@ -552,6 +589,10 @@ + + + + @@ -672,14 +713,13 @@ - - + @@ -715,7 +755,6 @@ - @@ -1048,16 +1087,16 @@ - - + + - + - - + + @@ -1065,52 +1104,53 @@ - - - + - + @@ -2781,8 +2868,8 @@ - - + + @@ -2836,14 +2923,14 @@ - + - - + + @@ -2868,7 +2955,7 @@ - + @@ -2879,8 +2966,8 @@ - - + + @@ -2916,15 +3003,15 @@ - + - - + + @@ -2986,8 +3073,13 @@ - + - + - - + +