Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0292a85

Browse files
authored
[automated] Merge branch 'release/10.0.2xx' => 'main' (#51207)
2 parents 026ef57 + 2e2ae82 commit 0292a85

File tree

332 files changed

+6659
-2236
lines changed

Some content is hidden

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

332 files changed

+6659
-2236
lines changed

.github/policies/resourceManagement.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
id:
1+
id:
22
name: GitOps.PullRequestIssueManagement
33
description: GitOps.PullRequestIssueManagement primitive
4-
owner:
4+
owner:
55
resource: repository
66
disabled: false
7-
where:
7+
where:
88
configuration:
99
resourceManagementConfiguration:
1010
scheduledSearches:
@@ -90,7 +90,7 @@ configuration:
9090
label: needs-breaking-change-doc-created
9191
- addReply:
9292
reply: >-
93-
Added `needs-breaking-change-doc-created` label because this PR has the `breaking-change` label.
93+
Added `needs-breaking-change-doc-created` label because this PR has the `breaking-change` label.
9494
9595
9696
When you commit this breaking change:
@@ -103,5 +103,23 @@ configuration:
103103
104104
You can refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md)
105105
description: Add breaking change instructions to PR.
106-
onFailure:
107-
onSuccess:
106+
- description: Remind Telemetry PR authors of the telemetry guidelines
107+
if:
108+
- payloadType: Pull_Request
109+
- labelAdded:
110+
label: Area-Telemetry
111+
then:
112+
- addReply:
113+
reply: >-
114+
This PR has been labeled with `Area-Telemetry`. Please ensure that any telemetry changes in this PR
115+
116+
* comply with the [published guidance](https://learn.microsoft.com/dotnet/core/tools/telemetry#data-points)
117+
* are added to the [repo-local telemetry documentation](./documentation/project-docs/telemetry.md)
118+
* get a matching .NET Docs issue raised to document the telemetry changes
119+
* Go to https://learn.microsoft.com/dotnet/core/tools/telemetry
120+
* Scroll down to the bottom and click the 'Open a documentation issue' link to create an issue with pre-filled details
121+
- requestReview:
122+
reviewer: dsplaisted
123+
124+
onFailure:
125+
onSuccess:

.vsts-ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ extends:
9898
name: $(DncEngInternalBuildPool)
9999
image: windows.vs2022.amd64
100100
os: windows
101-
helixTargetQueue: windows.amd64.vs2022.pre
101+
helixTargetQueue: windows.amd64.vs2026.pre.scout
102102
oneESCompat:
103103
templateFolderName: templates-official
104104
publishTaskPrefix: 1ES.
105+
populateInternalRuntimeVariables: true
105106
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
106107
locBranch: release/10.0.1xx
107108
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
@@ -141,6 +142,14 @@ extends:
141142
_SignType: real
142143
dependsOn: Official_windows_x64
143144
downloadManifestMsiPackages: true
145+
### TestTemplatesCG ###
146+
# Note: This job is only used to allow the test templates to be built locally on the agent as opposed to Helix.
147+
# The tests acquire the templates' PackageReferences from NuGet, which allows them to be scanned by CG (component governance).
148+
# CG is only ran internally, so this job makes sense to only run alongside of the official jobs.
149+
- categoryName: TestTemplatesCG
150+
testProjects: $(Build.SourcesDirectory)/test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj
151+
testRunnerAdditionalArguments: -class Microsoft.DotNet.Cli.New.IntegrationTests.DotnetNewTestTemplatesTests
152+
publishXunitResults: true
144153

145154
############### LINUX ###############
146155
- template: /eng/pipelines/templates/jobs/sdk-job-matrix.yml@self
@@ -153,6 +162,7 @@ extends:
153162
oneESCompat:
154163
templateFolderName: templates-official
155164
publishTaskPrefix: 1ES.
165+
populateInternalRuntimeVariables: true
156166
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
157167
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
158168
timeoutInMinutes: 90
@@ -235,6 +245,7 @@ extends:
235245
oneESCompat:
236246
templateFolderName: templates-official
237247
publishTaskPrefix: 1ES.
248+
populateInternalRuntimeVariables: true
238249
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
239250
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
240251
timeoutInMinutes: 90
@@ -260,6 +271,8 @@ extends:
260271
vmImage: macOS-latest
261272
os: macOS
262273
helixTargetQueue: osx.13.arm64
274+
populateInternalRuntimeVariables: true
275+
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
263276
macOSJobParameterSets:
264277
- categoryName: TestBuild
265278
targetArchitecture: arm64
@@ -270,7 +283,9 @@ extends:
270283
- template: /eng/dotnet-format/dotnet-format-integration.yml@self
271284
parameters:
272285
oneESCompat:
286+
templateFolderName: templates-official
273287
publishTaskPrefix: 1ES.
288+
populateInternalRuntimeVariables: true
274289
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
275290

276291
############### PUBLISH STAGE ###############

.vsts-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ stages:
4242
name: $(DncEngPublicBuildPool)
4343
demands: ImageOverride -equals windows.vs2022.amd64.open
4444
os: windows
45-
helixTargetQueue: windows.amd64.vs2022.pre.open
45+
helixTargetQueue: windows.amd64.vs2026.pre.scout.open
4646

4747
############### LINUX ###############
4848
- template: /eng/pipelines/templates/jobs/sdk-job-matrix.yml

CODEOWNERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
/src/WasmSdk @lewing @akoeplinger @pavelsavara @maraf
3232

3333
# Area-Format
34-
/src/Cli/dotnet/commands/dotnet-format @arunchndr
35-
/test/dotnet-format.UnitTests @arunchndr
34+
/src/Cli/dotnet/commands/dotnet-format @phil-allen-msft
35+
/test/dotnet-format.UnitTests @phil-allen-msft
3636

3737
# Area-NuGet
3838
/src/Cli/dotnet/Commands/NuGet @dotnet/nuget-team
@@ -77,10 +77,10 @@
7777
/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ClickOnce.targets @sujitnayak
7878

7979
# Area-Watch
80-
/test/TestAssets/TestProjects/Watch*/ @tmat @arunchndr @dotnet/roslyn-ide
81-
/test/dotnet-watch.Tests/ @tmat @arunchndr @dotnet/roslyn-ide
80+
/test/TestAssets/TestProjects/Watch*/ @tmat @dotnet/roslyn-ide
81+
/test/dotnet-watch.Tests/ @tmat @dotnet/roslyn-ide
8282
/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/ @dotnet/aspnet-blazor-eng
83-
/src/BuiltInTools/* @tmat @arunchndr @dotnet/roslyn-ide
83+
/src/BuiltInTools/* @tmat @dotnet/roslyn-ide
8484
/src/BuiltInTools/BrowserRefresh @dotnet/aspnet-blazor-eng
8585
/src/BuiltInTools/AspireService @dotnet/aspnet-blazor-eng
8686

Directory.Packages.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
<NoWarn>$(NoWarn);NU1507</NoWarn>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.9" />
8+
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.18" />
99
<PackageVersion Include="AwesomeAssertions" Version="$(AwesomeAssertionsVersion)" />
1010
<PackageVersion Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPackageVersion)" />
1111
<PackageVersion Include="AwesomeAssertions.Json" Version="$(AwesomeAssertionsJsonVersion)" />
12+
<PackageVersion Include="MessagePack" Version="3.1.4" />
1213
<PackageVersion Include="MicroBuild.Plugins.SwixBuild.Dotnet" Version="1.1.87-gba258badda" />
1314
<PackageVersion Include="Microsoft.ApplicationInsights" Version="$(MicrosoftApplicationInsightsPackageVersion)" />
1415
<PackageVersion Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Version="$(MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion)" />
@@ -93,14 +94,15 @@
9394
<PackageVersion Include="Microsoft.WixToolset.Heat" Version="$(MicrosoftWixToolsetSdkVersion)" />
9495
<PackageVersion Include="Microsoft.WixToolset.Util.wixext" Version="$(MicrosoftWixToolsetSdkVersion)" />
9596
<PackageVersion Include="Microsoft.WixToolset.UI.wixext" Version="$(MicrosoftWixToolsetSdkVersion)" />
96-
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.386" />
97+
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.3.45" />
9798
<PackageVersion Include="Moq" Version="$(MoqPackageVersion)" />
9899
<PackageVersion Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" />
99100
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
100101
<PackageVersion Include="NuGet.Build.Tasks" Version="$(NuGetConfigurationPackageVersion)" />
101102
<PackageVersion Include="NuGet.Build.Tasks.Console" Version="$(NuGetBuildTasksConsolePackageVersion)" />
102103
<PackageVersion Include="NuGet.Build.Tasks.Pack" Version="$(NuGetConfigurationPackageVersion)" />
103104
<PackageVersion Include="NuGet.CommandLine.XPlat" Version="$(NuGetCommandLineXPlatPackageVersion)" />
105+
<PackageVersion Include="NuGet.Commands" Version="$(NuGetCommandsPackageVersion)" />
104106
<PackageVersion Include="NuGet.Common" Version="$(NuGetCommonPackageVersion)" />
105107
<PackageVersion Include="NuGet.Configuration" Version="$(NuGetConfigurationPackageVersion)" />
106108
<PackageVersion Include="NuGet.Frameworks" Version="$(NuGetBuildTasksPackageVersion)" />

build/RunTestTemplateTests.ps1

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

documentation/general/analyzer-redirecting.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,36 @@ Targeting an SDK (and hence also loading analyzers) with newer major version in
2828

2929
- Note that when `IAnalyzerAssemblyRedirector` is involved, Roslyn is free to not use shadow copy loading and instead load the DLLs directly.
3030

31+
- It is possible to opt out of analyzer redirecting by setting environment variable `DOTNET_ANALYZER_REDIRECTING=0`.
32+
That is an unsupported scenario though and compiler version mismatch errors will likely occur.
33+
3134
## Details
3235

3336
The VSIX contains some analyzers, for example:
3437

3538
```
36-
AspNetCoreAnalyzers\9.0.0-preview.5.24306.11\analyzers\dotnet\cs\Microsoft.AspNetCore.App.Analyzers.dll
37-
NetCoreAnalyzers\9.0.0-preview.5.24306.7\analyzers\dotnet\cs\System.Text.RegularExpressions.Generator.dll
38-
WindowsDesktopAnalyzers\9.0.0-preview.5.24306.8\analyzers\dotnet\System.Windows.Forms.Analyzers.dll
39-
SDKAnalyzers\9.0.100-dev\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
40-
WebSDKAnalyzers\9.0.100-dev\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll
39+
AspNetCoreAnalyzers\analyzers\dotnet\cs\Microsoft.AspNetCore.App.Analyzers.dll
40+
NetCoreAnalyzers\analyzers\dotnet\cs\System.Text.RegularExpressions.Generator.dll
41+
WindowsDesktopAnalyzers\analyzers\dotnet\System.Windows.Forms.Analyzers.dll
42+
SDKAnalyzers\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
43+
WebSDKAnalyzers\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll
44+
```
45+
46+
And metadata at `metadata.json`:
47+
48+
```json
49+
{
50+
"AspNetCoreAnalyzers": "9.0.0-preview.5.24306.11",
51+
"NetCoreAnalyzers": "9.0.0-preview.5.24306.7",
52+
"WindowsDesktopAnalyzers": "9.0.0-preview.5.24306.8",
53+
"SDKAnalyzers": "9.0.100-dev",
54+
"WebSDKAnalyzers": "9.0.100-dev",
55+
}
4156
```
4257

4358
Given an analyzer assembly load going through our `IAnalyzerAssemblyRedirector`,
4459
we will redirect it if the original path of the assembly being loaded matches the path of a VSIX-deployed analyzer -
45-
only segments of these paths starting after the version segment are compared,
60+
only relevant segments (see example below) of these paths are compared,
4661
plus the major and minor component of the versions must match.
4762

4863
For example, the analyzer
@@ -54,15 +69,20 @@ C:\Program Files\dotnet\sdk\9.0.100-preview.5.24307.3\Sdks\Microsoft.NET.Sdk\ana
5469
will be redirected to
5570

5671
```
57-
{VSIX}\SDKAnalyzers\9.0.100-dev\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
72+
{VSIX}\SDKAnalyzers\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll
5873
```
5974

60-
because
75+
where `metadata.json` has `"SDKAnalyzers": "9.0.100-dev"`, because
6176
1. the suffix `Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll` matches, and
6277
2. the version `9.0.100-preview.5.24307.3` has the same major and minor component (`9.0`) as the version `9.0.100-dev`
6378
(both versions are read from the paths, not DLL metadata).
6479

6580
Analyzers that cannot be matched will continue to be loaded from the SDK
6681
(and will fail to load if they reference Roslyn that is newer than is in VS).
6782

83+
### Implementation
84+
85+
Analyzer DLLs are contained in transport package `VS.Redist.Common.Net.Core.SDK.RuntimeAnalyzers`.
86+
The redirecting logic lives in "system" VS extension `Microsoft.Net.Sdk.AnalyzerRedirecting`.
87+
6888
[torn-sdk]: https://github.com/dotnet/sdk/issues/42087

documentation/general/dotnet-run-file.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Additionally, the implicit project file has the following customizations:
3232

3333
- `PublishAot` is set to `true`, see [`dotnet publish file.cs`](#other-commands) for more details.
3434

35+
- `UserSecretsId` is set to a hash of the entry point file path.
36+
3537
- [File-level directives](#directives-for-project-metadata) are applied.
3638

3739
- The following are virtual only, i.e., not preserved after [converting to a project](#grow-up):
@@ -287,16 +289,16 @@ The build is performed using MSBuild APIs on in-memory project files.
287289
If an up-to-date check detects that inputs didn't change in subsequent `dotnet run file.cs` invocations,
288290
building is skipped (as if `--no-build` option has been passed).
289291
The up-to-date check is not 100% precise (e.g., files imported through an implicit build file are not considered).
290-
It is possible to enforce a full build using `--no-cache` flag or `dotnet build file.cs`.
292+
It is possible to enforce a full build using `--no-cache` flag or `dotnet build file.cs`
293+
(for a more permanent opt-out, there is MSBuild property `FileBasedProgramCanSkipMSBuild=false`).
291294
Environment variable [`DOTNET_CLI_CONTEXT_VERBOSE=true`][verbose-env] can be used to get more details about caching decisions made by `dotnet run file.cs`.
292295

293296
There are multiple optimization levels - skipping build altogether, running just the C# compiler, or running full MSBuild.
294297
We always need to re-run MSBuild if implicit build files like `Directory.Build.props` change but
295298
from `.cs` files, the only relevant MSBuild inputs are the `#:` directives,
296299
hence we can first check the `.cs` file timestamps and for those that have changed, compare the sets of `#:` directives.
297300
If only `.cs` files change, it is enough to invoke `csc.exe` (directly or via a build server)
298-
re-using command-line arguments that the last MSBuild invocation passed to the compiler
299-
(you can opt out of this via an MSBuild property `FileBasedProgramCanSkipMSBuild=false`).
301+
re-using command-line arguments that the last MSBuild invocation passed to the compiler.
300302
If no inputs change, it is enough to start the target executable without invoking the build at all.
301303

302304
## Alternatives and future work

0 commit comments

Comments
 (0)