Skip to content

Commit 08cde4d

Browse files
[release/8.0] Update SDK (#50276)
* [release/8.0] Update SDK * Fix IsAotCompatible warnings * Update nullability annotation for TemplatePart.Text * Update CodeGen.proj to account for conditional IsTrimmable metadata * Update Directory.Build.props.in --------- Co-authored-by: Stephen Halter <[email protected]>
1 parent 03e7512 commit 08cde4d

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

Directory.Build.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<Project>
22
<PropertyGroup>
3+
<!-- Disable IsTrimmable on non-DefaultNetCoreTargetFrameworks even if explicitly enabled or else we'll get NETSDK1195 and NETSDK1210 errors -->
4+
<IsTrimmable Condition="'$(TargetFramework)' != '$(DefaultNetCoreTargetFramework)'"></IsTrimmable>
35
<EnableAOTAnalyzer Condition=" '$(EnableAOTAnalyzer)' == '' ">$([MSBuild]::ValueOrDefault($(IsTrimmable),'false'))</EnableAOTAnalyzer>
46
<!-- TODO: Remove when analyzer is enabled by default with AOT in SDK. See https://github.com/dotnet/sdk/issues/31284 -->
57
<EnableSingleFileAnalyzer Condition=" '$(EnableSingleFileAnalyzer)' == '' ">$(EnableAOTAnalyzer)</EnableSingleFileAnalyzer>

eng/CodeGen.proj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
<_RequiresDelayedBuild Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('RequiresDelayedBuild','true')->Distinct())" />
2525
<_SharedFrameworkAndPackageRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'true'))" />
2626
<_SharedFrameworkRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'false'))" />
27-
<_TrimmableProject Include="@(_ProjectReferenceProvider->WithMetadataValue('IsTrimmable', 'true'))" />
2827
<_ShippingAssemblyWithDupes Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp', 'true'))" />
2928
<_ShippingAssemblyWithDupes Include="@(_ProjectReferenceProvider->WithMetadataValue('IsShippingPackage', 'true'))" />
3029
<_ShippingAssembly Include="@(_ShippingAssemblyWithDupes->Distinct())" />
30+
<!-- _ProjectReferenceProvider is already Distinct() and does not include metadata for each target framework. -->
31+
<!-- If a project is trimmable for even just one of multiple target frameworks, include it in TrimmableProjects.props. -->
32+
<_TrimmableProject Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('IsTrimmable', 'true')->WithMetadataValue('IsProjectReferenceProvider','true')->Distinct())" />
3133
</ItemGroup>
3234

3335
<PropertyGroup>

eng/tools/GenerateFiles/Directory.Build.props.in

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,4 @@
88
<!-- Temporarily hardcoded to true -->
99
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
1010
</PropertyGroup>
11-
12-
<!-- Ignore warning about RID resolution rules changing in .NET 8 Preview 6 -->
13-
<!-- Needed until https://github.com/ericsink/SQLitePCL.raw/issues/543 is fixed -->
14-
<!-- See https://github.com/dotnet/aspnetcore/pull/48908#issuecomment-1601894643 -->
15-
<ItemGroup>
16-
<RuntimeHostConfigurationOption Include="System.Runtime.Loader.UseRidGraph" Value="true" />
17-
</ItemGroup>
1811
</Project>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "8.0.100-rc.1.23381.2"
3+
"version": "8.0.100-rc.2.23422.11"
44
},
55
"tools": {
6-
"dotnet": "8.0.100-rc.1.23381.2",
6+
"dotnet": "8.0.100-rc.2.23422.11",
77
"runtimes": {
88
"dotnet/x86": [
99
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

src/Http/Routing/src/Template/TemplatePart.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Diagnostics;
5+
using System.Diagnostics.CodeAnalysis;
56
using System.Linq;
67
using Microsoft.AspNetCore.Routing.Patterns;
78

@@ -104,6 +105,7 @@ public static TemplatePart CreateParameter(
104105
/// <summary>
105106
/// <see langword="true"/> if the route part is represents a literal value.
106107
/// </summary>
108+
[MemberNotNullWhen(true, nameof(Text))]
107109
public bool IsLiteral { get; private set; }
108110
/// <summary>
109111
/// <see langword="true"/> if the route part represents a parameterized value.

0 commit comments

Comments
 (0)