Skip to content

Commit 5370ecd

Browse files
committed
Merge the microbuild branch from https://github.com/aarnott/Library.Template
Specifically, this merges [ae78ccb from that repo](AArnott/Library.Template@ae78ccb).
2 parents 7723ea9 + ae78ccb commit 5370ecd

18 files changed

+199
-56
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"powershell": {
6-
"version": "7.5.0",
6+
"version": "7.5.1",
77
"commands": [
88
"pwsh"
99
],

.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.300-noble@sha256:9f7bd4d010026e15a57d9cf876f2f7d08c3eeed6a0ea987b8c5ba8c75e68e948
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
@@ -82,3 +82,17 @@ Configuration is in the `.github/renovate.json` file.
8282
When changing the renovate.json file, follow [these validation steps](https://docs.renovatebot.com/config-validation/).
8383

8484
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.
85+
86+
## Merging latest from Library.Template
87+
88+
### Maintaining your repo based on this template
89+
90+
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:
91+
`
92+
```ps1
93+
git fetch
94+
git checkout origin/main
95+
.\tools\MergeFrom-Template.ps1
96+
# resolve any conflicts, then commit the merge commit.
97+
git push origin -u HEAD
98+
```

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
88
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\NuGet\</PackageOutputPath>
99
<VSIXOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\Vsix\$(Platform)\</VSIXOutputPath>
10+
<SBOMFileDestPath>$(VSIXOutputPath)</SBOMFileDestPath>
1011
<Nullable>enable</Nullable>
1112
<ImplicitUsings>enable</ImplicitUsings>
1213
<AnalysisLevel>latest</AnalysisLevel>
@@ -38,6 +39,11 @@
3839
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3940
</PropertyGroup>
4041

42+
<PropertyGroup>
43+
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">13</LangVersion>
44+
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.vbproj'">16.9</LangVersion>
45+
</PropertyGroup>
46+
4147
<ItemGroup>
4248
<None Include="$(RepoRootPath)obj/NOTICE" Pack="true" PackagePath="" Visible="false" Condition=" Exists('$(RepoRootPath)obj/NOTICE') " />
4349
</ItemGroup>
@@ -56,4 +62,6 @@
5662
<PackageReleaseNotes Condition="'$(RepositoryUrl)'!=''">$(RepositoryUrl)/releases/tag/v$(Version)</PackageReleaseNotes>
5763
</PropertyGroup>
5864
</Target>
65+
66+
<Import Project="azure-pipelines\NuGetSbom.props" />
5967
</Project>

Directory.Build.targets

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
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'" />
@@ -12,6 +8,4 @@
128
<ItemGroup>
139
<PackageReference Include="Microsoft.CodeAnalysis.ResxSourceGenerator" PrivateAssets="all" />
1410
</ItemGroup>
15-
16-
<Import Project="azure-pipelines\NuGetSbom.targets" Condition="'$(IsPackable)'!='false'" />
1711
</Project>

Directory.Packages.props

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<PackageVersion Include="Moq" Version="4.20.72" />
1313
</ItemGroup>
1414
<ItemGroup Label="Library.Template">
15-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
15+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
1616
<PackageVersion Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
17-
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
18-
<PackageVersion Include="xunit.v3" Version="1.1.0" />
17+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.0" />
18+
<PackageVersion Include="xunit.v3" Version="2.0.2" />
1919
</ItemGroup>
2020
<ItemGroup>
2121
<!-- Put repo-specific GlobalPackageReference items in this group. -->
@@ -24,7 +24,8 @@
2424
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
2525
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
2626
<GlobalPackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
27-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
27+
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
28+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
2829
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
2930
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
3031
</ItemGroup>

SUPPORT.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Support
2+
3+
## How to file issues and get help
4+
5+
This project uses GitHub Issues to track bugs and feature requests.
6+
Please search the existing issues before filing new issues to avoid duplicates.
7+
For new issues, file your bug or feature request as a new Issue.
8+
9+
Note that this repo is primarily used for Visual Studio and related products and support will be focused on those scenarios.
10+
11+
## Microsoft Support Policy
12+
13+
Microsoft support for this software is available only for its use in officially supported products such as Visual Studio.
14+
Support and servicing is limited to the latest released version.
15+
For more information, see [Visual Studio Product Lifecycle and Servicing](https://learn.microsoft.com/visualstudio/productinfo/vs-servicing).
16+
Assisted support is available from a professional support engineer by opening a ticket with the [Microsoft assisted support team](https://support.serviceshub.microsoft.com/supportforbusiness/onboarding).

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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ jobs:
198198
IsOptProf: ${{ parameters.IsOptProf }}
199199

200200
- ${{ if and(parameters.EnableDotNetFormatCheck, not(parameters.EnableLinuxBuild)) }}:
201-
- script: dotnet format --verify-no-changes --no-restore
201+
- script: dotnet format --verify-no-changes
202202
displayName: 💅 Verify formatted code
203203
env:
204204
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
@@ -240,7 +240,7 @@ jobs:
240240
Is1ESPT: ${{ parameters.Is1ESPT }}
241241
RunTests: ${{ parameters.RunTests }}
242242
- ${{ if parameters.EnableDotNetFormatCheck }}:
243-
- script: dotnet format --verify-no-changes --no-restore
243+
- script: dotnet format --verify-no-changes
244244
displayName: 💅 Verify formatted code
245245
env:
246246
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
@@ -283,8 +283,16 @@ jobs:
283283
- macOS
284284
pool: ${{ parameters.windowsPool }} # Use Windows agent because PublishSymbols task requires it (https://github.com/microsoft/azure-pipelines-tasks/issues/13821).
285285
condition: succeededOrFailed()
286+
variables:
287+
ONEES_ENFORCED_CODEQL_ENABLED: false # CodeQL runs on build jobs, we don't need it here
286288
${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
287289
templateContext:
290+
${{ if not(parameters.RealSign) }}:
291+
mb:
292+
signing: # if the build is test-signed, install the signing plugin so that CSVTestSignPolicy.xml is available
293+
enabled: true
294+
zipSources: false
295+
signType: test
288296
outputParentDirectory: $(Build.ArtifactStagingDirectory)
289297
outputs:
290298
- output: pipelineArtifact

0 commit comments

Comments
 (0)