diff --git a/.editorconfig b/.editorconfig
index 753499f5afaf4..734314d6db6d7 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -151,6 +151,19 @@ dotnet_public_api_analyzer.require_api_files = true
# Workaround for https://github.com/dotnet/roslyn/issues/70570
dotnet_diagnostic.IDE0055.severity = warning
+# These xUnit analyzers were disabled temporarily to let us move to the
+# new xUnit and get past several component governance issues. The
+# following issue tracks enabling them
+#
+# https://github.com/dotnet/roslyn/issues/75093
+dotnet_diagnostic.xUnit1012.severity = none
+dotnet_diagnostic.xUnit1030.severity = none
+dotnet_diagnostic.xUnit1031.severity = none
+dotnet_diagnostic.xUnit2005.severity = none
+dotnet_diagnostic.xUnit2020.severity = none
+dotnet_diagnostic.xUnit2023.severity = none
+dotnet_diagnostic.xUnit2029.severity = none
+
# CSharp code style settings:
[*.cs]
# Newline settings
@@ -300,4 +313,4 @@ dotnet_diagnostic.RS0057.severity = error
dotnet_diagnostic.RS0058.severity = error
dotnet_diagnostic.RS0059.severity = error
dotnet_diagnostic.RS0060.severity = error
-dotnet_diagnostic.RS0061.severity = error
\ No newline at end of file
+dotnet_diagnostic.RS0061.severity = error
diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md
index 7bdba491ceb3f..43c22561d3b4b 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.md
+++ b/.github/ISSUE_TEMPLATE/bug-report.md
@@ -11,7 +11,7 @@ about: Report a bug in Roslyn
2.
3.
-A minimal repro, with source-code provided, is ideal. Using [sharplab](https://sharplab.io/) is preferred for compiler/language issues whenever possible.
+A minimal repro, with source-code provided, is ideal. Most compiler/language issues can be distilled into a snippet that can be pasted into [sharplab](https://sharplab.io/).
**Diagnostic Id**:
diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml
index a2e463c345e88..9d054bd460d2d 100644
--- a/.github/policies/resourceManagement.yml
+++ b/.github/policies/resourceManagement.yml
@@ -8,6 +8,7 @@ where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
+
- description: Close "Need More Info" Issues
frequencies:
- hourly:
@@ -23,8 +24,12 @@ configuration:
- closeIssue
- addReply:
reply: "Closing this issue as we've seen no reply to the request for more information. If you are able to get the requested information, please add it to the issue and we will retriage it. "
+
eventResponderTasks:
- - if:
+
+ - description: Auto-approve auto-merge PRs
+ triggerOnOwnActions: false
+ if:
- payloadType: Pull_Request
- isPullRequest
- labelAdded:
@@ -38,9 +43,10 @@ configuration:
then:
- approvePullRequest:
comment: Auto-approval
- description: Auto-approve auto-merge PRs
+
+ - description: Auto-approve maestro PRs
triggerOnOwnActions: false
- - if:
+ if:
- payloadType: Pull_Request
- isPullRequest
- isActivitySender:
@@ -55,9 +61,10 @@ configuration:
then:
- approvePullRequest:
comment: Auto-approve
- description: Auto-approve maestro PRs
- triggerOnOwnActions: false
- - if:
+
+ - description: Milestone tracking
+ triggerOnOwnActions: true
+ if:
- payloadType: Pull_Request
- isPullRequest
- or:
@@ -72,9 +79,10 @@ configuration:
then:
- addMilestone:
milestone: Next
- description: Milestone tracking
- triggerOnOwnActions: true
- - if:
+
+ - description: Auto-approve OneLoc PRs
+ triggerOnOwnActions: false
+ if:
- payloadType: Pull_Request
- isPullRequest
- isActivitySender:
@@ -88,9 +96,10 @@ configuration:
then:
- addLabel:
label: auto-merge
- description: Auto-approve OneLoc PRs
+
+ - description: Remove "Need More Info" on comment
triggerOnOwnActions: false
- - if:
+ if:
- payloadType: Issue_Comment
- isIssue
- isOpen
@@ -101,9 +110,10 @@ configuration:
label: untriaged
- removeLabel:
label: Need More Info
- description: Remove "Need More Info" on comment
+
+ - description: Label Community Pull Requests
triggerOnOwnActions: false
- - if:
+ if:
- payloadType: Pull_Request
- isPullRequest
- isAction:
@@ -142,13 +152,45 @@ configuration:
then:
- addLabel:
label: Community
- description: Label Community Pull Requests
+
+ - description: Adds "VSCode" tag on PRs which may affect C# extension.
+ triggerOnOwnActions: false
+ if:
+ - payloadType: Pull_Request
+ - isPullRequest
+ - filesMatchPattern:
+ pattern: 'src/(Analyzers|CodeStyle|Features|LanguageServer|Workspaces)/.*\.(cs|vb)$'
+ matchAny: true
+ - and:
+ - not:
+ isActivitySender:
+ user: dotnet-bot
+ issueAuthor: False
+ - not:
+ isActivitySender:
+ user: github-actions
+ issueAuthor: False
+ - or:
+ - isAction:
+ action: Opened
+ - isAction:
+ action: Synchronize
+ - and:
+ - not:
+ hasLabel:
+ label: VSCode
+ then:
+ - addLabel:
+ label: VSCode
+
+ - description: Add "Needs UX Triage" on PRs
triggerOnOwnActions: false
- - if:
+ if:
- payloadType: Pull_Request
- isPullRequest
- filesMatchPattern:
- pattern: '[xX][aA][mM][lL]$'
+ pattern: '.*\.[xX][aA][mM][lL]$'
+ matchAny: true
- and:
- not:
hasLabel:
@@ -187,12 +229,15 @@ configuration:
then:
- addLabel:
label: Needs UX Triage
- description: Add "Needs UX Triage" on PRs
+
+ - description: Adds "Needs API Review" on PRs that touch public APIs
triggerOnOwnActions: false
- - if:
+ if:
- payloadType: Pull_Request
+ - isPullRequest
- filesMatchPattern:
- pattern: .*/PublicAPI\.(Shipped|Unshipped)\.txt
+ pattern: '.*/PublicAPI\.(Shipped|Unshipped)\.txt'
+ matchAny: true
- not:
isActivitySender:
user: dotnet-bot
@@ -214,9 +259,10 @@ configuration:
label: Needs API Review
- addReply:
reply: This PR modifies public API files. Please follow the instructions at https://github.com/dotnet/roslyn/blob/main/docs/contributing/API%20Review%20Process.md for ensuring all public APIs are reviewed before merging.
- description: Adds "Needs API Review" on PRs that touch public APIs
+
+ - description: Close automatically generated PR tagger issues
triggerOnOwnActions: false
- - if:
+ if:
- payloadType: Issues
- isIssue
- hasLabel:
@@ -226,7 +272,6 @@ configuration:
isRegex: False
then:
- closeIssue
- description: Close automatically generated PR tagger issues
- triggerOnOwnActions: false
+
onFailure:
onSuccess:
diff --git a/.gitignore b/.gitignore
index bf020ffa52ad3..496f18e070dfe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@
.packages/
.nuget/
.complog/
+/MSBuild_Logs/
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 2b4dc7d689aeb..17ea7c3b29a62 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -35,5 +35,13 @@
"azure-pipelines.customSchemaFile": ".vscode/dnceng-schema.json",
"dotnet.defaultSolution": "Roslyn.sln",
"dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true,
- "dotnet.testWindow.disableAutoDiscovery": true
+ "dotnet.testWindow.disableAutoDiscovery": true,
+ "dotnet.testWindow.disableBuildOnRefresh": true,
+ "cSpell.words": [
+ "Nerdbank",
+ "NETCOREAPP",
+ "Unregistration",
+ "Unregistrations",
+ "Xunit"
+ ]
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 73dd695a2e492..5ac5060625cf5 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -25,22 +25,6 @@
"problemMatcher": "$msCompile",
"group": "build"
},
- {
- "label": "build with analyzers",
- "command": "./build.sh",
- "type": "shell",
- "args": [
- "--runAnalyzers"
- ],
- "windows": {
- "command": "${workspaceFolder}/build.cmd",
- "args": [
- "-runAnalyzers"
- ],
- },
- "problemMatcher": "$msCompile",
- "group": "build"
- },
{
"label": "build csc",
"command": "dotnet",
@@ -49,6 +33,7 @@
"msbuild",
"-p:RunAnalyzersDuringBuild=false",
"-p:GenerateFullPaths=true",
+ "-tl:off",
"src/Compilers/CSharp/csc/AnyCpu/csc.csproj"
],
"problemMatcher": "$msCompile",
@@ -62,6 +47,7 @@
"build",
"-p:RunAnalyzersDuringBuild=false",
"-p:GenerateFullPaths=true",
+ "-tl:off",
"Compilers.slnf"
],
"problemMatcher": "$msCompile",
@@ -75,6 +61,21 @@
"build",
"-p:RunAnalyzersDuringBuild=false",
"-p:GenerateFullPaths=true",
+ "-tl:off",
+ "Roslyn.sln"
+ ],
+ "problemMatcher": "$msCompile",
+ "group": "build"
+ },
+ {
+ "label": "build Roslyn.sln with analyzers",
+ "command": "dotnet",
+ "type": "shell",
+ "args": [
+ "build",
+ "-p:RunAnalyzersDuringBuild=true",
+ "-p:GenerateFullPaths=true",
+ "-tl:off",
"Roslyn.sln"
],
"problemMatcher": "$msCompile",
@@ -145,7 +146,7 @@
"build",
"-c",
"Debug",
- "src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj"
+ "src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj"
],
"problemMatcher": "$msCompile",
"group": "build"
diff --git a/Directory.Build.rsp b/Directory.Build.rsp
index 37bf61d3487f8..d2d2d1d2f4e8e 100644
--- a/Directory.Build.rsp
+++ b/Directory.Build.rsp
@@ -1,2 +1 @@
-# Workaround for https://github.com/dotnet/sdk/issues/41791
--p:_IsDisjointMSBuildVersion=false
+# This file intentionally left blank to avoid accidental import during build.
diff --git a/README.md b/README.md
index 8210dcff68ea6..ca941c7038165 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
The .NET Compiler Platform
-

