Skip to content

Commit 5c47a62

Browse files
authored
Merge branch 'main' into merge/release/10.0.1xx-to-main
2 parents 0e1a8cb + b910e57 commit 5c47a62

File tree

173 files changed

+3435
-1966
lines changed

Some content is hidden

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

173 files changed

+3435
-1966
lines changed

.github/copilot-instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Coding Style and Changes:
66
Testing:
77
- Large changes should always include test changes.
88
- The Skip parameter of the Fact attribute to point to the specific issue link.
9+
- To run tests in this repo:
10+
- Use the repo-local dotnet instance: `./.dotnet/dotnet`
11+
- For MSTest-style projects: `dotnet test path/to/project.csproj --filter "FullyQualifiedName~TestName"`
12+
- For XUnit test assemblies: `dotnet exec artifacts/bin/redist/Debug/TestAssembly.dll -method "*TestMethodName*"`
13+
- Examples:
14+
- `dotnet test test/dotnet.Tests/dotnet.Tests.csproj --filter "Name~ItShowsTheAppropriateMessageToTheUser"`
15+
- `dotnet exec artifacts/bin/redist/Debug/dotnet.Tests.dll -method "*ItShowsTheAppropriateMessageToTheUser*"`
916

1017
Output Considerations:
1118
- When considering how output should look, solicit advice from baronfel.

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ jobs:
3131
- name: Check dotnet version
3232
run: |
3333
dotnet --version
34+
35+
# For MCP servers like nuget's
36+
- name: Install .NET 10.x
37+
uses: actions/setup-dotnet@v4
38+
with:
39+
dotnet-version: |
40+
10.x
41+
dotnet-quality: preview
42+
43+
# for MCP servers
44+
- name: Install .NET 8.x
45+
uses: actions/setup-dotnet@v4
46+
with:
47+
dotnet-version: |
48+
8.x
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PR Main Branch Warning
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
branches:
6+
- main
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
comment:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Add warning comment to PR targeting main
16+
uses: actions/github-script@v7
17+
with:
18+
script: |
19+
github.rest.issues.createComment({
20+
issue_number: context.payload.pull_request.number,
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
body: `This PR is targeting \`main\`, which is now for .NET 11-facing work. If you intended to target .NET 10, either retarget this PR to \`release/10.0.1xx\` or make sure you backport the change to \`release/10.0.1xx\` after merging. See https://github.com/dotnet/sdk/issues/50394 for more details.`
24+
})

.github/workflows/update-man-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout repository code
1616
uses: actions/checkout@v4
17+
with:
18+
ref: release/10.0.1xx
1719

