Skip to content

Commit 70c05f1

Browse files
[main] Update dependencies from dotnet/runtime dotnet/efcore (#36328)
[main] Update dependencies from dotnet/runtime dotnet/efcore - Update TFM to net7.0 - Fixup - Update src/Shared/CodeAnalysis/DynamicallyAccessedMembersAttribute.cs Co-authored-by: Chris Ross <[email protected]> - Update src/Shared/CodeAnalysis/DynamicallyAccessedMemberTypes.cs Co-authored-by: Chris Ross <[email protected]> - Update netfx to 462 - Update more to net462 - Fix workaround - Update ifdefs - Add workaround for KnownRuntimePack - Merge branch 'darc-main-c944b2c3-1c63-49a3-b9dd-98cda1a942e3' of https://github.com/dotnet/aspnetcore into darc-main-c944b2c3-1c63-49a3-b9dd-98cda1a942e3 - Merge branch 'main' into darc-main-c944b2c3-1c63-49a3-b9dd-98cda1a942e3 - Add SiteExtensions versions - Fix RepoTasks assembly dir - Update CreateFrameworkListFile to account for new analyzer path format introduced with dotnet/sdk#20355 - Don't target latest runtime in razor tests - Update Dependencies.props - Update Helix.targets - Fixup - Move FrameworkReference update to GenerateFiles - Have Helix tests import directory.build files - Keep RunTests at net6 - Quarantine 2 tests - revert spa-templates submodule downgrade
1 parent 5750125 commit 70c05f1

File tree

78 files changed

+423
-402
lines changed

Some content is hidden

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

78 files changed

+423
-402
lines changed

.devcontainer/devcontainer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"build": {
66
"dockerfile": "Dockerfile",
77
"args": {
8-
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0
9-
"VARIANT": "5.0",
8+
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0, 6.0, 7.0
9+
"VARIANT": "7.0",
1010
// Options
1111
"INSTALL_NODE": "true",
1212
"NODE_VERSION": "lts/*"
@@ -31,7 +31,7 @@
3131
"remoteEnv": {
3232
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
3333
"DOTNET_MULTILEVEL_LOOKUP": "0",
34-
"TARGET": "net6.0"
34+
"TARGET": "net7.0"
3535
},
3636

3737
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
<NuspecBasePath>$(MSBuildProjectDirectory)</NuspecBasePath>
105105

106106
<IncludeSymbols>true</IncludeSymbols>
107-
<DefaultNetFxTargetFramework>net461</DefaultNetFxTargetFramework>
107+
<DefaultNetFxTargetFramework>net462</DefaultNetFxTargetFramework>
108108
</PropertyGroup>
109109

110110
<!-- Warnings and errors -->

docs/DailyBuilds.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you want to download the latest daily build and use it in a project, then you
1212
<configuration>
1313
<packageSources>
1414
<clear />
15-
<add key="aspnetcore" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
15+
<add key="aspnetcore" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
1616
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
1717
</packageSources>
1818
</configuration>

eng/Dependencies.props

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ and are generated based on the last package release.
116116
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.1.x86" />
117117
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.5.0.x64" />
118118
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.5.0.x86" />
119+
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.6.0.x64" />
120+
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.6.0.x86" />
119121
<LatestPackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Runtime" />
120122
<LatestPackageReference Include="Microsoft.Internal.Runtime.AspNetCore.Transport" />
121123
<LatestPackageReference Include="Microsoft.Bcl.AsyncInterfaces" />

eng/Version.Details.xml

+140-140
Large diffs are not rendered by default.

eng/Versions.props

+74-71
Large diffs are not rendered by default.

eng/Workarounds.targets

-12
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@
88
<ProjectTargetFrameworkVersion>v$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)', 2))</ProjectTargetFrameworkVersion>
99
</PropertyGroup>
1010

11-
<ItemGroup>
12-
<!--
13-
Reference base shared framework at incoming dependency flow version, not bundled sdk version.
14-
Apply this to all projects that target the default tfm (e.g. net6.0) or a rid-based variant of it (e.g. net6.0-windows)
15-
-->
16-
<FrameworkReference
17-
Update="Microsoft.NETCore.App"
18-
Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '$(DefaultNetCoreTargetFrameworkIdentifier)') AND '$(DefaultNetCoreTargetFrameworkVersion)' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' "
19-
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
20-
TargetingPackVersion="$(MicrosoftNETCoreAppRefVersion)" />
21-
</ItemGroup>
22-
2311
<!--
2412
Workaround https://github.com/dotnet/aspnetcore/issues/4257.
2513
The web sdk adds an implicit framework reference. This removes it until we can update our build to use framework references.

eng/targets/Helix.props

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
<HelixTestName>$(MSBuildProjectName)--$(TargetFramework)</HelixTestName>
2222
<LoggingTestingDisableFileLogging Condition="'$(IsHelixJob)' == 'true'">false</LoggingTestingDisableFileLogging>
2323
<NodeVersion>14.17.6</NodeVersion>
24-
<TestDependsOnAspNetPackages>false</TestDependsOnAspNetPackages>
25-
<TestDependsOnAspNetRuntime>false</TestDependsOnAspNetRuntime>
24+
<!-- Have all tests depend on the latest runtimes until we get a net7.0 SDK -->
25+
<TestDependsOnAspNetPackages>true</TestDependsOnAspNetPackages>
26+
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
2627
</PropertyGroup>
2728

2829
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">

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

+17
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,30 @@
1414
TargetFramework="${DefaultNetCoreTargetFramework}"
1515
Condition="@(KnownAppHostPack->Count()) != '0' AND
1616
!(@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}')))" />
17+
<KnownRuntimePack
18+
Include="@(KnownRuntimePack->WithMetadataValue('TargetFramework', 'net6.0'))"
19+
TargetFramework="${DefaultNetCoreTargetFramework}"
20+
Condition="@(KnownRuntimePack->Count()) != '0' AND
21+
!(@(KnownRuntimePack->AnyHaveMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}')))" />
1722
<KnownFrameworkReference
1823
Include="@(KnownFrameworkReference->WithMetadataValue('TargetFramework', 'net6.0'))"
1924
TargetFramework="${DefaultNetCoreTargetFramework}"
2025
Condition="@(KnownFrameworkReference->Count()) != '0' AND
2126
!(@(KnownFrameworkReference->AnyHaveMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}')))" />
2227
</ItemGroup>
2328

29+
<ItemGroup>
30+
<!--
31+
Reference base shared framework at incoming dependency flow version, not bundled sdk version.
32+
Apply this to all projects that target the default tfm (e.g. net7.0) or a rid-based variant of it (e.g. net7.0-windows)
33+
-->
34+
<FrameworkReference
35+
Update="Microsoft.NETCore.App"
36+
Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '${DefaultNetCoreTargetFramework}') AND '${DefaultNetCoreTargetFramework}' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' "
37+
RuntimeFrameworkVersion="${MicrosoftNETCoreAppRuntimeVersion}"
38+
TargetingPackVersion="${MicrosoftNETCoreAppRefVersion}" />
39+
</ItemGroup>
40+
2441
<ItemGroup>
2542
<!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. -->
2643
<KnownFrameworkReference

eng/tools/RepoTasks/CreateFrameworkListFile.cs

+9-5
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,19 @@ public override bool Execute()
7373

7474
var pathParts = path.Split('/');
7575

76-
if (pathParts.Length < 3 || !pathParts[1].Equals("dotnet", StringComparison.Ordinal) || pathParts.Length > 4)
76+
if (pathParts.Length < 3 || !pathParts[1].Equals("dotnet", StringComparison.Ordinal) || pathParts.Length > 5)
7777
{
78-
Log.LogError($"Unexpected analyzer path format {path}. Expected 'analyzers/dotnet(/language)/analyzer.dll");
78+
Log.LogError($"Unexpected analyzer path format {path}. Expected 'analyzers/dotnet(/roslyn<version>)(/language)/analyzer.dll");
7979
}
8080

81-
// Check if we have enough parts for language directory and include it
82-
if (pathParts.Length > 3)
81+
// Check if we have enough parts for language directory and include it.
82+
// There could be a roslyn<version> folder before the language folder. Check for it.
83+
bool hasRoslynVersion = pathParts[2].StartsWith("roslyn", StringComparison.Ordinal);
84+
int languageLengthCheck = hasRoslynVersion ? 4 : 3;
85+
int potentialLanguageIndex = hasRoslynVersion ? 3 : 2;
86+
if (pathParts.Length > languageLengthCheck)
8387
{
84-
element.Add(new XAttribute("Language", pathParts[2]));
88+
element.Add(new XAttribute("Language", pathParts[potentialLanguageIndex]));
8589
}
8690
}
8791

eng/tools/RepoTasks/RepoTasks.csproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
3+
<!-- Keep this project at net6.0 until there is an SDK with net7.0 runtimes -->
4+
<TargetFrameworks>net6.0</TargetFrameworks>
45
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net472</TargetFrameworks>
56
<DefineConstants Condition="'$(TargetFramework)' == 'net472'">$(DefineConstants);BUILD_MSI_TASKS</DefineConstants>
67
<Optimize>false</Optimize>
@@ -19,7 +20,8 @@
1920
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
2021
</ItemGroup>
2122

22-
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
23+
<!-- Change this back to '$(DefaultNetCoreTargetFramework)' once we have an SDK with net7.0 runtimes -->
24+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
2325
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" />
2426
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTaskCoreVersion)" />
2527
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" />

