Skip to content

Commit 9e7a25f

Browse files
[release/8.0] Update Roslyn Versions for .NET 8 (#51527)
# [release/8.0] Update Roslyn Versions for .NET 8 Updated from `4.7.0-3.23314.3` to `4.8.0-3.23518.7`(the version that is specified in sdk and runtime) https://github.com/dotnet/runtime/blob/release/8.0/eng/Versions.props#L47 https://github.com/dotnet/sdk/blob/release/8.0.1xx/eng/Versions.props#L142 ## Description This is a routine change we complete every release to update the Roslyn version. As Roslyn doesn't follow the runtime ship schedule, ASP.NET Core manually updates this package version. Fixes #44265 ## Customer Impact Without this change the versions of packages are not updated. Incorrect version might lead to unexpected behavior. ## Regression? - [ ] Yes - [x] No ## Risk - [ ] High - [ ] Medium - [x] Low Correct version update ## Verification - [x] Manual (required) - [ ] Automated ## Packaging changes reviewed? - [ ] Yes - [ ] No - [x] N/A ---- ## When servicing release/2.1 - [ ] Make necessary changes in eng/PatchConfig.props --------- Co-authored-by: Safia Abdalla <safia@safia.rocks>
1 parent 8f29039 commit 9e7a25f

File tree

5 files changed

+32
-20
lines changed

5 files changed

+32
-20
lines changed

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,20 +344,20 @@
344344
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
345345
</Dependency>
346346
<!-- Not updated automatically -->
347-
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.7.0-3.23314.3">
347+
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="4.8.0-3.23518.7">
348348
<Uri>https://github.com/dotnet/roslyn</Uri>
349349
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
350350
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
351351
</Dependency>
352-
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.7.0-3.23314.3">
352+
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore" Version="4.8.0-3.23518.7">
353353
<Uri>https://github.com/dotnet/roslyn</Uri>
354354
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
355355
</Dependency>
356-
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.7.0-3.23314.3">
356+
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.8.0-3.23518.7">
357357
<Uri>https://github.com/dotnet/roslyn</Uri>
358358
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
359359
</Dependency>
360-
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0-3.23314.3">
360+
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0-3.23518.7">
361361
<Uri>https://github.com/dotnet/roslyn</Uri>
362362
<Sha>1aa759af23d2a29043ea44fcef5bd6823dafa5d0</Sha>
363363
</Dependency>

eng/Versions.props

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@
151151
<MicrosoftEntityFrameworkCoreVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreVersion>
152152
<MicrosoftEntityFrameworkCoreDesignVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreDesignVersion>
153153
<!-- Packages from dotnet/roslyn -->
154-
<MicrosoftCodeAnalysisCommonVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCommonVersion>
155-
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
156-
<MicrosoftCodeAnalysisCSharpVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpVersion>
157-
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
154+
<MicrosoftCodeAnalysisCommonVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisCommonVersion>
155+
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
156+
<MicrosoftCodeAnalysisCSharpVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisCSharpVersion>
157+
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
158158
<!-- Packages from NuGet/Nuget.client -->
159159
<!-- If you update these versions, make sure to also update https://github.com/dotnet/aspnetcore/blob/main/eng/SourceBuildPrebuiltBaseline.xml -->
160160
<NuGetPackagingVersion>6.2.4</NuGetPackagingVersion>
@@ -248,11 +248,11 @@
248248
<Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>
249249
<!-- Pin the version of the M.CA dependencies that we utilize with a cutom version property $(MicrosoftCodeAnalysisVersion_LatestVS) to avoid automatically
250250
consuming the newest version of the packages when using the $(MicrosoftCodeAnalysisCSharpVersion) properties in source-build. -->
251-
<MicrosoftCodeAnalysisVersion_LatestVS>4.7.0-3.23314.3</MicrosoftCodeAnalysisVersion_LatestVS>
252-
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
253-
<MicrosoftCodeAnalysisCommonVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCommonVersion>
254-
<MicrosoftCodeAnalysisCSharpVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpVersion>
255-
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
251+
<MicrosoftCodeAnalysisVersion_LatestVS>4.8.0-3.23518.7</MicrosoftCodeAnalysisVersion_LatestVS>
252+
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
253+
<MicrosoftCodeAnalysisCommonVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisCommonVersion>
254+
<MicrosoftCodeAnalysisCSharpVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisCSharpVersion>
255+
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.8.0-3.23518.7</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
256256
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
257257
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>1.1.2-beta1.23371.1</MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>
258258
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.2-beta1.23371.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>

src/Http/Http.Extensions/test/RequestDelegateGenerator/CompileTimeIncrementalityTests.cs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3+
using System.Collections.Immutable;
34
using Microsoft.AspNetCore.Mvc;
45
using Microsoft.CodeAnalysis;
56

@@ -42,11 +43,16 @@ public async Task MapAction_ChangeReturnType_TriggersUpdate()
4243
var (result, compilation) = await RunGeneratorAsync(source, updatedSource);
4344
var outputSteps = GetRunStepOutputs(result);
4445

45-
Assert.All(outputSteps, (value) => Assert.Equal(IncrementalStepRunReason.New, value.Reason));
46+
Assert.Collection(outputSteps,
47+
// First source output for diagnostics is unchanged.
48+
step => Assert.Equal(IncrementalStepRunReason.Unchanged, step.Reason),
49+
// Second source output for generated code is changed.
50+
step => Assert.Equal(IncrementalStepRunReason.Modified, step.Reason)
51+
);
4652
}
4753