1820
- name: Update man-pages
1921
run: |
@@ -38,7 +40,7 @@ jobs:
3840
git checkout -b $branch
3941
git commit -m "$title"
4042
git push -u origin $branch --force
41-
gh pr create --base main --head $branch --title "$title" --body "$body"
43+
gh pr create --base release/10.0.1xx --head $branch --title "$title" --body "$body"
4244
fi
4345
env:
4446
GH_TOKEN: ${{ github.token }}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Update Static Web Assets Baselines
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pr_number:
7+
description: 'Pull Request number'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
update-baselines:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
fetch-depth: 0
24+
25+
- name: Checkout PR branch
26+
run: |
27+
gh pr checkout ${{ github.event.inputs.pr_number }}
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Run build script
32+
id: build
33+
run: |
34+
chmod +x ./build.sh
35+
./build.sh -c Release
36+
continue-on-error: true
37+
38+
- name: Update baselines
39+
id: update
40+
if: steps.build.outcome == 'success'
41+
run: |
42+
# Set DOTNET_ROOT to the local dotnet installation
43+
export DOTNET_ROOT="$(pwd)/.dotnet"
44+
# Prepend DOTNET_ROOT to PATH
45+
export PATH="$DOTNET_ROOT:$PATH"
46+
47+
# Run the update baselines script
48+
chmod +x src/RazorSdk/update-test-baselines.sh
49+
src/RazorSdk/update-test-baselines.sh
50+
continue-on-error: true
51+
52+
- name: Check for changes
53+
id: check-changes
54+
if: steps.update.outcome == 'success'
55+
run: |
56+
# Check if there are changes to any *.json files under the test folder
57+
if git diff --name-only | grep -E '^test/.*\.json$'; then
58+
echo "changes=true" >> $GITHUB_OUTPUT
59+
else
60+
echo "changes=false" >> $GITHUB_OUTPUT
61+
fi
62+
63+
- name: Commit and push changes
64+
id: commit
65+
if: steps.update.outcome == 'success' && steps.check-changes.outputs.changes == 'true'
66+
run: |
67+
git config --global user.name 'github-actions[bot]'
68+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
69+
70+
# Create commit with formatted date
71+
COMMIT_DATE=$(date -u +"%Y-%m-%d")
72+
git add test/**/*.json
73+
git commit -m "[Infrastructure] Update baselines $COMMIT_DATE"
74+
75+
# Push to the PR branch
76+
git push
77+
continue-on-error: true
78+
79+
- name: Comment on PR - No changes
80+
if: steps.update.outcome == 'success' && steps.check-changes.outputs.changes == 'false'
81+
run: |
82+
gh pr comment ${{ github.event.inputs.pr_number }} \
83+
--body "No baselines were updated."
84+
env:
85+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
87+
- name: Comment on PR - Changes pushed
88+
if: steps.commit.outcome == 'success'
89+
run: |
90+
gh pr comment ${{ github.event.inputs.pr_number }} \
91+
--body "Baselines updated."
92+
env:
93+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
95+
- name: Comment on PR - Failure
96+
if: steps.build.outcome == 'failure' || steps.update.outcome == 'failure' || (steps.check-changes.outputs.changes == 'true' && steps.commit.outcome == 'failure')
97+
run: |
98+
ERROR_MSG="Update baselines failed"
99+
100+
if [[ "${{ steps.build.outcome }}" == "failure" ]]; then
101+
ERROR_MSG="$ERROR_MSG: Build script failed"
102+
elif [[ "${{ steps.update.outcome }}" == "failure" ]]; then
103+
ERROR_MSG="$ERROR_MSG: Update baselines script failed"
104+
elif [[ "${{ steps.commit.outcome }}" == "failure" ]]; then
105+
ERROR_MSG="$ERROR_MSG: Failed to commit or push changes"
106+
fi
107+
108+
gh pr comment ${{ github.event.inputs.pr_number }} \
109+
--body "$ERROR_MSG"
110+
env:
111+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Directory.Build.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,15 @@
9797
<!-- Include SourcePackage.editorconfig in all source packages. -->
9898
<Target Name="_AddEditorConfigToSourcePackage">
9999
<ItemGroup>
100-
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" />
100+
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'" />
101+
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.netstandard.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'" />
101102
</ItemGroup>
102103
</Target>
103104

104105
<!-- Include linked files. Arcade SDK only includes files in the project directory. -->
105106
<Target Name="_AddLinkedCompileItemsToSourcePackage">
106107
<ItemGroup>
107-
<TfmSpecificPackageFile Include="@(Compile)" Condition="'%(Compile.Link)' != ''" PackagePath="contentFiles/cs/$(TargetFramework)/%(Compile.Link)" BuildAction="Compile"/>
108+
<TfmSpecificPackageFile Include="@(Compile)" Condition="'%(Compile.Link)' != '' and '%(Compile.Pack)' != 'false'" PackagePath="contentFiles/cs/$(TargetFramework)/%(Compile.Link)" BuildAction="Compile"/>
108109
</ItemGroup>
109110
</Target>
110111

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzer.Testing" Version="$(MicrosoftCodeAnalysisAnalyzerTestingVersion)" />
2323
<PackageVersion Include="Microsoft.CodeAnalysis.BuildClient" Version="$(MicrosoftCodeAnalysisBuildClientVersion)" />
2424
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="$(MicrosoftCodeAnalysisPackageVersion)" />
25+
<PackageVersion Include="Microsoft.CodeAnalysis.Contracts" Version="$(MicrosoftCodeAnalysisPackageVersion)" />
2526
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpPackageVersion)" />
2627
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="$(MicrosoftCodeAnalysisPackageVersion)" />
2728
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Features" Version="$(MicrosoftCodeAnalysisCSharpPackageVersion)" />

