Skip to content

Commit 42d63e8

Browse files
authored
Merge pull request #259 from microsoft/libtemplateUpdate
Merge latest Library.Template
2 parents 16e8f49 + b4b4ab0 commit 42d63e8

17 files changed

+154
-74
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"isRoot": true,
44
"tools": {
55
"powershell": {
6-
"version": "7.4.3",
6+
"version": "7.4.4",
77
"commands": [
88
"pwsh"
99
]
1010
},
1111
"dotnet-coverage": {
12-
"version": "17.11.3",
12+
"version": "17.11.5",
1313
"commands": [
1414
"dotnet-coverage"
1515
]
1616
},
1717
"nbgv": {
18-
"version": "3.6.139",
18+
"version": "3.6.141",
1919
"commands": [
2020
"nbgv"
2121
]

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,8 @@ dotnet_diagnostic.DOC202.severity = warning
185185
# CA1062: Validate arguments of public methods
186186
dotnet_diagnostic.CA1062.severity = warning
187187

188+
# CA2016: Forward the CancellationToken parameter
189+
dotnet_diagnostic.CA2016.severity = warning
190+
188191
[*.sln]
189192
indent_style = tab

Directory.Packages.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
66
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
77

8-
<MicroBuildVersion>2.0.152</MicroBuildVersion>
8+
<MicroBuildVersion>2.0.165</MicroBuildVersion>
99
</PropertyGroup>
1010
<ItemGroup>
1111
<PackageVersion Include="Microsoft.CodeAnalysis.ResxSourceGenerator" Version="3.3.5-beta1.23330.2" />
12-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
12+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
1313
<PackageVersion Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
1414
<PackageVersion Include="Moq" Version="4.20.70" />
15-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.1" />
16-
<PackageVersion Include="xunit" Version="2.8.1" />
15+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
16+
<PackageVersion Include="xunit" Version="2.9.0" />
1717
</ItemGroup>
1818
<ItemGroup>
19-
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.495" />
19+
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
2020
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
2121
<GlobalPackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
22-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.139" />
22+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.141" />
2323
<GlobalPackageReference Include="Nullable" Version="1.3.1" />
2424
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
2525
</ItemGroup>

azure-pipelines/InsertionMetadataPackage.nuspec

Lines changed: 0 additions & 17 deletions
This file was deleted.

azure-pipelines/artifacts/VSInsertion.ps1

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,7 @@ $result = @{
2929

3030
if ($env:IsOptProf) {
3131
$VSRepoPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/VSRepo"
32-
33-
$ArtifactBasePath = "$RepoRoot\obj\_artifacts"
34-
$ArtifactPath = "$ArtifactBasePath\VSInsertion"
35-
if (-not (Test-Path $ArtifactPath)) { New-Item -ItemType Directory -Path $ArtifactPath | Out-Null }
36-
37-
$profilingInputs = [xml](Get-Content -Path "$PSScriptRoot\..\ProfilingInputs.props")
38-
$profilingInputs.Project.ItemGroup.TestStore.Include = "vstsdrop:" + (& "$PSScriptRoot\..\variables\ProfilingInputsDropName.ps1")
39-
$profilingInputs.Save("$ArtifactPath\ProfilingInputs.props")
40-
41-
$InsertionMetadataVersion = $(dotnet tool run nbgv get-version -p "$RepoRoot\src" -f json | ConvertFrom-Json).NuGetPackageVersion
42-
if ($env:BUILD_BUILDID) {
43-
# We must ensure unique versions for the insertion metadata package so
44-
# it can contain information that is unique to this build.
45-
# In particular it includes the ProfilingInputsDropName, which contains the BuildId.
46-
# A non-unique package version here may collide with a prior run of this same commit,
47-
# ultimately resulting in a failure of the optprof run.
48-
$InsertionMetadataVersion += '.' + $env:BUILD_BUILDID
49-
}
50-
& (& "$PSScriptRoot\..\Get-NuGetTool.ps1") pack "$PSScriptRoot\..\InsertionMetadataPackage.nuspec" -OutputDirectory $VSRepoPackages -BasePath $ArtifactPath -Version $InsertionMetadataVersion | Out-Null
51-
if ($LASTEXITCODE -ne 0) {
52-
exit $LASTEXITCODE
53-
}
54-
55-
$result["$VSRepoPackages"] = (Get-ChildItem "$VSRepoPackages\Microsoft.VisualStudio.Validation.VSInsertionMetadata.$InsertionMetadataVersion.nupkg");
32+
$result["$VSRepoPackages"] = (Get-ChildItem "$VSRepoPackages\*.VSInsertionMetadata.*.nupkg");
5633
}
5734

5835
$result

azure-pipelines/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ parameters:
6565
type: boolean
6666
default: true
6767

68+
# Whether this is a special one-off build for inserting into VS for a validation insertion PR (that will never be merged).
69+
- name: ValidationBuild
70+
type: boolean
71+
default: false
72+
6873
- name: EnableAPIScan
6974
type: boolean
7075
default: false
@@ -191,6 +196,7 @@ jobs:
191196
parameters:
192197
EnableOptProf: ${{ parameters.EnableOptProf }}
193198
IsOptProf: ${{ parameters.IsOptProf }}
199+
ValidationBuild: ${{ parameters.ValidationBuild }}
194200

195201
- ${{ if not(parameters.IsOptProf) }}:
196202
- ${{ if parameters.EnableLinuxBuild }}:

azure-pipelines/dotnet.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ steps:
1717
condition: and(succeeded(), ${{ parameters.RunTests }})
1818

1919
- ${{ if parameters.IsOptProf }}:
20-
# We have to artifically run this script so that the extra .nupkg is produced for variables/InsertPropsValues.ps1 to notice.
21-
- powershell: azure-pipelines\artifacts\VSInsertion.ps1
22-
displayName: 🔧 Prepare VSInsertion artifact
20+
- script: dotnet pack src\VSInsertionMetadata -c $(BuildConfiguration) -warnaserror /bl:"$(Build.ArtifactStagingDirectory)/build_logs/VSInsertion-Pack.binlog"
21+
displayName: 🔧 dotnet pack VSInsertionMetadata
2322

2423
- powershell: azure-pipelines/variables/_pipelines.ps1
2524
failOnStderr: true

azure-pipelines/microbuild.after.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ parameters:
55
- name: IsOptProf
66
type: boolean
77
default: false
8+
- name: ValidationBuild
9+
type: boolean
810

911
steps:
10-
- task: MicroBuildCodesignVerify@3
11-
displayName: 🔍 Verify Signed Files
12-
inputs:
13-
TargetFolders: |
14-
$(Build.SourcesDirectory)/bin/Packages/$(BuildConfiguration)
15-
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
12+
- ${{ if not(parameters.ValidationBuild) }}: # skip CodesignVerify on validation builds because we don't even test-sign nupkg's.
13+
- task: MicroBuildCodesignVerify@3
14+
displayName: 🔍 Verify Signed Files
15+
inputs:
16+
TargetFolders: |
17+
$(Build.SourcesDirectory)/bin/Packages/$(BuildConfiguration)
18+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
1619

1720
- ${{ if parameters.IsOptProf }}:
1821
- task: ms-vscs-artifact.build-tasks.artifactDropTask-1.artifactDropTask@0

azure-pipelines/prepare-insertion-stages.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ parameters:
99
stages:
1010
- stage: release
1111
displayName: Publish
12-
condition: and(succeeded(), eq('${{ parameters.RealSign }}', 'true'))
1312
jobs:
1413
- ${{ if parameters.ArchiveSymbols }}:
1514
- job: symbol_archive
@@ -34,7 +33,10 @@ stages:
3433

3534
- ${{ if true }}: # leave the condition to avoid merge conflicts later.
3635
- job: push
37-
displayName: azure-public/vssdk feed
36+
${{ if parameters.RealSign }}:
37+
displayName: azure-public/vssdk feed
38+
${{ else }}:
39+
displayName: devdiv/vs-impl feed # Leave this as-is, since non-signed builds must not be pushed to public feeds.
3840
${{ if parameters.ArchiveSymbols }}:
3941
dependsOn: symbol_archive
4042
pool:
@@ -49,8 +51,12 @@ stages:
4951
packagesToPush: '$(Pipeline.Workspace)/deployables-Windows/NuGet/*.nupkg'
5052
packageParentPath: $(Pipeline.Workspace)/deployables-Windows/NuGet
5153
allowPackageConflicts: true
52-
nuGetFeedType: external
53-
publishFeedCredentials: azure-public/vssdk
54+
${{ if parameters.RealSign }}:
55+
nuGetFeedType: external
56+
publishFeedCredentials: azure-public/vssdk
57+
${{ else }}:
58+
nuGetFeedType: internal
59+
publishVstsFeed: vs-impl # Leave this as-is, since non-signed builds must not be pushed to public feeds.
5460
steps:
5561
- checkout: none
5662
- download: current
@@ -61,7 +67,8 @@ stages:
6167
- download: current
6268
artifact: deployables-Windows
6369
displayName: 🔻 Download deployables-Windows artifact
64-
- template: WIFtoPATauth.yml
65-
parameters:
66-
wifServiceConnectionName: azure-public/vside package push
67-
deadPATServiceConnectionId: 42175e93-c771-4a4f-a132-3cca78f44b3b # azure-public/vssdk
70+
- ${{ if parameters.RealSign }}:
71+
- template: WIFtoPATauth.yml
72+
parameters:
73+
wifServiceConnectionName: azure-public/vside package push
74+
deadPATServiceConnectionId: 42175e93-c771-4a4f-a132-3cca78f44b3b # azure-public/vssdk

azure-pipelines/publish-codecoverage.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ steps:
2121
continueOnError: true
2222
- powershell: azure-pipelines/Merge-CodeCoverage.ps1 -Path '$(Pipeline.Workspace)' -OutputFile coveragereport/merged.cobertura.xml -Format Cobertura -Verbose
2323
displayName: ⚙ Merge coverage
24-
- task: PublishCodeCoverageResults@1
24+
- task: PublishCodeCoverageResults@2
2525
displayName: 📢 Publish code coverage results to Azure DevOps
2626
inputs:
27-
codeCoverageTool: cobertura
2827
summaryFileLocation: coveragereport/merged.cobertura.xml
2928
failIfCoverageEmpty: true

0 commit comments

Comments
 (0)