4854
[Fact]
49-
public async Task MapAction_ChangeBodyParamNullability_TriggersUpdate()
55+
public async Task MapAction_ChangeBodyParamNullability_TriggersUpdate_ForSourceOnly()
5056
{
5157
var source = $"""app.MapGet("/", ([{typeof(FromBodyAttribute)}] {typeof(Todo)} todo) => TypedResults.Ok(todo));""";
5258
var updatedSource = $"""
@@ -58,8 +64,16 @@ public async Task MapAction_ChangeBodyParamNullability_TriggersUpdate()
5864
var (result, compilation) = await RunGeneratorAsync(source, updatedSource);
5965
var outputSteps = GetRunStepOutputs(result);
6066

61-
Assert.All(outputSteps, (value) => Assert.Equal(IncrementalStepRunReason.New, value.Reason));
67+
Assert.Collection(outputSteps,
68+
// First source output for diagnostics is unchanged.
69+
step => Assert.Equal(IncrementalStepRunReason.Unchanged, step.Reason),
70+
// Second source output for generated code is changed.
71+
step => Assert.Equal(IncrementalStepRunReason.Modified, step.Reason)
72+
);
6273
}
6374

64-
private static IEnumerable<(object Value, IncrementalStepRunReason Reason)> GetRunStepOutputs(GeneratorRunResult? result) => result?.TrackedOutputSteps.SelectMany(step => step.Value).SelectMany(value => value.Outputs);
75+
private static IEnumerable<(object Value, IncrementalStepRunReason Reason)> GetRunStepOutputs(GeneratorRunResult? result)
76+
=> result?.TrackedOutputSteps
77+
.SelectMany(step => step.Value)
78+
.SelectMany(value => value.Outputs);
6579
}

src/Http/Http.Extensions/test/RequestDelegateGenerator/RequestDelegateCreationTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public abstract class RequestDelegateCreationTestBase : LoggedTest
3434

3535
protected abstract bool IsGeneratorEnabled { get; }
3636

37-
internal static readonly CSharpParseOptions ParseOptions = new CSharpParseOptions(LanguageVersion.Preview).WithFeatures(new[] { new KeyValuePair<string, string>("InterceptorsPreview", "") });
37+
internal static readonly CSharpParseOptions ParseOptions = new CSharpParseOptions(LanguageVersion.Preview).WithFeatures(new[] { new KeyValuePair<string, string>("InterceptorsPreviewNamespaces", "Microsoft.AspNetCore.Http.Generated") });
3838
private static readonly Project _baseProject = CreateProject();
3939

4040
internal async Task<(GeneratorRunResult?, Compilation)> RunGeneratorAsync(string sources, params string[] updatedSources)

src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<IsPackable>false</IsPackable>
1010
<IsTrimmable>true</IsTrimmable>
1111
<EnableRequestDelegateGenerator>true</EnableRequestDelegateGenerator>
12-
<!-- TODO: Remove InterceptorsPreview feature after 8.0 RC2 SDK is used for build -->
13-
<Features>$(Features);InterceptorsPreview</Features>
1412
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.AspNetCore.Http.Generated</InterceptorsPreviewNamespaces>
1513
</PropertyGroup>
1614

0 commit comments

Comments
 (0)