documentation/manpages/sdk/dotnet-nuget-locals.1

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-nuget-locals" "1" "2025-06-13" "" ".NET Documentation"
17+
.TH "dotnet-nuget-locals" "1" "2025-08-15" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet nuget locals
2020
.PP
@@ -42,7 +42,7 @@ The \f[V]dotnet nuget locals\f[R] command clears or lists local NuGet resources
4242
The cache location to list or clear.
4343
It accepts one of the following values:
4444
.IP \[bu] 2
45-
\f[V]all\f[R] - Indicates that the specified operation is applied to all cache types: http-request cache, global packages cache, and the temporary cache.
45+
\f[V]all\f[R] - Indicates that the specified operation is applied to all cache types: http-request cache, global packages cache, temporary cache, and plugins cache.
4646
.IP \[bu] 2
4747
\f[V]http-cache\f[R] - Indicates that the specified operation is applied only to the http-request cache.
4848
The other cache locations aren\[cq]t affected.
@@ -52,6 +52,9 @@ The other cache locations aren\[cq]t affected.
5252
.IP \[bu] 2
5353
\f[V]temp\f[R] - Indicates that the specified operation is applied only to the temporary cache.
5454
The other cache locations aren\[cq]t affected.
55+
.IP \[bu] 2
56+
\f[V]plugins-cache\f[R] - Indicates that the specified operation is applied only to the plugins cache.
57+
The other cache locations aren\[cq]t affected.
5558
.RE
5659
.SH OPTIONS
5760
.IP \[bu] 2
@@ -83,7 +86,7 @@ The list option is used to display the location of the specified cache type.
8386
.RE
8487
.SH EXAMPLES
8588
.IP \[bu] 2
86-
Displays the paths of all the local cache directories (http-cache directory, global-packages cache directory, and temporary cache directory):
89+
Displays the paths of all the local cache directories (http-cache directory, global-packages cache directory, temporary cache directory, and plugins cache directory):
8790
.RS 2
8891
.IP
8992
.nf
@@ -103,7 +106,17 @@ dotnet nuget locals http-cache --list
103106
.fi
104107
.RE
105108
.IP \[bu] 2
106-
Clears all files from all local cache directories (http-cache directory, global-packages cache directory, and temporary cache directory):
109+
Displays the path for the local plugins cache directory:
110+
.RS 2
111+
.IP
112+
.nf
113+
\f[C]
114+
dotnet nuget locals plugins-cache --list
115+
\f[R]
116+
.fi
117+
.RE
118+
.IP \[bu] 2
119+
Clears all files from all local cache directories (http-cache directory, global-packages cache directory, temporary cache directory, and plugins cache directory):
107120
.RS 2
108121
.IP
109122
.nf
@@ -132,6 +145,16 @@ dotnet nuget locals temp -c
132145
\f[R]
133146
.fi
134147
.RE
148+
.IP \[bu] 2
149+
Clears all files in local plugins cache directory:
150+
.RS 2
151+
.IP
152+
.nf
153+
\f[C]
154+
dotnet nuget locals plugins-cache -c
155+
\f[R]
156+
.fi
157+
.RE
135158
.SS Troubleshooting
136159
.PP
137160
For information on common problems and errors while using the \f[V]dotnet nuget locals\f[R] command, see Managing the NuGet cache.

documentation/manpages/sdk/dotnet-nuget-push.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-nuget-push" "1" "2025-06-13" "" ".NET Documentation"
17+
.TH "dotnet-nuget-push" "1" "2025-08-15" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet nuget push
2020
.PP
@@ -26,7 +26,7 @@ dotnet-nuget-push - Pushes a package to the server and publishes it.
2626
.IP
2727
.nf
2828
\f[C]
29-
dotnet nuget push [<ROOT>] [-d|--disable-buffering] [--force-english-output]
29+
dotnet nuget push [<ROOT>] [--allow-insecure-connections] [-d|--disable-buffering] [--force-english-output]
3030
[--interactive] [-k|--api-key <API_KEY>] [-n|--no-symbols]
3131
[--no-service-endpoint] [-s|--source <SOURCE>] [--skip-duplicate]
3232
[-sk|--symbol-api-key <API_KEY>] [-ss|--symbol-source <SOURCE>]
@@ -73,6 +73,12 @@ Specifies the file path to the package to be pushed.
7373
.RE
7474
.SH OPTIONS
7575
.IP \[bu] 2
76+
\f[B]\f[VB]--allow-insecure-connections\f[B]\f[R]
77+
.RS 2
78+
.PP
79+
Allows pushing to HTTP sources (insecure).
80+
.RE
81+
.IP \[bu] 2
7682
\f[B]\f[VB]-d|--disable-buffering\f[B]\f[R]
7783
.RS 2
7884
.PP

