Skip to content

Commit df9a5d4

Browse files
Update SDK (#41798)
1 parent ab0195a commit df9a5d4

File tree

16 files changed

+50
-52
lines changed

16 files changed

+50
-52
lines changed

.azure/pipelines/jobs/default-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ jobs:
120120
${{ if eq(parameters.agentOs, 'Windows') }}:
121121
${{ if eq(variables['System.TeamProject'], 'public') }}:
122122
name: NetCore1ESPool-Public
123-
demands: ImageOverride -equals 1es-windows-2019-open
123+
demands: ImageOverride -equals build.windows.amd64.vs2022.open
124124
${{ if eq(variables['System.TeamProject'], 'internal') }}:
125125
name: NetCore1ESPool-Internal
126126
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
127-
demands: ImageOverride -equals Build.Server.Amd64.VS2019
127+
demands: ImageOverride -equals build.windows.amd64.vs2022
128128
${{ if ne(parameters.container, '') }}:
129129
container: ${{ parameters.container }}
130130
${{ if ne(parameters.disableComponentGovernance, '') }}:

eng/targets/Cpp.Common.props

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
<TestProjectSkipReason>You cannot test native ARM64 projects on a x86/x64 machine</TestProjectSkipReason>
1616
</PropertyGroup>
1717

18+
<PropertyGroup Label="Configuration">
19+
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
20+
<VCProjectVersion>15.0</VCProjectVersion>
21+
<Keyword>Win32Proj</Keyword>
22+
<Platform Condition="'$(Platform)' == ''">x64</Platform>
23+
<PlatformToolsetVersion>v143</PlatformToolsetVersion>
24+
<PlatformToolset>$(PlatformToolsetVersion)</PlatformToolset>
25+
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion>
26+
</PropertyGroup>
27+
1828
<Import Project="MicroBuild.Plugin.props" Condition="'$(MicroBuildSentinelFile)' == ''" />
1929
<Import Project="$(MicroBuildPluginDirectory)\MicroBuild.Plugins.*\**\build\MicroBuild.Plugins.*.props" Condition=" '$(MicroBuildPluginDirectory)' != ''" />
2030

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": "7.0.100-preview.5.22263.22"
3+
"version": "7.0.100-preview.6.22310.1"
44
},
55
"tools": {
6-
"dotnet": "7.0.100-preview.5.22263.22",
6+
"dotnet": "7.0.100-preview.6.22310.1",
77
"runtimes": {
88
"dotnet/x86": [
99
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

src/Components/Authorization/src/AuthorizeRouteView.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ private void RenderAuthorizeRouteViewCore(RenderTreeBuilder builder)
9999
Justification = "OpenComponent already has the right set of attributes")]
100100
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2110:RequiresUnreferencedCode",
101101
Justification = "OpenComponent already has the right set of attributes")]
102+
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2118:RequiresUnreferencedCode",
103+
Justification = "OpenComponent already has the right set of attributes")]
102104
private void RenderContentInDefaultLayout(RenderTreeBuilder builder, RenderFragment content)
103105
{
104106
builder.OpenComponent<LayoutView>(0);

src/Components/Components/src/RouteView.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public Task SetParametersAsync(ParameterView parameters)
7474
/// </summary>
7575
/// <param name="builder">The <see cref="RenderTreeBuilder"/>.</param>
7676
[UnconditionalSuppressMessage("Trimming", "IL2111", Justification = "Layout components are preserved because the LayoutAttribute constructor parameter is correctly annotated.")]
77+
[UnconditionalSuppressMessage("Trimming", "IL2118", Justification = "Layout components are preserved because the LayoutAttribute constructor parameter is correctly annotated.")]
7778
protected virtual void Render(RenderTreeBuilder builder)
7879
{
7980
var pageLayoutType = RouteData.PageType.GetCustomAttribute<LayoutAttribute>()?.LayoutType

src/Components/Components/src/Routing/RouteTableFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ internal static RouteTable Create(List<Type> componentTypes)
8888
return Create(templatesByHandler);
8989
}
9090

91+
[UnconditionalSuppressMessage("Trimming", "IL2067", Justification = "Application code does not get trimmed, and the framework does not define routable components.")]
9192
internal static RouteTable Create(Dictionary<Type, string[]> templatesByHandler)
9293
{
9394
var routes = new List<RouteEntry>();

src/Components/Web/src/JSComponents/JSComponentConfigurationStore.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Diagnostics.CodeAnalysis;
55
using Microsoft.AspNetCore.Components.RenderTree;
66
using Microsoft.AspNetCore.Components.Web.Infrastructure;
7+
using Microsoft.AspNetCore.Internal;
78

89
namespace Microsoft.AspNetCore.Components.Web;
910

@@ -20,11 +21,11 @@ public sealed class JSComponentConfigurationStore
2021
// without needing any changes on the downstream code that implements IJSComponentConfiguration,
2122
// and without exposing any of the configuration storage across layers.
2223

23-
internal Dictionary<string, Type> JSComponentTypesByIdentifier { get; } = new(StringComparer.Ordinal);
24+
private readonly Dictionary<string, Type> _jsComponentTypesByIdentifier = new(StringComparer.Ordinal);
2425
internal Dictionary<string, JSComponentParameter[]> JSComponentParametersByIdentifier { get; } = new(StringComparer.Ordinal);
2526
internal Dictionary<string, List<string>> JSComponentIdentifiersByInitializer { get; } = new(StringComparer.Ordinal);
2627

27-
internal void Add(Type componentType, string identifier)
28+
internal void Add([DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType, string identifier)
2829
{
2930
var parameterTypes = JSComponentInterop.GetComponentParameters(componentType).ParameterInfoByName;
3031
var parameters = new JSComponentParameter[parameterTypes.Count];
@@ -34,15 +35,24 @@ internal void Add(Type componentType, string identifier)
3435
parameters[index++] = new JSComponentParameter(name, type.Type);
3536
}
3637

37-
JSComponentTypesByIdentifier.Add(identifier, componentType);
38+
_jsComponentTypesByIdentifier.Add(identifier, componentType);
3839
JSComponentParametersByIdentifier.Add(identifier, parameters);
3940
}
4041

42+
[UnconditionalSuppressMessage("Trimming", "IL2067",
43+
Justification = "Types added to dictionary are always correctly annotated.")]
44+
internal bool TryGetComponentType(
45+
string identifier,
46+
[NotNullWhen(true)][DynamicallyAccessedMembers(LinkerFlags.Component)] out Type? componentType)
47+
{
48+
return _jsComponentTypesByIdentifier.TryGetValue(identifier, out componentType);
49+
}
50+
4151
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(JSComponentParameter))]
4252
[DynamicDependency(nameof(WebRenderer.WebRendererInteropMethods.AddRootComponent), typeof(WebRenderer.WebRendererInteropMethods))]
4353
[DynamicDependency(nameof(WebRenderer.WebRendererInteropMethods.SetRootComponentParameters), typeof(WebRenderer.WebRendererInteropMethods))]
4454
[DynamicDependency(nameof(WebRenderer.WebRendererInteropMethods.RemoveRootComponent), typeof(WebRenderer.WebRendererInteropMethods))]
45-
internal void Add(Type componentType, string identifier, string javaScriptInitializer)
55+
internal void Add([DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType, string identifier, string javaScriptInitializer)
4656
{
4757
Add(componentType, identifier);
4858

src/Components/Web/src/JSComponents/JSComponentInterop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ internal void AttachToRenderer(WebRenderer renderer)
6565
/// </summary>
6666
protected internal virtual int AddRootComponent(string identifier, string domElementSelector)
6767
{
68-
if (!Configuration.JSComponentTypesByIdentifier.TryGetValue(identifier, out var componentType))
68+
if (!Configuration.TryGetComponentType(identifier, out var componentType))
6969
{
7070
throw new ArgumentException($"There is no registered JS component with identifier '{identifier}'.");
7171
}

src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
<StaticWebAssetBasePath>Identity</StaticWebAssetBasePath>
1515
<ProvideApplicationPartFactoryAttributeTypeName>Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core</ProvideApplicationPartFactoryAttributeTypeName>
16-
<GenerateStaticWebAssetsPackTargetsDependsOn>_GenerateIdentityUIPackItems;$(GenerateStaticWebAssetsPackTargetsDependsOn)</GenerateStaticWebAssetsPackTargetsDependsOn>
1716
<DisableStaticWebAssetsBuildPropsFileGeneration>true</DisableStaticWebAssetsBuildPropsFileGeneration>
1817
<StaticWebAssetsDisableProjectBuildPropsFileGeneration>true</StaticWebAssetsDisableProjectBuildPropsFileGeneration>
1918
<StaticWebAssetsDisableProjectBuildMultiTargetingPropsFileGeneration>true</StaticWebAssetsDisableProjectBuildMultiTargetingPropsFileGeneration>
@@ -74,7 +73,7 @@
7473
</ItemGroup>
7574
</Target>
7675

77-
<Target Name="_GenerateIdentityUIPackItems">
76+
<Target Name="_GenerateIdentityUIPackItems" BeforeTargets="GenerateStaticWebAssetsPackFiles">
7877
<ItemGroup>
7978
<V4AssetsCandidates Include="assets\V4\**" />
8079
<V4AssetsCandidates>
@@ -96,25 +95,19 @@
9695
<GenerateStaticWebAsssetsPropsFile StaticWebAssets="@(V5Assets)" PackagePathPrefix="staticwebassets/V5" TargetPropsFilePath="$(IntermediateOutputPath)IdentityUI.V5.targets" />
9796

9897
<ComputeStaticWebAssetsTargetPaths Assets="@(V4Assets)" PathPrefix="staticwebassets/V4" AdjustPathsForPack="true">
99-
<Output TaskParameter="AssetsWithTargetPath" ItemName="_PackV4Asset" />
98+
<Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" />
10099
</ComputeStaticWebAssetsTargetPaths>
101100
<ComputeStaticWebAssetsTargetPaths Assets="@(V5Assets)" PathPrefix="staticwebassets/V5" AdjustPathsForPack="true">
102-
<Output TaskParameter="AssetsWithTargetPath" ItemName="_PackV5Asset" />
101+
<Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" />
103102
</ComputeStaticWebAssetsTargetPaths>
104103

105104
<ItemGroup>
106-
<TfmSpecificPackageFile Include="$(IntermediateOutputPath)IdentityUI.V4.targets">
105+
<StaticWebAssetPackageFile Include="$(IntermediateOutputPath)IdentityUI.V4.targets">
107106
<PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.V4.targets</PackagePath>
108-
</TfmSpecificPackageFile>
109-
<TfmSpecificPackageFile Include="%(_PackV4Asset.Identity)">
110-
<PackagePath>%(_PackV4Asset.TargetPath)</PackagePath>
111-
</TfmSpecificPackageFile>
112-
<TfmSpecificPackageFile Include="$(IntermediateOutputPath)IdentityUI.V5.targets">
107+
</StaticWebAssetPackageFile>
108+
<StaticWebAssetPackageFile Include="$(IntermediateOutputPath)IdentityUI.V5.targets">
113109
<PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.V5.targets</PackagePath>
114-
</TfmSpecificPackageFile>
115-
<TfmSpecificPackageFile Include="%(_PackV5Asset.Identity)">
116-
<PackagePath>%(_PackV5Asset.TargetPath)</PackagePath>
117-
</TfmSpecificPackageFile>
110+
</StaticWebAssetPackageFile>
118111
</ItemGroup>
119112
</Target>
120113
</Project>

src/Installers/Windows/AspNetCoreModule-Setup/CustomAction/aspnetcoreCA.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,11 @@
4949
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
5050
<PropertyGroup>
5151
<ConfigurationType>DynamicLibrary</ConfigurationType>
52-
<PlatformToolsetVersion>v142</PlatformToolsetVersion>
53-
<PlatformToolset>$(PlatformToolsetVersion)</PlatformToolset>
5452
<CharacterSet>Unicode</CharacterSet>
5553
</PropertyGroup>
5654
<PropertyGroup Condition="'$(Configuration)'=='Release'">
5755
<WholeProgramOptimization>true</WholeProgramOptimization>
5856
</PropertyGroup>
59-
<PropertyGroup Label="Configuration">
60-
<VCToolsVersion>14.29.30133</VCToolsVersion>
61-
</PropertyGroup>
6257
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
6358
<PropertyGroup>
6459
<AdditionalIncludeDirectories>$(IIS-Common)version;$(IIS-Common)Include;$(IIS-Setup)iisca\lib;$(WIX)sdk\$(WixPlatformToolset)\inc;$(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

0 commit comments

Comments
 (0)