Skip to content

Commit 84dbe2c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into copilot/fix-77001
* upstream/main: (206 commits) Remove bogus xlf tag (#80357) Fix missing type argument checks Add tests Use dotnet run file for generating compiler code (#80248) Only restore based on assets file changes if the actual content changed (#80341) make expressionbody analyzer use semanticspananalysis (#80339) [EnC] Use ignoreAssemblyKey: false to resolve symbol keys (#80342) Properly populate ExportedType metadata table in presence of extension block. (#80311) Propagate `params` to lambdas and local functions (#79880) Change 17.15 to VS 2026 preview. (#80325) Improve virtualproject support for older .NET SDKs (#80324) Update dependencies from https://github.com/dotnet/dotnet build 283666 (#80344) Update dependencies from https://github.com/dotnet/arcade build 20250917.6 (#80343) Simplifying Fix tests Fix tests Fix introduce variable placement in top level statements move to immutable types in signature help move to immutable types in signature help Fix check ...
2 parents 19efba6 + ff3bafa commit 84dbe2c

File tree

589 files changed

+10069
-4953
lines changed

Some content is hidden

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

589 files changed

+10069
-4953
lines changed

.vscode/tasks.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@
132132
"command": "dotnet",
133133
"type": "shell",
134134
"args": [
135-
"pwsh",
136-
"${workspaceFolder}/eng/generate-compiler-code.ps1"
135+
"run",
136+
"--file",
137+
"${workspaceFolder}/eng/generate-compiler-code.cs"
137138
],
138139
"problemMatcher": "$msCompile",
139140
"group": "build"

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
55
</PropertyGroup>
6-
<Import Project="eng\Directory.Packages.props" />
7-
</Project>
6+
<Import Project="eng\Packages.props" />
7+
</Project>

azure-pipelines-official.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@ extends:
290290

291291
- task: MicroBuildSigningPlugin@4
292292
inputs:
293-
signType: $(SignType)
293+
signType: ${{ parameters.SignType }}
294294
zipSources: false
295295
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
296296
# Set ConnectedPMEServiceName if the build is a CI build, otherwise it is not needed
297297
${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
298298
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
299-
condition: and(succeeded(), in(variables['SignType'], 'test', 'real'))
299+
condition: and(succeeded(), in('${{ parameters.SignType }}', 'test', 'real'))
300300

301301
- download: profilingInputs
302302
artifact: merged mibc
@@ -324,7 +324,7 @@ extends:
324324
/p:RepositoryName=$(Build.Repository.Name)
325325
/p:VisualStudioDropName=$(VisualStudio.DropName)
326326
/p:VSCodeOptimizationDataRoot="$(VSCodeOptimizationDataRoot)"
327-
/p:DotNetSignType=$(SignType)
327+
/p:DotNetSignType=${{ parameters.SignType }}
328328
/p:DotnetPublishUsingPipelines=true
329329
/p:IgnoreIbcMergeErrors=true
330330
/p:GenerateSbom=true
@@ -403,7 +403,7 @@ extends:
403403
componentPassword: $(dn-bot-dnceng-build-e-code-full-release-e-packaging-r)
404404
componentBuildProjectName: internal
405405
sourceBranch: "$(ComponentBranchName)"
406-
publishDataURI: "https://dev.azure.com/dnceng/internal/_apis/git/repositories/dotnet-roslyn/items?path=eng/config/PublishData.json&api-version=6.0"
406+
publishDataURI: "https://dev.azure.com/dnceng/internal/_apis/git/repositories/dotnet-roslyn/items?path=eng/config/PublishData.json&version=$(ComponentBranchName)&api-version=6.0"
407407
publishDataAccessToken: "$(System.AccessToken)"
408408
dropPath: '$(Pipeline.Workspace)\VSSetup'
409409
cherryPick: ${{ parameters.VisualStudioCherryPickSHA }}

azure-pipelines-pr-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ extends:
357357
vsBranchName: ${{ parameters.VisualStudioBranchName }}
358358
titlePrefix: ${{ parameters.OptionalTitlePrefix }}
359359
sourceBranch: $(ComponentBranchName)
360-
publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/main/eng/config/PublishData.json"
360+
publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/$(ComponentBranchName)/eng/config/PublishData.json"
361361
queueSpeedometerValidation: true
362362
dropPath: '$(Pipeline.Workspace)\VSSetup'
363363
retainInsertedBuild: false

azure-pipelines.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,12 @@ stages:
465465
- powershell: eng/validate-rules-missing-documentation.ps1 -ci
466466
displayName: Validate rules missing documentation
467467

468-
- powershell: eng/generate-compiler-code.ps1 -test -configuration Release
468+
- task: DotNetCoreCLI@2
469469
displayName: Generate Syntax Files
470+
inputs:
471+
command: 'custom'
472+
custom: 'run'
473+
arguments: '--file $(Build.SourcesDirectory)/eng/generate-compiler-code.cs -- -test -configuration Release'
470474

471475
- powershell: eng/validate-code-formatting.ps1 -ci -rootDirectory $(Build.SourcesDirectory)\src -includeDirectories Compilers\CSharp\Portable\Generated\, Compilers\VisualBasic\Portable\Generated\, ExpressionEvaluator\VisualBasic\Source\ResultProvider\Generated\
472476
displayName: Validate Generated Syntax Files

docs/compilers/CSharp/Compiler Breaking Changes - DotNet 10.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class C<extension> { } // type parameter may not be named "extension"
371371

372372
## Partial properties and events are now implicitly virtual and public
373373

374-
***Introduced in Visual Studio 2022 version 17.15***
374+
***Introduced in Visual Studio 2026 version 18.0 preview 1***
375375

376376
We have fixed [an inconsistency](https://github.com/dotnet/roslyn/issues/77346)
377377
where partial interface properties and events would not be implicitly `virtual` and `public` unlike their non-partial equivalents.
@@ -407,3 +407,30 @@ partial interface I
407407

408408
class C : I;
409409
```
410+
411+
## Missing `ParamCollectionAttribute` is reported in more cases
412+
413+
***Introduced in Visual Studio 2026 version 18.0***
414+
415+
If you are compiling a `.netmodule` (note that this doesn't apply to normal DLL/EXE compilations),
416+
and have a lambda or a local function with a `params` collection parameter,
417+
and the `ParamCollectionAttribute` is not found, a compilation error is now reported
418+
(because the attribute now must be [emitted](https://github.com/dotnet/roslyn/issues/79752) on the synthesized method
419+
but the attribute type itself is not synthesized by the compiler into a `.netmodule`).
420+
You can work around that by defining the attribute yourself.
421+
422+
```cs
423+
using System;
424+
using System.Collections.Generic;
425+
class C
426+
{
427+
void M()
428+
{
429+
Func<IList<int>, int> lam = (params IList<int> xs) => xs.Count; // error if ParamCollectionAttribute does not exist
430+
lam([1, 2, 3]);
431+
432+
int func(params IList<int> xs) => xs.Count; // error if ParamCollectionAttribute does not exist
433+
func(4, 5, 6);
434+
}
435+
}
436+
```

docs/contributing/Compiler Test Plan.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This document provides guidance for thinking about language interactions and tes
99
- BCL (including mono) and other customer impact
1010
- Determinism
1111
- Loading from metadata (source vs. loaded from metadata)
12-
- Public interface of compiler APIs (including semantic model APIs listed below):
12+
- Public compiler APIs (including semantic model and other APIs listed below):
1313
- GetDeclaredSymbol
1414
- GetEnclosingSymbol
1515
- GetSymbolInfo
@@ -29,6 +29,7 @@ This document provides guidance for thinking about language interactions and tes
2929
- ClassifyConversion
3030
- GetOperation (`IOperation`)
3131
- GetCFG (`ControlFlowGraph`)
32+
- DocumentationCommentId APIs
3233
- VB/F# interop
3334
- C++/CLI interop (particularly for metadata format changes, e.g. DIMs, static abstracts in interfaces, or generic attributes)
3435
- Performance and stress testing
File renamed without changes.

eng/Version.Details.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This file should be imported by eng/Versions.props
99
<MicrosoftCodeAnalysisPackageVersion>3.11.0</MicrosoftCodeAnalysisPackageVersion>
1010
<MicrosoftNetCompilersToolsetPackageVersion>4.10.0-1.24061.4</MicrosoftNetCompilersToolsetPackageVersion>
1111
<!-- dotnet/dotnet dependencies -->
12-
<SystemCommandLinePackageVersion>2.0.0-rc.2.25460.104</SystemCommandLinePackageVersion>
12+
<SystemCommandLinePackageVersion>2.0.0-rc.2.25467.107</SystemCommandLinePackageVersion>
1313
<!-- dotnet/runtime dependencies -->
1414
<MicrosoftBclAsyncInterfacesPackageVersion>9.0.0</MicrosoftBclAsyncInterfacesPackageVersion>
1515
<MicrosoftExtensionsConfigurationPackageVersion>9.0.0</MicrosoftExtensionsConfigurationPackageVersion>
@@ -38,9 +38,9 @@ This file should be imported by eng/Versions.props
3838
<SystemThreadingTasksDataflowPackageVersion>9.0.0</SystemThreadingTasksDataflowPackageVersion>
3939
<SystemWindowsExtensionsPackageVersion>9.0.0</SystemWindowsExtensionsPackageVersion>
4040
<!-- dotnet/arcade dependencies -->
41-
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.25458.3</MicrosoftDotNetArcadeSdkPackageVersion>
42-
<MicrosoftDotNetHelixSdkPackageVersion>11.0.0-beta.25458.3</MicrosoftDotNetHelixSdkPackageVersion>
43-
<MicrosoftDotNetXliffTasksPackageVersion>11.0.0-beta.25458.3</MicrosoftDotNetXliffTasksPackageVersion>
41+
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.25467.6</MicrosoftDotNetArcadeSdkPackageVersion>
42+
<MicrosoftDotNetHelixSdkPackageVersion>11.0.0-beta.25467.6</MicrosoftDotNetHelixSdkPackageVersion>
43+
<MicrosoftDotNetXliffTasksPackageVersion>11.0.0-beta.25467.6</MicrosoftDotNetXliffTasksPackageVersion>
4444
<!-- dotnet/symreader dependencies -->
4545
<MicrosoftDiaSymReaderPackageVersion>2.0.0</MicrosoftDiaSymReaderPackageVersion>
4646
<!-- dotnet/roslyn-analyzers dependencies -->

eng/Version.Details.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="roslyn" Sha="eac14590f69f6876d418cef9e8fdd3f44f6ef0b2" BarId="282708" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="roslyn" Sha="e533cfad385ba4f0ec96e35ad3d485dc13581906" BarId="283666" />
44
<ProductDependencies>
55
<!-- RoslynAnalyzers reference older builds of Roslyn and this is necessary for SourceBuild. -->
66
<Dependency Name="Microsoft.CodeAnalysis" Version="3.11.0">
77
<Uri>https://github.com/dotnet/roslyn</Uri>
88
<Sha>ae1fff344d46976624e68ae17164e0607ab68b10</Sha>
99
</Dependency>
10-
<Dependency Name="System.CommandLine" Version="2.0.0-rc.2.25460.104">
10+
<Dependency Name="System.CommandLine" Version="2.0.0-rc.2.25467.107">
1111
<Uri>https://github.com/dotnet/dotnet</Uri>
12-
<Sha>eac14590f69f6876d418cef9e8fdd3f44f6ef0b2</Sha>
12+
<Sha>e533cfad385ba4f0ec96e35ad3d485dc13581906</Sha>
1313
</Dependency>
1414
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
1515
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0">
@@ -115,13 +115,13 @@
115115
</Dependency>
116116
</ProductDependencies>
117117
<ToolsetDependencies>
118-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.25458.3">
118+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.25467.6">
119119
<Uri>https://github.com/dotnet/arcade</Uri>
120-
<Sha>e7357d6000fb383b01fd37b972a3b55904267da7</Sha>
120+
<Sha>06f338fe9a2a14ebb99d23d96818faaf2bccc663</Sha>
121121
</Dependency>
122-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="11.0.0-beta.25458.3">
122+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="11.0.0-beta.25467.6">
123123
<Uri>https://github.com/dotnet/arcade</Uri>
124-
<Sha>e7357d6000fb383b01fd37b972a3b55904267da7</Sha>
124+
<Sha>06f338fe9a2a14ebb99d23d96818faaf2bccc663</Sha>
125125
</Dependency>
126126
<Dependency Name="Microsoft.DiaSymReader" Version="2.0.0">
127127
<Uri>https://github.com/dotnet/symreader</Uri>
@@ -131,9 +131,9 @@
131131
<Uri>https://github.com/dotnet/roslyn</Uri>
132132
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>
133133
</Dependency>
134-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="11.0.0-beta.25458.3">
134+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="11.0.0-beta.25467.6">
135135
<Uri>https://github.com/dotnet/arcade</Uri>
136-
<Sha>e7357d6000fb383b01fd37b972a3b55904267da7</Sha>
136+
<Sha>06f338fe9a2a14ebb99d23d96818faaf2bccc663</Sha>
137137
</Dependency>
138138
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.0-preview.25375.1">
139139
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>

0 commit comments

Comments
 (0)