Skip to content

Commit 7d58852

Browse files
Merge branch 'main' into merge/vs17.8-to-main
2 parents e2f0ea5 + b454470 commit 7d58852

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1296
-480
lines changed

.exp-insertions.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Pipeline creates a dotnet with experimental msbuild dlls.
2+
3+
trigger: none # Prevents this pipeline from triggering on check-ins
4+
pr: none # don't run this on PR as well
5+
6+
parameters:
7+
# Dotnet installer channel from where to take the latest dotnet bits.
8+
- name: DotnetInstallerChannel
9+
displayName: Dotnet installer channel
10+
type: string
11+
# Branch from the MSBuild Build CI pipeline. Default: main
12+
# Top run for the branch would be used to create an experimental insertion.
13+
- name: MSBuildBranch
14+
displayName: MSBuild Branch
15+
type: string
16+
default: 'refs/heads/main'
17+
# BuildID from the MSBuild Build CI pipeline. Overrides the choice of MSBuildBranch parameter
18+
- name: MSBuildBuildID
19+
displayName: MSBuild CI Run Override
20+
type: string
21+
default: 'default'
22+
23+
variables:
24+
- name: _MsBuildCiPipelineId
25+
value: 9434
26+
27+
pool:
28+
vmImage: windows-latest
29+
30+
steps:
31+
- powershell: |
32+
mkdir '$(System.ArtifactsDirectory)/installer'
33+
34+
$dotnetChannel = '${{parameters.DotnetInstallerChannel}}'
35+
$sdks = "dotnet-sdk-win-x64.zip", "dotnet-sdk-linux-x64.tar.gz"
36+
37+
foreach ($sdk in $sdks)
38+
{
39+
Write-Host "Downloading dotnet $sdk from channel $dotnetChannel"
40+
Invoke-WebRequest `
41+
-Uri "https://aka.ms/dotnet/$dotnetChannel/daily/$sdk" `
42+
-OutFile "$(System.ArtifactsDirectory)/installer/$sdk"
43+
}
44+
mkdir '$(Pipeline.Workspace)/artifacts'
45+
46+
displayName: Download latest dotnet sdks
47+
48+
# Download latest build artifacts for a branch from MSBuild Build CI
49+
- ${{ if eq(parameters.MSBuildBuildID, 'default') }}:
50+
- task: DownloadBuildArtifacts@1
51+
inputs:
52+
buildType: specific
53+
project: DevDiv
54+
pipeline: $(_MsBuildCiPipelineId)
55+
buildVersionToDownload: latestFromBranch
56+
branchName: '${{parameters.MSBuildBranch}}'
57+
artifactName: bin
58+
downloadPath: '$(System.ArtifactsDirectory)/msbuild/artifacts/bin'
59+
itemPattern: "MSBuild.Bootstrap/**"
60+
displayName: Download latest msbuild from branch
61+
62+
# Download build artifacts for MSBuild Build CI specific build
63+
- ${{ if ne(parameters.MSBuildBuildID, 'default') }}:
64+
- task: DownloadBuildArtifacts@1
65+
inputs:
66+
buildType: specific
67+
project: DevDiv
68+
pipeline: $(_MsBuildCiPipelineId)
69+
buildVersionToDownload: specific
70+
buildId: ${{parameters.MSBuildBuildID}}
71+
artifactName: bin
72+
downloadPath: '$(System.ArtifactsDirectory)/msbuild/artifacts/bin'
73+
itemPattern: "MSBuild.Bootstrap/**"
74+
displayName: Download specified msbuild build
75+
76+
- powershell: |
77+
$sdk = "dotnet-sdk-win-x64"
78+
79+
Write-Host "Extracting $(System.ArtifactsDirectory)/installer/$sdk.zip"
80+
Expand-Archive "$(System.ArtifactsDirectory)/installer/$sdk.zip" -DestinationPath "$(Pipeline.Workspace)/exp-dotnet/$sdk"
81+
82+
$dotnetDirectory = Get-ChildItem -Directory -Path "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk"
83+
$dotnetVersion = $dotnetDirectory.Name
84+
Write-Host "Detected dotnet version: $dotnetVersion"
85+
86+
Write-Host "Updating MSBuild dlls."
87+
$(Build.SourcesDirectory)/scripts/Deploy-MSBuild.ps1 `
88+
-destination "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk/$dotnetVersion" `
89+
-bootstrapDirectory "$(System.ArtifactsDirectory)/msbuild/artifacts/bin/MSBuild.Bootstrap" `
90+
-configuration Release `
91+
-makeBackup $false
92+
93+
Write-Host "Compressing dotnet sdk files"
94+
Get-ChildItem -Path "$(Pipeline.Workspace)/exp-dotnet/$sdk" | Compress-Archive -DestinationPath "$(Pipeline.Workspace)/artifacts/$sdk.zip"
95+
96+
displayName: Dogfood msbuild dlls to dotnet sdk win-x64
97+
98+
- powershell: |
99+
$sdk = "dotnet-sdk-linux-x64"
100+
101+
mkdir "$(Pipeline.Workspace)/exp-dotnet/$sdk"
102+
103+
Write-Host "Extracting $(System.ArtifactsDirectory)/installer/$sdk.tar.gz"
104+
tar -xzvf "$(System.ArtifactsDirectory)/installer/$sdk.tar.gz" -C "$(Pipeline.Workspace)/exp-dotnet/$sdk"
105+
106+
$dotnetDirectory = Get-ChildItem -Directory -Path $(Pipeline.Workspace)/exp-dotnet/$sdk/sdk
107+
$dotnetVersion = $dotnetDirectory.Name
108+
Write-Host "Detected dotnet version: $dotnetVersion"
109+
110+
Write-Host "Updating MSBuild dlls."
111+
$(Build.SourcesDirectory)/scripts/Deploy-MSBuild.ps1 `
112+
-destination "$(Pipeline.Workspace)/exp-dotnet/$sdk/sdk/$dotnetVersion" `
113+
-bootstrapDirectory "$(System.ArtifactsDirectory)/msbuild/artifacts/bin/MSBuild.Bootstrap" `
114+
-configuration Release `
115+
-makeBackup $false
116+
117+
Write-Host "Compressing dotnet sdk files"
118+
tar -czvf "$(Pipeline.Workspace)/artifacts/$sdk.tar.gz" -C "$(Pipeline.Workspace)/exp-dotnet/$sdk" .
119+
displayName: Dogfood msbuild dlls to dotnet sdk linux-x64
120+
121+
- task: PublishPipelineArtifact@1
122+
inputs:
123+
targetPath: '$(Pipeline.Workspace)/artifacts'
124+
artifactName: ExperimentalDotnet
125+
parallel: true
126+
condition: always()
127+
displayName: Publish crank assests artifacts