documentation/manpages/sdk/dotnet-nuget-sign.1

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-nuget-sign" "1" "2025-06-13" "" ".NET Documentation"
17+
.TH "dotnet-nuget-sign" "1" "2025-08-15" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet nuget sign
2020
.PP
@@ -49,8 +49,8 @@ The \f[V]dotnet nuget sign\f[R] command signs all the packages matching the firs
4949
The certificate with the private key can be obtained from a file or from a certificate installed in a certificate store by providing a subject name or a SHA-1 fingerprint.
5050
.RS
5151
.PP
52-
This command requires a certificate root store that is valid for both code signing and timestamping.
53-
Also, this command may not be supported on some combinations of operating system and .NET SDK.
52+
This command requires a certificate root store that\[cq]s valid for both code signing and timestamping.
53+
Also, this command might not be supported on some combinations of operating system and .NET SDK.
5454
For more information, see NuGet signed package verification.
5555
.RE
5656
.SH ARGUMENTS
@@ -108,9 +108,11 @@ If there are multiple matching certificates in the result, or no matching certif
108108
Specifies the fingerprint of the certificate used to search a local certificate store for the certificate.
109109
.PP
110110
Starting with .NET 9, this option can be used to specify the SHA-1, SHA-256, SHA-384, or SHA-512 fingerprint of the certificate.
111-
However, a \f[V]NU3043\f[R] warning is raised when a SHA-1 certificate fingerprint is used because it is no longer considered secure.
111+
However, a \f[V]NU3043\f[R] warning is raised when a SHA-1 certificate fingerprint is used because it\[cq]s no longer considered secure.
112+
In .NET 10 and later versions, the warning is elevated to an error.
113+
Only SHA-2 family fingerprints (SHA-256, SHA-384, and SHA-512) are supported.
112114
.PP
113-
All the previous versions of the .NET SDK continue to accept only SHA-1 certificate fingerprint.
115+
All pre-.NET 9 versions of the .NET SDK continue to accept only SHA-1 certificate fingerprint.
114116
.RE
115117
.IP \[bu] 2
116118
\f[B]\f[VB]--certificate-password <PASSWORD>\f[B]\f[R]
@@ -196,12 +198,12 @@ dotnet nuget sign foo.nupkg --certificate-path cert.pfx --certificate-password p
196198
.fi
197199
.RE
198200
.IP \[bu] 2
199-
Sign \f[I]foo.nupkg\f[R] with certificate (password protected) matches with the specified SHA-1 fingerprint in the default certificate store (CurrentUser):
201+
Sign \f[I]foo.nupkg\f[R] with certificate (password protected) matches with the specified SHA-256 fingerprint in the default certificate store (CurrentUser):
200202
.RS 2
201203
.IP
202204
.nf
203205
\f[C]
204-
dotnet nuget sign foo.nupkg --certificate-fingerprint 89967D1DD995010B6C66AE24FF8E66885E6E03A8 --certificate-password password
206+
dotnet nuget sign foo.nupkg --certificate-fingerprint B2C40F2F8775D7B7EBEB76BD5A9D3A4BC3F4B8A4D8D7C5F8A4C6B3E7A9E2D5F1 --certificate-password password
205207
\f[R]
206208
.fi
207209
.RE
@@ -216,12 +218,12 @@ dotnet nuget sign foo.nupkg --certificate-subject-name \[dq]Test certificate for
216218
.fi
217219
.RE
218220
.IP \[bu] 2
219-
Sign \f[I]foo.nupkg\f[R] with certificate (password protected) matches with the specified SHA-1 fingerprint in the certificate store CurrentUser:
221+
Sign \f[I]foo.nupkg\f[R] with certificate (password protected) matches with the specified SHA-256 fingerprint in the certificate store CurrentUser:
220222
.RS 2
221223
.IP
222224
.nf
223225
\f[C]
224-
dotnet nuget sign foo.nupkg --certificate-fingerprint 89967D1DD995010B6C66AE24FF8E66885E6E03A8 --certificate-password password --certificate-store-location CurrentUser --certificate-store-name Root
226+
dotnet nuget sign foo.nupkg --certificate-fingerprint B2C40F2F8775D7B7EBEB76BD5A9D3A4BC3F4B8A4D8D7C5F8A4C6B3E7A9E2D5F1 --certificate-password password --certificate-store-location CurrentUser --certificate-store-name Root
225227
\f[R]
226228
.fi
227229
.RE

0 commit comments

Comments
 (0)