Skip to content

Commit 71ed347

Browse files
committed
Merge the microbuild branch from https://github.com/aarnott/Library.Template
Specifically, this merges [5e856e2 from that repo](AArnott/Library.Template@5e856e2).
2 parents d90950f + 5e856e2 commit 71ed347

File tree

11 files changed

+43
-29
lines changed

11 files changed

+43
-29
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
2-
FROM mcr.microsoft.com/dotnet/sdk:9.0.202-noble@sha256:332e0362dd210a10348d436a5fb7f87aeec28c2c53ac2c3c2659e57c22294d0e
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0.203-noble@sha256:2c9a4956a61fc45d9111fb36ec9fb86932e4842af9eb9bc9306bf8757f53674d
33

44
# Installing mono makes `dotnet test` work without errors even for net472.
55
# But installing it takes a long time, so it's excluded by default.

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,17 @@ Configuration is in the `.github/renovate.json` file.
8787
When changing the renovate.json file, follow [these validation steps](https://docs.renovatebot.com/config-validation/).
8888

8989
If Renovate is not creating pull requests when you expect it to, check that the [Renovate GitHub App](https://github.com/apps/renovate) is configured for your account or repo.
90+
91+
## Merging latest from Library.Template
92+
93+
### Maintaining your repo based on this template
94+
95+
The best way to keep your repo in sync with Library.Template's evolving features and best practices is to periodically merge the template into your repo:
96+
`
97+
```ps1
98+
git fetch
99+
git checkout origin/main
100+
.\tools\MergeFrom-Template.ps1
101+
# resolve any conflicts, then commit the merge commit.
102+
git push origin -u HEAD
103+
```

Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3636
</PropertyGroup>
3737

38+
<PropertyGroup>
39+
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">13</LangVersion>
40+
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.vbproj'">16.9</LangVersion>
41+
</PropertyGroup>
42+
3843
<ItemGroup>
3944
<None Include="$(RepoRootPath)obj/NOTICE" Pack="true" PackagePath="" Visible="false" Condition=" Exists('$(RepoRootPath)obj/NOTICE') " />
4045
</ItemGroup>
@@ -53,4 +58,6 @@
5358
<PackageReleaseNotes Condition="'$(RepositoryUrl)'!=''">$(RepositoryUrl)/releases/tag/v$(Version)</PackageReleaseNotes>
5459
</PropertyGroup>
5560
</Target>
61+
62+
<Import Project="azure-pipelines\NuGetSbom.props" />
5663
</Project>

Directory.Build.targets

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3-
<PropertyGroup>
4-
<LangVersion Condition="'$(Language)'=='C#'">13</LangVersion>
5-
<LangVersion Condition="'$(Language)'=='VB'">16.9</LangVersion>
6-
</PropertyGroup>
73
<ItemGroup>
84
<!-- Avoid compile error about missing namespace when combining ImplicitUsings with .NET Framework target frameworks. -->
95
<Using Remove="System.Net.Http" Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'" />
106
</ItemGroup>
11-
12-
<Import Project="azure-pipelines\NuGetSbom.targets" Condition="'$(IsPackable)'!='false'" />
137
</Project>

azure-pipelines/NuGetSbom.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<PropertyGroup>
3+
<GenerateSBOMThisProject>true</GenerateSBOMThisProject>
4+
<UseMicroBuildSbomPluginVersion>2</UseMicroBuildSbomPluginVersion>
5+
</PropertyGroup>
6+
</Project>

azure-pipelines/NuGetSbom.targets

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

azure-pipelines/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@ jobs:
200200
- ${{ if and(parameters.EnableDotNetFormatCheck, not(parameters.EnableLinuxBuild)) }}:
201201
- script: dotnet format --verify-no-changes --no-restore
202202
displayName: 💅 Verify formatted code
203-
env:
204-
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
205203

206204
- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
207205
- template: microbuild.after.yml
@@ -242,8 +240,6 @@ jobs:
242240
- ${{ if parameters.EnableDotNetFormatCheck }}:
243241
- script: dotnet format --verify-no-changes --no-restore
244242
displayName: 💅 Verify formatted code
245-
env:
246-
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
247243

248244
- ${{ if parameters.EnableMacOSBuild }}:
249245
- job: macOS
@@ -285,6 +281,12 @@ jobs:
285281
condition: succeededOrFailed()
286282
${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
287283
templateContext:
284+
${{ if not(parameters.RealSign) }}:
285+
mb:
286+
signing: # if the build is test-signed, install the signing plugin so that CSVTestSignPolicy.xml is available
287+
enabled: true
288+
zipSources: false
289+
signType: test
288290
outputParentDirectory: $(Build.ArtifactStagingDirectory)
289291
outputs:
290292
- output: pipelineArtifact

azure-pipelines/microbuild.after.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ parameters:
99
type: boolean
1010

1111
steps:
12-
- ${{ if not(parameters.SkipCodesignVerify) }}: # skip CodesignVerify on validation builds because we don't even test-sign nupkg's.
12+
- ${{ if not(parameters.SkipCodesignVerify) }}:
1313
- task: MicroBuildCodesignVerify@3
1414
displayName: 🔍 Verify Signed Files
1515
inputs:

azure-pipelines/prepare-insertion-stages.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ stages:
1818
- job: symbol_archive
1919
displayName: Archive symbols
2020
pool: VSEngSS-MicroBuild2022-1ES
21+
variables:
22+
ONEES_ENFORCED_CODEQL_ENABLED: false # CodeQL runs on build stages, we don't need it here
2123
steps:
2224
- checkout: none
2325
- download: current
@@ -72,6 +74,8 @@ stages:
7274
${{ else }}:
7375
nuGetFeedType: internal
7476
publishVstsFeed: vs-impl # Leave this as-is, since non-signed builds must not be pushed to public feeds.
77+
variables:
78+
ONEES_ENFORCED_CODEQL_ENABLED: false # CodeQL runs on build stages, we don't need it here
7579
steps:
7680
- checkout: none
7781
- download: current

azure-pipelines/vs-validation.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ extends:
3232
stages:
3333
- stage: Build
3434
variables:
35-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
36-
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages/
37-
BuildConfiguration: Release
38-
SkipCodesignVerify: true
35+
- template: /azure-pipelines/BuildStageVariables.yml@self
36+
- name: SkipCodesignVerify
37+
value: true
3938

4039
jobs:
4140
- template: /azure-pipelines/build.yml@self

0 commit comments

Comments
 (0)