+
Roslyn is the open-source implementation of both the C# and Visual Basic compilers with an API surface for building code analysis tools.
@@ -32,7 +32,7 @@ If you are interested in fixing issues and contributing directly to the code bas
The Roslyn community can be found on [GitHub Discussions](https://github.com/dotnet/roslyn/discussions), where you can ask questions, voice ideas, and share your projects.
-To chat with other community members, you can join the Roslyn [Discord](https://discord.com/invite/tGJvv88) or [Gitter](https://gitter.im/dotnet/roslyn).
+To chat with other community members, you can join the Roslyn channel on the [CSharp Community Discord](https://discord.com/invite/tGJvv88).
Our [Code of Conduct](CODE-OF-CONDUCT.md) applies to all Roslyn community channels and has adopted the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
@@ -55,39 +55,34 @@ Visit [Roslyn Architecture Overview](https://docs.microsoft.com/en-us/dotnet/csh
|Branch|Windows Debug|Windows Release|Unix Debug|
|:--:|:--:|:--:|:--:|
**main**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|
-**main-vs-deps**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|
#### Desktop Unit Tests
|Branch|Debug x86|Debug x64|Release x86|Release x64|
|:--:|:--:|:--:|:--:|:--:|
**main**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|
-**main-vs-deps**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|
#### CoreClr Unit Tests
|Branch|Windows Debug|Windows Release|Linux|
|:--:|:--:|:--:|:--:|
**main**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|
-**main-vs-deps**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|
#### Integration Tests
|Branch|Debug x86|Debug x64|Release x86|Release x64
|:--:|:--:|:--:|:--:|:--:|
**main**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main&view=logs)|
-**main-vs-deps**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=96&branchname=main-vs-deps&view=logs)|
#### Misc Tests
|Branch|Determinism|Analyzers|Build Correctness|Source build|TODO/Prototype|Spanish|MacOS|
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
**main**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[&configuration=Source-Build+(Managed)&label=build)](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main&view=logs)|
-**main-vs-deps**|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[&configuration=Source-Build+(Managed)&label=build)](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=95&branchname=main-vs-deps&view=logs)|
+
[//]: # (End current test results)
### .NET Foundation
-This project is part of the [.NET Foundation](http://www.dotnetfoundation.org/projects) along with other
-projects like [the .NET Runtime](https://github.com/dotnet/runtime/).
+This project is part of the [.NET Foundation](http://www.dotnetfoundation.org/projects) along with other projects like [the .NET Runtime](https://github.com/dotnet/runtime/).
diff --git a/azure-pipelines-integration-dartlab.yml b/azure-pipelines-integration-dartlab.yml
index 1f6926648b39f..c9dca1e99484e 100644
--- a/azure-pipelines-integration-dartlab.yml
+++ b/azure-pipelines-integration-dartlab.yml
@@ -24,6 +24,14 @@ resources:
trigger:
- main
+parameters:
+ - name: prNumber
+ type: string
+ default: 'None'
+ - name: sha
+ type: string
+ default: 'None'
+
variables:
- name: XUNIT_LOGS
value: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)
@@ -33,8 +41,22 @@ variables:
value: true
stages:
+- ${{ if ne(parameters.prNumber, 'None') }}:
+ - stage: GitHubCommentFirst
+ jobs:
+ - job: GitHubCommentFirstJob
+ steps:
+ - checkout: none
+ - task: GitHubComment@0
+ inputs:
+ gitHubConnection: 'dotnet-comment-bot-service-connection'
+ repositoryName: '$(Build.Repository.Name)'
+ id: ${{ parameters.prNumber }}
+ comment: 'Started DartLab pipeline [run]($(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)) for ${{ parameters.sha }}'
+
- template: \stages\visual-studio\agent.yml@DartLabTemplates
parameters:
+ name: VSIntegration
displayName: VS Integration
testLabPoolName: VS-Platform
visualStudioBootstrapperURI: https://vsdrop.corp.microsoft.com/file/v1/$(VisualStudio.BuildUnderTest.ProductsDropName);bootstrappers/Enterprise/vs_enterprise.exe
@@ -67,9 +89,37 @@ stages:
arguments: -DropNamePrefix 'Products' -VstsDropUrlsJson '$(Pipeline.Workspace)\VisualStudioBuildUnderTest\BuildArtifacts\VstsDropUrls.json' -OutVariableName 'VisualStudio.BuildUnderTest.ProductsDropName'
deployAndRunTestsStepList:
- checkout: RoslynMirror
+ fetchDepth: 1
+ fetchTags: false
- template: eng/pipelines/test-integration-job.yml
parameters:
configuration: $(_configuration)
oop64bit: $(_oop64bit)
lspEditor: false
skipCheckout: true
+
+- ${{ if ne(parameters.prNumber, 'None') }}:
+ - stage: GitHubCommentCompleted
+ condition: always()
+ dependsOn: VSIntegration
+ jobs:
+ - job: GitHubCommentCompletedSuccessfullyJob
+ condition: eq(stageDependencies.VSIntegration.result, 'Succeeded')
+ steps:
+ - checkout: none
+ - task: GitHubComment@0
+ inputs:
+ gitHubConnection: 'dotnet-comment-bot-service-connection'
+ repositoryName: '$(Build.Repository.Name)'
+ id: ${{ parameters.prNumber }}
+ comment: 'DartLab pipeline [run]($(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)) completed successfully for ${{ parameters.sha }}'
+ - job: GitHubCommentCompletedUnsuccessfullyJob
+ condition: ne(stageDependencies.VSIntegration.result, 'Succeeded')
+ steps:
+ - checkout: none
+ - task: GitHubComment@0
+ inputs:
+ gitHubConnection: 'dotnet-comment-bot-service-connection'
+ repositoryName: '$(Build.Repository.Name)'
+ id: ${{ parameters.prNumber }}
+ comment: 'DartLab pipeline [run]($(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)) did not complete successfully for ${{ parameters.sha }}'
\ No newline at end of file
diff --git a/azure-pipelines-integration.yml b/azure-pipelines-integration.yml
index b3945c448b11b..241c0fec59dfc 100644
--- a/azure-pipelines-integration.yml
+++ b/azure-pipelines-integration.yml
@@ -43,7 +43,7 @@ pr:
- CONTRIBUTING.md
- README.md
- src/Compilers/*
- - src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/README.md
+ - src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/README.md
variables:
- name: Codeql.Enabled
diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml
index 4ff514dfeec51..343323ce6d2ae 100644
--- a/azure-pipelines-official.yml
+++ b/azure-pipelines-official.yml
@@ -37,12 +37,19 @@ parameters:
type: boolean
default: true
-# The variables `_DotNetArtifactsCategory` and `_DotNetValidationArtifactsCategory` are required for proper publishing of build artifacts. See https://github.com/dotnet/roslyn/pull/38259
+schedules:
+ - cron: "0 8 23-29 * 0"
+ displayName: "Monthly smoke test"
+ branches:
+ include:
+ - main
+ - release/*
+ exclude:
+ - ""
+ always: true # Run even if there have been no source code changes since the last successful scheduled run
+ batch: false # Do not run the pipeline if the previously scheduled run is in-progress
+
variables:
- - name: _DotNetArtifactsCategory
- value: .NETCore
- - name: _DotNetValidationArtifactsCategory
- value: .NETCoreValidation
- group: DotNet-Roslyn-SDLValidation-Params
- name: Codeql.Enabled
value: true
@@ -53,6 +60,7 @@ variables:
- group: DotNet-Versions-Publish
- group: DotNet-VSTS-Infra-Access
- group: DotNet-DevDiv-Insertion-Workflow-Variables
+ - group: AzureDevOps-Artifact-Feeds-Pats
- name: _DevDivDropAccessToken
value: $(dn-bot-devdiv-drop-rw-code-rw)
- name: ArtifactServices.Drop.PAT
@@ -78,6 +86,10 @@ variables:
- name: Insertion.TitleSuffix
value: ''
+ - ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
+ - name: enableSourceIndex
+ value: true
+
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
@@ -92,6 +104,8 @@ extends:
enabled: false
suppression:
suppressionFile: $(Build.SourcesDirectory)\eng\config\guardian\.gdnsuppres
+ policheck:
+ enabled: true
tsa:
enabled: true
configFile: '$(Build.SourcesDirectory)/eng/TSAConfig.gdntsa'
@@ -107,11 +121,11 @@ extends:
displayName: Build and Test
jobs:
- - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.11') }}:
+ - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.12') }}:
- template: /eng/common/templates-official/job/onelocbuild.yml@self
parameters:
MirrorRepo: roslyn
- MirrorBranch: release/dev17.11
+ MirrorBranch: release/dev17.12
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-ROSLYN'
@@ -291,8 +305,6 @@ extends:
/p:RepositoryName=$(Build.Repository.Name)
/p:VisualStudioDropName=$(VisualStudio.DropName)
/p:DotNetSignType=$(SignType)
- /p:PublishToSymbolServer=true
- /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotnetPublishUsingPipelines=true
/p:IgnoreIbcMergeErrors=true
/p:GenerateSbom=true
@@ -339,6 +351,15 @@ extends:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals windows.vs2022.amd64
+ - ${{ if eq(variables.enableSourceIndex, 'true') }}:
+ - template: /eng/common/templates-official/job/source-index-stage1.yml@self
+ parameters:
+ sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng\build.ps1 -configuration Release -prepareMachine -ci -restore -build -binaryLogName Build.binlog -skipDocumentation -msbuildEngine dotnet /p:UsingToolVSSDK=false /p:GenerateSatelliteAssemblies=false /p:PublishReadyToRun=false"
+ binlogPath: artifacts/log/$(BuildConfiguration)/Build.binlog
+ pool:
+ name: $(DncEngInternalBuildPool)
+ demands: ImageOverride -equals 1es-windows-2022
+
- stage: insert
dependsOn:
- publish_using_darc
diff --git a/azure-pipelines-pr-validation.yml b/azure-pipelines-pr-validation.yml
index b47158c36063d..010ef4e297eca 100644
--- a/azure-pipelines-pr-validation.yml
+++ b/azure-pipelines-pr-validation.yml
@@ -26,12 +26,7 @@ parameters:
type: boolean
default: false
-# The variables `_DotNetArtifactsCategory` and `_DotNetValidationArtifactsCategory` are required for proper publishing of build artifacts. See https://github.com/dotnet/roslyn/pull/38259
variables:
- - name: _DotNetArtifactsCategory
- value: .NETCore
- - name: _DotNetValidationArtifactsCategory
- value: .NETCoreValidation
- group: DotNet-Roslyn-SDLValidation-Params
- group: DotNet-Roslyn-Insertion-Variables
- name: Codeql.Enabled
@@ -253,8 +248,6 @@ extends:
/p:RepositoryName=$(Build.Repository.Name)
/p:VisualStudioDropName=$(VisualStudio.DropName)
/p:DotNetSignType=$(SignType)
- /p:PublishToSymbolServer=true
- /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotnetPublishUsingPipelines=true
/p:IgnoreIbcMergeErrors=true
/p:GenerateSbom=true
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 177845e3afeb1..39bf2f2c610a1 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -19,7 +19,7 @@ pr:
exclude:
- docs/*
- eng/config/PublishData.json
- - src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/README.md
+ - src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/README.md
- .vscode/*
- .github/*
- .devcontainer/*
@@ -391,6 +391,8 @@ stages:
- powershell: eng/build.ps1 -configuration Release -prepareMachine -ci -build -pack -publish -sign -binaryLogName Build.binlog /p:DotnetPublishUsingPipelines=true
displayName: Build
+ # While this task is not executed in the official build, this serves as a PR check for whether symbol exclusions
+ # are properly set up.
- task: PowerShell@2
displayName: Publish Symbols Dry-Run
inputs:
diff --git a/docs/Language Feature Status.md b/docs/Language Feature Status.md
index 0981e775649e0..94061fcdccf3f 100644
--- a/docs/Language Feature Status.md
+++ b/docs/Language Feature Status.md
@@ -10,26 +10,25 @@ efforts behind them.
| Feature | Branch | State | Developer | Reviewer | IDE Buddy | LDM Champ |
| ------- | ------ | ----- | --------- | -------- | --------- | --------- |
-| [Overload Resolution Priority](https://github.com/dotnet/csharplang/issues/7706) | PR not yet available | [In Progress](https://github.com/dotnet/roslyn/issues/74131) | [333fred](https://github.com/333fred) | [jcouv](https://github.com/jcouv), [cston](https://github.com/cston) | Not yet assigned | [333fred](https://github.com/333fred) |
| [First-class Span Types](https://github.com/dotnet/csharplang/issues/7905) | [FirstClassSpan](https://github.com/dotnet/roslyn/tree/features/FirstClassSpan) | [In Progress](https://github.com/dotnet/roslyn/issues/73445) | [jjonescz](https://github.com/jjonescz) | [cston](https://github.com/cston), [333fred](https://github.com/333fred) | | [333fred](https://github.com/333fred), [stephentoub](https://github.com/stephentoub) |
-| [Semi-auto-properties](https://github.com/dotnet/csharplang/issues/140) | [semi-auto-props](https://github.com/dotnet/roslyn/tree/features/semi-auto-props) | [In Progress](https://github.com/dotnet/roslyn/issues/57012) | [Youssef1313](https://github.com/Youssef1313) | [333fred](https://github.com/333fred), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
+| [`field` keyword in properties](https://github.com/dotnet/csharplang/issues/140) | [field-keyword](https://github.com/dotnet/roslyn/tree/features/field-keyword) | [In Progress](https://github.com/dotnet/roslyn/issues/57012) | [Youssef1313](https://github.com/Youssef1313), [cston](https://github.com/cston) | [333fred](https://github.com/333fred), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [Default in deconstruction](https://github.com/dotnet/roslyn/pull/25562) | [decon-default](https://github.com/dotnet/roslyn/tree/features/decon-default) | [In Progress](https://github.com/dotnet/roslyn/issues/25559) | [jcouv](https://github.com/jcouv) | [gafter](https://github.com/gafter) | | [jcouv](https://github.com/jcouv) |
| [Roles/Extensions](https://github.com/dotnet/csharplang/issues/5497) | [roles](https://github.com/dotnet/roslyn/tree/features/roles) | [In Progress](https://github.com/dotnet/roslyn/issues/66722) | [jcouv](https://github.com/jcouv) | [AlekseyTs](https://github.com/AlekseyTs), [jjonescz](https://github.com/jjonescz) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [MadsTorgersen](https://github.com/MadsTorgersen) |
-| [Ref Struct Interfaces](https://github.com/dotnet/csharplang/issues/7608) | [RefStructInterfaces](https://github.com/dotnet/roslyn/tree/features/RefStructInterfaces) | [Merged into 17.11p2](https://github.com/dotnet/roslyn/issues/72124) | [AlekseyTs](https://github.com/AlekseyTs) | [cston](https://github.com/cston), [jjonescz](https://github.com/jjonescz) | [ToddGrun](https://github.com/ToddGrun) | [agocke](https://github.com/agocke), [jaredpar](https://github.com/jaredpar) |
# C# 13.0
| Feature | Branch | State | Developer | Reviewer | IDE Buddy | LDM Champ |
| ------- | ------ | ----- | --------- | -------- | --------- | --------- |
| [Escape character](https://github.com/dotnet/csharplang/issues/7400) | N/A | [Merged into 17.9p1](https://github.com/dotnet/roslyn/pull/70497) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv), [RikkiGibson](https://github.com/RikkiGibson) | (no IDE impact) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
-| [Method group natural type improvements](https://github.com/dotnet/csharplang/blob/main/proposals/method-group-natural-type-improvements.md) | main | [Merged into 17.9p2](https://github.com/dotnet/roslyn/issues/69432) | [jcouv](https://github.com/jcouv) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | (no IDE impact) | [jcouv](https://github.com/jcouv) |
+| [Method group natural type improvements](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/method-group-natural-type-improvements.md) | main | [Merged into 17.9p2](https://github.com/dotnet/roslyn/issues/69432) | [jcouv](https://github.com/jcouv) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | (no IDE impact) | [jcouv](https://github.com/jcouv) |
| [`Lock` object](https://github.com/dotnet/csharplang/issues/7104) | [LockObject](https://github.com/dotnet/roslyn/tree/features/LockObject) | [Merged into 17.10p2](https://github.com/dotnet/roslyn/issues/71888) | [jjonescz](https://github.com/jjonescz) | [cston](https://github.com/cston), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) (needs IDE fixer) | [stephentoub](https://github.com/stephentoub) |
| Implicit indexer access in object initializers | main | [Merged into 17.9p3](https://github.com/dotnet/roslyn/pull/70649) | [jcouv](https://github.com/jcouv) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | (no IDE impact) | |
| [Params-collections](https://github.com/dotnet/csharplang/issues/7700) | main | [Merged to 17.10p3](https://github.com/dotnet/roslyn/issues/71137) | [AlekseyTs](https://github.com/AlekseyTs) | [RikkiGibson](https://github.com/RikkiGibson), [333fred](https://github.com/333fred) | [akhera99](https://github.com/akhera99) (needs IDE fixer) | [MadsTorgersen](https://github.com/MadsTorgersen), [AlekseyTs](https://github.com/AlekseyTs) |
-| [Ref/unsafe in iterators/async](https://github.com/dotnet/csharplang/blob/main/proposals/ref-unsafe-in-iterators-async.md) | [RefInAsync](https://github.com/dotnet/roslyn/tree/features/RefInAsync) | [Merged into 17.11p2](https://github.com/dotnet/roslyn/issues/72662) | [jjonescz](https://github.com/jjonescz) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | (no IDE impact) | |
-| [`allows ref struct` constraint](https://github.com/dotnet/csharplang/issues/7608) | [RefStructInterfaces](https://github.com/dotnet/roslyn/tree/features/RefStructInterfaces) | [Merged into 17.11p2](https://github.com/dotnet/roslyn/issues/72124) | [AlekseyTs](https://github.com/AlekseyTs) | [cston](https://github.com/cston), [jjonescz](https://github.com/jjonescz) | [ToddGrun](https://github.com/ToddGrun) | [agocke](https://github.com/agocke), [jaredpar](https://github.com/jaredpar) |
+| [Ref/unsafe in iterators/async](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/ref-unsafe-in-iterators-async.md) | [RefInAsync](https://github.com/dotnet/roslyn/tree/features/RefInAsync) | [Merged into 17.11p2](https://github.com/dotnet/roslyn/issues/72662) | [jjonescz](https://github.com/jjonescz) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | (no IDE impact) | |
| [Overload Resolution Priority](https://github.com/dotnet/csharplang/issues/7706) | main | [Merged to 17.12p1](https://github.com/dotnet/roslyn/issues/74131) | [333fred](https://github.com/333fred) | [jcouv](https://github.com/jcouv), [cston](https://github.com/cston) | Not yet assigned | [333fred](https://github.com/333fred) |
| [Partial properties](https://github.com/dotnet/csharplang/issues/6420) | [partial-properties](https://github.com/dotnet/roslyn/tree/features/partial-properties) | [Merged into 17.11p3](https://github.com/dotnet/roslyn/issues/73090) | [RikkiGibson](https://github.com/RikkiGibson) | [jcouv](https://github.com/jcouv), [333fred](https://github.com/333fred) | [Cosifne](https://github.com/Cosifne) | [333fred](https://github.com/333fred), [RikkiGibson](https://github.com/RikkiGibson) |
+| [Ref Struct Interfaces/`allows ref struct` constraint](https://github.com/dotnet/csharplang/issues/7608) | [RefStructInterfaces](https://github.com/dotnet/roslyn/tree/features/RefStructInterfaces) | [Merged into 17.11p2](https://github.com/dotnet/roslyn/issues/72124) | [AlekseyTs](https://github.com/AlekseyTs) | [cston](https://github.com/cston), [jjonescz](https://github.com/jjonescz) | [ToddGrun](https://github.com/ToddGrun) | [agocke](https://github.com/agocke), [jaredpar](https://github.com/jaredpar) |
+| [Collection expression better conversion from expression](https://github.com/dotnet/csharplang/issues/8374) | main | [Merged into 17.12p3](https://github.com/dotnet/roslyn/pull/74993) | [333fred](https://github.com/333fred) | [cston](https://github.com/cston), [AlekseyTs](https://github.com/AlekseyTs) | (no IDE impact) | [333fred](https://github.com/333fred), [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
# C# 12.0
diff --git a/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md b/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md
index 9aa9f6adb5c8a..16ff18c9ad43f 100644
--- a/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md
+++ b/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md
@@ -162,7 +162,7 @@ DoAction(action, 1); // error CS1503: Argument 1: cannot convert from ' a, int p) => a(p, new[] { p });
```
-You can learn more about this change in the associated [proposal](https://github.com/dotnet/csharplang/blob/main/proposals/lambda-method-group-defaults.md#breaking-change).
+You can learn more about this change in the associated [proposal](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-12.0/lambda-method-group-defaults.md#breaking-change).
## For the purpose of definite assignment analysis, invocations of async local functions are no longer treated as being awaited
diff --git a/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md b/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md
index 698ae888af3c0..b1890cfa20293 100644
--- a/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md
+++ b/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md
@@ -44,3 +44,115 @@ unsafe class C // unsafe context
```
You can work around the break simply by adding the `unsafe` modifier to the local function.
+
+## Collection expression breaking changes with overload resolution in C# 13 and newer
+
+***Introduced in Visual Studio 2022 Version 17.12 and newer when using C# 13+***
+
+There are a few changes in collection expression binding in C# 13. Most of these are turning ambiguities into successful compilations,
+but a couple are breaking changes that either result in a new compilation error, or are a behavior breaking change. They are detailed
+below.
+
+### Empty collection expressions no longer use whether an API is a span to tiebreak on overloads
+
+When an empty collection expression is provided to an overloaded method, and there isn't a clear element type, we no longer use whether
+an API takes a `ReadOnlySpan` or a `Span` to decide whether to prefer that API. For example:
+
+```cs
+class C
+{
+ static void M(ReadOnlySpan ros) {}
+ static void M(Span