Skip to content

Commit 73e682e

Browse files
authored
Merge pull request #1488 from microsoft/dev/andarno/libtemplateUpdate
Merge latest Library.Template
2 parents 3c6bf80 + 2a77a81 commit 73e682e

31 files changed

+158
-95
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.2",
6+
"version": "7.5.3",
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.301-noble@sha256:4fd7d3e5aeb6cfb75e923a54cdb0b6e858b27ad3b517837917c57c2e632b5694
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0.305-noble@sha256:802e64ab9e113bdfa5d476ae00c7b40ab5c42da1792731c41a47f43bc4e74bdb
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.

.github/copilot-instructions.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copilot instructions for this repository
2+
3+
## High level guidance
4+
5+
* Review the `CONTRIBUTING.md` file for instructions to build and test the software.
6+
* Set the `NBGV_GitEngine` environment variable to `Disabled` before running any `dotnet` or `msbuild` commands.
7+
8+
## Software Design
9+
10+
* Design APIs to be highly testable, and all functionality should be tested.
11+
* Avoid introducing binary breaking changes in public APIs of projects under `src` unless their project files have `IsPackable` set to `false`.
12+
13+
## Testing
14+
15+
* There should generally be one test project (under the `test` directory) per shipping project (under the `src` directory). Test projects are named after the project being tested with a `.Test` suffix.
16+
* Tests should use the Xunit testing framework.
17+
* Some tests are known to be unstable. When running tests, you should skip the unstable ones by running `dotnet test --filter "TestCategory!=FailsInCloudTest"`.
18+
19+
## Coding style
20+
21+
* Honor StyleCop rules and fix any reported build warnings *after* getting tests to pass.
22+
* In C# files, use namespace *statements* instead of namespace *blocks* for all new files.
23+
* Add API doc comments to all new public and internal members.

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# You can define any steps you want, and they will run before the agent starts.
2727
# If you do not check out your code, Copilot will do this for you.
2828
steps:
29-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
29+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3030
with:
3131
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
3232
- name: ⚙ Install prerequisites

.github/workflows/docs.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ on:
55
branches:
66
- main
77

8-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9-
permissions:
10-
actions: read
11-
pages: write
12-
id-token: write
13-
contents: read
14-
158
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
169
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1710
concurrency:
@@ -20,12 +13,18 @@ concurrency:
2013

2114
jobs:
2215
publish-docs:
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
actions: read
19+
pages: write
20+
id-token: write
21+
contents: read
2322
environment:
2423
name: github-pages
2524
url: ${{ steps.deployment.outputs.page_url }}
2625
runs-on: ubuntu-latest
2726
steps:
28-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
27+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2928
with:
3029
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
3130
- name: ⚙ Install prerequisites
@@ -35,7 +34,7 @@ jobs:
3534
name: 📚 Generate documentation
3635

3736
- name: Upload artifact
38-
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
37+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
3938
with:
4039
path: docfx/_site
4140

.github/workflows/docs_validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
name: 📚 Doc validation
1414
runs-on: ubuntu-24.04
1515
steps:
16-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
1717
with:
1818
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
1919
- name: 🔗 Markup Link Checker (mlc)
20-
uses: becheran/mlc@88c9db09b8dabab813a2edd13f955b36aa73657a # v0.22.0
20+
uses: becheran/mlc@18a06b3aa2901ca197de59c8b0b1f54fdba6b3fa # v1.0.0
2121
with:
2222
args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/*,https://badges.gitter.im/*,https://github.com/*,https://app.gitter.im/* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://msrc.microsoft.com/*,https://www.microsoft.com/msrc*,https://microsoft.com/msrc*,https://microsoft.sharepoint.com/*
2323
- name: ⚙ Install prerequisites

.github/workflows/libtemplate-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
contents: write
1818
pull-requests: write
1919
steps:
20-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2121
with:
2222
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
2323

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
4+
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
55

66
# User-specific files
77
*.rsuser

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ assuming the working directory is the root of this repository:
4444
msbuild src
4545
```
4646

47-
[pwsh]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell?view=powershell-6
47+
[pwsh]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell
4848

4949
## Releases
5050

@@ -58,9 +58,9 @@ Push the tag.
5858
When your repo is hosted by GitHub and you are using GitHub Actions, you should create a GitHub Release using the standard GitHub UI.
5959
Having previously used `nbgv tag` and pushing the tag will help you identify the precise commit and name to use for this release.
6060

61-
After publishing the release, the `.github\workflows\release.yml` workflow will be automatically triggered, which will:
61+
After publishing the release, the `.github/workflows/release.yml` workflow will be automatically triggered, which will:
6262

63-
1. Find the most recent `.github\workflows\build.yml` GitHub workflow run of the tagged release.
63+
1. Find the most recent `.github/workflows/build.yml` GitHub workflow run of the tagged release.
6464
1. Upload the `deployables` artifact from that workflow run to your GitHub Release.
6565
1. If you have `NUGET_API_KEY` defined as a secret variable for your repo or org, any nuget packages in the `deployables` artifact will be pushed to nuget.org.
6666

@@ -71,7 +71,7 @@ Trigger the pipeline by adding the `auto-release` tag on a run of your main `azu
7171

7272
## Tutorial and API documentation
7373

74-
API and hand-written docs are found under the `docfx/` directory. and are built by [docfx](https://dotnet.github.io/docfx/).
74+
API and hand-written docs are found under the `docfx/` directory and are built by [docfx](https://dotnet.github.io/docfx/).
7575

7676
You can make changes and host the site locally to preview them by switching to that directory and running the `dotnet docfx --serve` command.
7777
After making a change, you can rebuild the docs site while the localhost server is running by running `dotnet docfx` again from a separate terminal.
@@ -93,11 +93,11 @@ If Renovate is not creating pull requests when you expect it to, check that the
9393
### Maintaining your repo based on this template
9494

9595
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-
`
96+
9797
```ps1
9898
git fetch
9999
git checkout origin/main
100-
.\tools\MergeFrom-Template.ps1
100+
./tools/MergeFrom-Template.ps1
101101
# resolve any conflicts, then commit the merge commit.
102102
git push origin -u HEAD
103103
```

CodeQL.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
path_classifiers:
2+
library:
3+
- 'test/**'

0 commit comments

Comments
 (0)