.vsts-dotnet.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ variables:
4040
value: true
4141
- name: Codeql.Enabled
4242
value: true
43+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
44+
- group: DotNet-MSBuild-SDLValidation-Params
4345

4446
stages:
4547
- stage: build
@@ -294,3 +296,17 @@ stages:
294296
enableSymbolValidation: false
295297
enableSourceLinkValidation: false
296298
enableNugetValidation: false
299+
SDLValidationParameters:
300+
enable: true
301+
continueOnError: false
302+
params: ' -SourceToolsList @("policheck","credscan")
303+
-TsaInstanceURL "$(_TsaInstanceURL)"
304+
-TsaProjectName "$(_TsaProjectName)"
305+
-TsaNotificationEmail "$(_TsaNotificationEmail)"
306+
-TsaCodebaseAdmin "$(_TsaCodebaseAdmin)"
307+
-TsaBugAreaPath "$(_TsaBugAreaPath)"
308+
-TsaIterationPath "$(_TsaIterationPath)"
309+
-TsaRepositoryName "dotnet-msbuild"
310+
-TsaCodebaseName "dotnet-msbuild"
311+
-TsaPublish $True
312+
-PoliCheckAdditionalRunConfigParams @("UserExclusionPath < $(Build.SourcesDirectory)\eng\policheck_exclusions.xml")'

eng/BootStrapMSBuild.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@
229229
<Copy SourceFiles="@(NuGetSdkResolverManifest)"
230230
DestinationFolder="$(BootstrapDestination)SdkResolvers\Microsoft.Build.NuGetSdkResolver" />
231231

232+
<Copy SourceFiles="$(RuntimeIdentifierGraphPath)"
233+
DestinationFolder="$(BootstrapDestination)" />
234+
232235
<Copy SourceFiles="@(InstalledSdks)"
233236
DestinationFiles="@(InstalledSdks -> '$(BootstrapDestination)Sdks\%(RecursiveDir)%(Filename)%(Extension)')" />
234237