eng/tools/RepoTasks/RepoTasks.tasks

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project>
22
<PropertyGroup>
3+
<!-- Keep this project at net6.0 until there is an SDK with net7.0 runtimes -->
34
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">net6.0</_RepoTaskAssemblyFolder>
45
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' != 'core'">net472</_RepoTaskAssemblyFolder>
56
<_RepoTaskAssembly>$(ArtifactsBinDir)RepoTasks\Release\$(_RepoTaskAssemblyFolder)\RepoTasks.dll</_RepoTaskAssembly>

src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
$CommonMetadataElements$
55
<dependencies>
6-
<group targetFramework=".net6.0">
6+
<group targetFramework=".net7.0">
77
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$componentAnalyzerVersion$" />
88
<dependency id="Microsoft.AspNetCore.Authorization" version="$authorizationVersion$" exclude="Build,Analyzers" />
99
</group>

src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"runtimeOptions": {
3-
"tfm": "net6.0",
3+
"tfm": "net7.0",
44
"framework": {
55
"name": "Microsoft.AspNetCore.App",
66
"version": "${SharedFxVersion}"

src/Components/benchmarkapps/Wasm.Performance/local.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM selenium/standalone-chrome:latest as final
33
ENV StressRunDuration=0
44

55
WORKDIR /app
6-
COPY ./Driver/bin/Release/net6.0/linux-x64/publish ./
6+
COPY ./Driver/bin/Release/net7.0/linux-x64/publish ./
77
COPY ./exec.sh ./
88

99
ENTRYPOINT [ "bash", "./exec.sh" ]

src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/Pbkdf2Util.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal static class Pbkdf2Util
1414

1515
private static IPbkdf2Provider GetPbkdf2Provider()
1616
{
17-
#if NETSTANDARD2_0 || NET461
17+
#if NETSTANDARD2_0 || NETFRAMEWORK
1818
// In priority order, our three implementations are Win8, Win7, and "other".
1919
if (OSVersionUtil.IsWindows8OrLater())
2020
{

src/DataProtection/Cryptography.KeyDerivation/test/Pbkdf2Tests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void RunTest_Normal_NetCore(string password, KeyDerivationPrf prf, int it
3737
}
3838

3939
// Act & assert
40-
#if NET461
40+
#if NETFRAMEWORK
4141
TestProvider<ManagedPbkdf2Provider>(password, salt, prf, iterationCount, numBytesRequested, expectedValueAsBase64);
4242
#elif NETCOREAPP
4343
TestProvider<NetCorePbkdf2Provider>(password, salt, prf, iterationCount, numBytesRequested, expectedValueAsBase64);
@@ -53,7 +53,7 @@ public void RunTest_WithLongPassword_NetCore_FallbackToManaged()
5353
byte[] salt = Encoding.UTF8.GetBytes("salt");
5454
const string expectedDerivedKeyBase64 = "Sc+V/c3fiZq5Z5qH3iavAiojTsW97FAp2eBNmCQAwCNzA8hfhFFYyQLIMK65qPnBFHOHXQPwAxNQNhaEAH9hzfiaNBSRJpF9V4rpl02d5ZpI6cZbsQFF7TJW7XJzQVpYoPDgJlg0xVmYLhn1E9qMtUVUuXsBjOOdd7K1M+ZI00c=";
5555

56-
#if NET461
56+
#if NETFRAMEWORK
5757
RunTest_WithLongPassword_Impl<ManagedPbkdf2Provider>(salt, expectedDerivedKeyBase64);
5858
#elif NETCOREAPP
5959
RunTest_WithLongPassword_Impl<NetCorePbkdf2Provider>(salt, expectedDerivedKeyBase64);
@@ -68,7 +68,7 @@ public void RunTest_WithLongPassword_NetCore()
6868
// salt longer than 8 bytes
6969
var salt = Encoding.UTF8.GetBytes("abcdefghijkl");
7070

71-
#if NET461
71+
#if NETFRAMEWORK
7272
RunTest_WithLongPassword_Impl<ManagedPbkdf2Provider>(salt, "NGJtFzYUaaSxu+3ZsMeZO5d/qPJDUYW4caLkFlaY0cLSYdh1PN4+nHUVp4pUUubJWu3UeXNMnHKNDfnn8GMfnDVrAGTv1lldszsvUJ0JQ6p4+daQEYBc//Tj/ejuB3luwW0IinyE7U/ViOQKbfi5pCZFMQ0FFx9I+eXRlyT+I74=");
7373
#elif NETCOREAPP
7474
RunTest_WithLongPassword_Impl<NetCorePbkdf2Provider>(salt, "NGJtFzYUaaSxu+3ZsMeZO5d/qPJDUYW4caLkFlaY0cLSYdh1PN4+nHUVp4pUUubJWu3UeXNMnHKNDfnn8GMfnDVrAGTv1lldszsvUJ0JQ6p4+daQEYBc//Tj/ejuB3luwW0IinyE7U/ViOQKbfi5pCZFMQ0FFx9I+eXRlyT+I74=");

src/DataProtection/DataProtection/src/Managed/ManagedGenRandomImpl.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.DataProtection.Managed
88
{
99
internal sealed unsafe class ManagedGenRandomImpl : IManagedGenRandom
1010
{
11-
#if NETSTANDARD2_0 || NET461
11+
#if NETSTANDARD2_0 || NETFRAMEWORK
1212
private static readonly RandomNumberGenerator _rng = RandomNumberGenerator.Create();
1313
#endif
1414
public static readonly ManagedGenRandomImpl Instance = new ManagedGenRandomImpl();
@@ -20,7 +20,7 @@ private ManagedGenRandomImpl()
2020
public byte[] GenRandom(int numBytes)
2121
{
2222
var bytes = new byte[numBytes];
23-
#if NETSTANDARD2_0 || NET461
23+
#if NETSTANDARD2_0 || NETFRAMEWORK
2424
_rng.GetBytes(bytes);
2525
#else
2626
RandomNumberGenerator.Fill(bytes);

src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/WebHostFunctionalTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public async Task RunsInIISExpressInProcess()
159159
var applicationName = "CreateDefaultBuilderApp";
160160
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
161161
{
162-
TargetFramework = "net6.0",
162+
TargetFramework = "net7.0",
163163
HostingModel = HostingModel.InProcess
164164
};
165165

@@ -214,7 +214,7 @@ private async Task ExecuteTestApp(string applicationName,
214214
{
215215
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
216216
{
217-
TargetFramework = "net6.0",
217+
TargetFramework = "net7.0",
218218
};
219219

220220
if (setTestEnvVars)

src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.multitarget.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
$CommonMetadataElements$
55
<dependencies>
6-
<group targetFramework=".net6.0">
6+
<group targetFramework=".net7.0">
77
<dependency id="Microsoft.Extensions.FileProviders.Abstractions" version="$AbstractionsVersion$" exclude="Build,Analyzers" />
88
</group>
99
<group targetFramework=".NETStandard2.0">

src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.netcoreapp.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
$CommonMetadataElements$
55
<dependencies>
6-
<group targetFramework=".net6.0">
6+
<group targetFramework=".net7.0">
77
<dependency id="Microsoft.Extensions.FileProviders.Abstractions" version="$AbstractionsVersion$" exclude="Build,Analyzers" />
88
</group>
99
</dependencies>

src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
7474

7575
<!-- Omit System.Security.Permissions closure. https://github.com/dotnet/runtime/issues/54341
7676
It is brought in by System.Security.Cryptography.Xml for netstandard2.0 compatibility
77-
but not required in net6.0 since the types required exist in System.Security.AccessControl. -->
77+
but not required in net7.0 since the types required exist in System.Security.AccessControl. -->
7878
<Reference Include="Microsoft.Win32.SystemEvents" ExcludeAssets="All" />
7979
<Reference Include="System.Drawing.Common" ExcludeAssets="All" />
8080
<Reference Include="System.Security.Permissions" ExcludeAssets="All" />

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
123123

124124
<!-- Omit System.Security.Permissions closure. https://github.com/dotnet/runtime/issues/54341
125125
It is brought in by System.Security.Cryptography.Xml for netstandard2.0 compatibility
126-
but not required in net6.0 since the types required exist in System.Security.AccessControl. -->
126+
but not required in net7.0 since the types required exist in System.Security.AccessControl. -->
127127
<Reference Include="Microsoft.Win32.SystemEvents" ExcludeAssets="All" />
128128
<Reference Include="System.Drawing.Common" ExcludeAssets="All" />
129129
<Reference Include="System.Security.Permissions" ExcludeAssets="All" />

0 commit comments

Comments
 (0)