eng/Version.Details.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23428.2">
4+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.23475.1">
55
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
6-
<Sha>26ce96327dd346534926c4551f8b8d62a6fc724f</Sha>
6+
<Sha>0650b50b2a5263c735d12b5c36c5deb34e7e6b60</Sha>
77
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
88
</Dependency>
99
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
@@ -58,28 +58,28 @@
5858
</Dependency>
5959
</ProductDependencies>
6060
<ToolsetDependencies>
61-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23425.2">
61+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23463.1">
6262
<Uri>https://github.com/dotnet/arcade</Uri>
63-
<Sha>90c167d5c57de4a8bced566379dbd893556c94e8</Sha>
63+
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
6464
<SourceBuild RepoName="arcade" ManagedOnly="true" />
6565
</Dependency>
66-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23423.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
66+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23426.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
6767
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
68-
<Sha>ed9a83526483c094fb51e7000b6f816ce6cb0325</Sha>
68+
<Sha>194f32828726c3f1f63f79f3dc09b9e99c157b11</Sha>
6969
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
7070
</Dependency>
71-
<Dependency Name="NuGet.Build.Tasks" Version="6.8.0-rc.112">
71+
<Dependency Name="NuGet.Build.Tasks" Version="6.8.0-rc.117">
7272
<Uri>https://github.com/nuget/nuget.client</Uri>
73-
<Sha>f47eb5771ee3f9a100d0b31d82ccb5ee600a56ed</Sha>
73+
<Sha>7fb5ed887352d2892797a365cfdd7bb8df029941</Sha>
7474
</Dependency>
75-
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.8.0-3.23465.5">
75+
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.8.0-3.23474.3">
7676
<Uri>https://github.com/dotnet/roslyn</Uri>
77-
<Sha>dc3d0694a4b31b8e27038431888cd4e8dd5b6cb6</Sha>
77+
<Sha>2fe37da588ea81d852d3a42e290f8da4d610882f</Sha>
7878
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
7979
</Dependency>
80-
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="8.0.0-beta.23425.2">
80+
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="8.0.0-beta.23463.1">
8181
<Uri>https://github.com/dotnet/arcade</Uri>
82-
<Sha>90c167d5c57de4a8bced566379dbd893556c94e8</Sha>
82+
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
8383
</Dependency>
8484
</ToolsetDependencies>
8585
</Dependencies>

eng/Versions.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
33
<Project>
44
<PropertyGroup>
5-
<VersionPrefix>17.8.1</VersionPrefix><DotNetFinalVersionKind>release</DotNetFinalVersionKind>
6-
<PackageValidationBaselineVersion>17.7.0</PackageValidationBaselineVersion>
5+
<VersionPrefix>17.9.0</VersionPrefix>
6+
<PackageValidationBaselineVersion>17.8.0-preview-23471-08</PackageValidationBaselineVersion>
77
<AssemblyVersion>15.1.0.0</AssemblyVersion>
88
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
99
<DotNetUseShippingVersions>true</DotNetUseShippingVersions>
@@ -47,11 +47,11 @@
4747
Otherwise, this version of dotnet will not be installed and the build will error out. -->
4848
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\global.json')), '"dotnet": "([^"]*)"').Groups.get_Item(1))</DotNetCliVersion>
4949
<MicrosoftCodeAnalysisCollectionsVersion>4.2.0-1.22102.8</MicrosoftCodeAnalysisCollectionsVersion>
50-
<MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.23425.2</MicrosoftDotNetXUnitExtensionsVersion>
50+
<MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.23463.1</MicrosoftDotNetXUnitExtensionsVersion>
5151
<MicrosoftExtensionsDependencyModelVersion>7.0.0</MicrosoftExtensionsDependencyModelVersion>
5252
<MicrosoftIORedistVersion>6.0.0</MicrosoftIORedistVersion>
53-
<MicrosoftNetCompilersToolsetVersion>4.8.0-3.23465.5</MicrosoftNetCompilersToolsetVersion>
54-
<NuGetBuildTasksVersion>6.8.0-rc.112</NuGetBuildTasksVersion>
53+
<MicrosoftNetCompilersToolsetVersion>4.8.0-3.23474.3</MicrosoftNetCompilersToolsetVersion>
54+
<NuGetBuildTasksVersion>6.8.0-rc.117</NuGetBuildTasksVersion>
5555
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
5656
<SystemTextJsonVersion>7.0.3</SystemTextJsonVersion>
5757
<SystemThreadingTasksDataflowVersion>7.0.0</SystemThreadingTasksDataflowVersion>

eng/common/cross/toolchain.cmake

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/policheck_exclusions.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<PoliCheckExclusions>
2+
<!-- All strings must be UPPER CASE -->
3+
<!--Each of these exclusions is a folder name -if \[name]\exists in the file path, it will be skipped -->
4+
<!--<Exclusion Type="FolderPathFull">ABC|XYZ</Exclusion>-->
5+
<!--Each of these exclusions is a folder name -if any folder or file starts with "\[name]", it will be skipped -->
6+
<!--<Exclusion Type="FolderPathStart">ABC|XYZ</Exclusion>-->
7+
<!--Each of these file types will be completely skipped for the entire scan -->
8+
<!--<Exclusion Type="FileType">.ABC|.XYZ</Exclusion>-->
9+
<!--The specified file names will be skipped during the scan regardless which folder they are in -->
10+
<!--<Exclusion Type="FileName">ABC.TXT|XYZ.CS</Exclusion>-->
11+
12+
<Exclusion Type="FolderPathFull">.DOTNET</Exclusion>
13+
</PoliCheckExclusions>

global.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"allowPrerelease": true
44
},
55
"tools": {
6-
"dotnet": "8.0.100-preview.7.23376.3",
6+
"dotnet": "8.0.100-rc.1.23463.5",
77
"vs": {
8-
"version": "17.6.0"
8+
"version": "17.7.0"
99
},
10-
"xcopy-msbuild": "17.6.0-2"
10+
"xcopy-msbuild": "17.7.2"
1111
},
1212
"msbuild-sdks": {
13-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23425.2"
13+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23463.1"
1414
}
15-
}
15+
}

scripts/Deploy-MSBuild.ps1

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Param(
55
[ValidateSet('Debug','Release')]
66
[string] $configuration = "Debug",
77
[ValidateSet('Core','Desktop', 'Detect', 'Full')]
8-
[string] $runtime = "Detect"
8+
[string] $runtime = "Detect",
9+
[string] $bootstrapDirectory = "",
10+
[bool] $makeBackup = $true
911
)
1012

1113
Set-StrictMode -Version "Latest"
@@ -15,9 +17,9 @@ function Copy-WithBackup ($origin, $destinationSubFolder = "") {
1517
$directoryPart = [IO.Path]::Combine($destination, $destinationSubFolder, $origin.IntermediaryDirectories)
1618
$destinationPath = Join-Path -Path $directoryPart (Split-Path $origin.SourceFile -leaf)
1719

18-
$backupInto = [IO.Path]::Combine($BackupFolder, $destinationSubFolder)
20+
if (($makeBackup) -and (Test-Path $destinationPath -PathType Leaf)) {
21+
$backupInto = [IO.Path]::Combine($BackupFolder, $destinationSubFolder)
1922

20-
if (Test-Path $destinationPath -PathType Leaf) {
2123
# Back up previous copy of the file
2224
if (!(Test-Path $backupInto)) {
2325
[system.io.directory]::CreateDirectory($backupInto)
@@ -45,10 +47,15 @@ function FileToCopy([string] $sourceFileRelativeToRepoRoot, [string] $intermedia
4547

4648
# TODO: find most-recently-built MSBuild and make it default $configuration
4749

48-
$BackupFolder = New-Item (Join-Path $destination -ChildPath "Backup-$(Get-Date -Format FileDateTime)") -itemType directory -ErrorAction Stop
49-
5050
Write-Verbose "Copying $configuration MSBuild to $destination"
51-
Write-Host "Existing MSBuild assemblies backed up to $BackupFolder"
51+
52+
if ($makeBackup) {
53+
$BackupFolder = New-Item (Join-Path $destination -ChildPath "Backup-$(Get-Date -Format FileDateTime)") -itemType directory -ErrorAction Stop
54+
Write-Host "Existing MSBuild assemblies backed up to $BackupFolder"
55+
}
56+
else {
57+
Write-Host "Existing MSBuild assemblies won't be backed up"
58+
}
5259

5360
if ($runtime -eq "Detect") {
5461
if ($destination -like "*dotnet*sdk*") {
@@ -72,7 +79,12 @@ if ($runtime -eq "Desktop") {
7279
$targetFramework = "net8.0"
7380
}
7481

75-
$bootstrapBinDirectory = "artifacts\bin\MSBuild.Bootstrap\$configuration\$targetFramework"
82+
# If bootstrap directory is not defined in parameters, use the default location
83+
if ($bootstrapDirectory -eq "") {
84+
$bootstrapDirectory = "artifacts\bin\MSBuild.Bootstrap"
85+
}
86+
87+
$bootstrapBinDirectory = "$bootstrapDirectory\$configuration\$targetFramework"
7688

7789
$filesToCopyToBin = @(
7890
FileToCopy "$bootstrapBinDirectory\Microsoft.Build.dll"
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
33
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4-
<!-- For updating target framework from net 7.0 to net 8.0 in MSBuild 17.8 suppress baseline package validation error PKV006 on net 7.0 -->
5-
<Suppression>
6-
<DiagnosticId>PKV006</DiagnosticId>
7-
<Target>net7.0</Target>
8-
</Suppression>
94
</Suppressions>

0 commit comments

Comments
 (0)