Skip to content

Commit

Permalink
[main] Update dependencies from dotnet/runtime dotnet/efcore (#36328)
Browse files Browse the repository at this point in the history
[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 <chrross@microsoft.com>

 - Update src/Shared/CodeAnalysis/DynamicallyAccessedMemberTypes.cs

Co-authored-by: Chris Ross <chrross@microsoft.com>

 - 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
  • Loading branch information
dotnet-maestro[bot] authored Sep 21, 2021
1 parent 5750125 commit 70c05f1
Show file tree
Hide file tree
Showing 78 changed files with 423 additions and 402 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0
"VARIANT": "5.0",
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0, 6.0, 7.0
"VARIANT": "7.0",
// Options
"INSTALL_NODE": "true",
"NODE_VERSION": "lts/*"
Expand All @@ -31,7 +31,7 @@
"remoteEnv": {
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
"DOTNET_MULTILEVEL_LOOKUP": "0",
"TARGET": "net6.0"
"TARGET": "net7.0"
},

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<NuspecBasePath>$(MSBuildProjectDirectory)</NuspecBasePath>

<IncludeSymbols>true</IncludeSymbols>
<DefaultNetFxTargetFramework>net461</DefaultNetFxTargetFramework>
<DefaultNetFxTargetFramework>net462</DefaultNetFxTargetFramework>
</PropertyGroup>

<!-- Warnings and errors -->
Expand Down
2 changes: 1 addition & 1 deletion docs/DailyBuilds.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you want to download the latest daily build and use it in a project, then you
<configuration>
<packageSources>
<clear />
<add key="aspnetcore" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="aspnetcore" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
Expand Down
2 changes: 2 additions & 0 deletions eng/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ and are generated based on the last package release.
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.1.x86" />
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.5.0.x64" />
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.5.0.x86" />
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.6.0.x64" />
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.6.0.x86" />
<LatestPackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Runtime" />
<LatestPackageReference Include="Microsoft.Internal.Runtime.AspNetCore.Transport" />
<LatestPackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
Expand Down
280 changes: 140 additions & 140 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

145 changes: 74 additions & 71 deletions eng/Versions.props

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions eng/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@
<ProjectTargetFrameworkVersion>v$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)', 2))</ProjectTargetFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<!--
Reference base shared framework at incoming dependency flow version, not bundled sdk version.
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)
-->
<FrameworkReference
Update="Microsoft.NETCore.App"
Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '$(DefaultNetCoreTargetFrameworkIdentifier)') AND '$(DefaultNetCoreTargetFrameworkVersion)' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' "
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
TargetingPackVersion="$(MicrosoftNETCoreAppRefVersion)" />
</ItemGroup>

<!--
Workaround https://github.com/dotnet/aspnetcore/issues/4257.
The web sdk adds an implicit framework reference. This removes it until we can update our build to use framework references.
Expand Down
5 changes: 3 additions & 2 deletions eng/targets/Helix.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
<HelixTestName>$(MSBuildProjectName)--$(TargetFramework)</HelixTestName>
<LoggingTestingDisableFileLogging Condition="'$(IsHelixJob)' == 'true'">false</LoggingTestingDisableFileLogging>
<NodeVersion>14.17.6</NodeVersion>
<TestDependsOnAspNetPackages>false</TestDependsOnAspNetPackages>
<TestDependsOnAspNetRuntime>false</TestDependsOnAspNetRuntime>
<!-- Have all tests depend on the latest runtimes until we get a net7.0 SDK -->
<TestDependsOnAspNetPackages>true</TestDependsOnAspNetPackages>
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down
17 changes: 17 additions & 0 deletions eng/tools/GenerateFiles/Directory.Build.targets.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,30 @@
TargetFramework="${DefaultNetCoreTargetFramework}"
Condition="@(KnownAppHostPack->Count()) != '0' AND
!(@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}')))" />
<KnownRuntimePack
Include="@(KnownRuntimePack->WithMetadataValue('TargetFramework', 'net6.0'))"
TargetFramework="${DefaultNetCoreTargetFramework}"
Condition="@(KnownRuntimePack->Count()) != '0' AND
!(@(KnownRuntimePack->AnyHaveMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}')))" />
<KnownFrameworkReference
Include="@(KnownFrameworkReference->WithMetadataValue('TargetFramework', 'net6.0'))"
TargetFramework="${DefaultNetCoreTargetFramework}"
Condition="@(KnownFrameworkReference->Count()) != '0' AND
!(@(KnownFrameworkReference->AnyHaveMetadataValue('TargetFramework', '${DefaultNetCoreTargetFramework}')))" />
</ItemGroup>

<ItemGroup>
<!--
Reference base shared framework at incoming dependency flow version, not bundled sdk version.
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)
-->
<FrameworkReference
Update="Microsoft.NETCore.App"
Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '${DefaultNetCoreTargetFramework}') AND '${DefaultNetCoreTargetFramework}' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' "
RuntimeFrameworkVersion="${MicrosoftNETCoreAppRuntimeVersion}"
TargetingPackVersion="${MicrosoftNETCoreAppRefVersion}" />
</ItemGroup>

<ItemGroup>
<!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. -->
<KnownFrameworkReference
Expand Down
14 changes: 9 additions & 5 deletions eng/tools/RepoTasks/CreateFrameworkListFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,19 @@ public override bool Execute()

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

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

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

Expand Down
6 changes: 4 additions & 2 deletions eng/tools/RepoTasks/RepoTasks.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<!-- Keep this project at net6.0 until there is an SDK with net7.0 runtimes -->
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net472</TargetFrameworks>
<DefineConstants Condition="'$(TargetFramework)' == 'net472'">$(DefineConstants);BUILD_MSI_TASKS</DefineConstants>
<Optimize>false</Optimize>
Expand All @@ -19,7 +20,8 @@
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
<!-- Change this back to '$(DefaultNetCoreTargetFramework)' once we have an SDK with net7.0 runtimes -->
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTaskCoreVersion)" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" />
Expand Down
1 change: 1 addition & 0 deletions eng/tools/RepoTasks/RepoTasks.tasks
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<!-- Keep this project at net6.0 until there is an SDK with net7.0 runtimes -->
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">net6.0</_RepoTaskAssemblyFolder>
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' != 'core'">net472</_RepoTaskAssemblyFolder>
<_RepoTaskAssembly>$(ArtifactsBinDir)RepoTasks\Release\$(_RepoTaskAssemblyFolder)\RepoTasks.dll</_RepoTaskAssembly>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
$CommonMetadataElements$
<dependencies>
<group targetFramework=".net6.0">
<group targetFramework=".net7.0">
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$componentAnalyzerVersion$" />
<dependency id="Microsoft.AspNetCore.Authorization" version="$authorizationVersion$" exclude="Build,Analyzers" />
</group>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"tfm": "net7.0",
"framework": {
"name": "Microsoft.AspNetCore.App",
"version": "${SharedFxVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM selenium/standalone-chrome:latest as final
ENV StressRunDuration=0

WORKDIR /app
COPY ./Driver/bin/Release/net6.0/linux-x64/publish ./
COPY ./Driver/bin/Release/net7.0/linux-x64/publish ./
COPY ./exec.sh ./

ENTRYPOINT [ "bash", "./exec.sh" ]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal static class Pbkdf2Util

private static IPbkdf2Provider GetPbkdf2Provider()
{
#if NETSTANDARD2_0 || NET461
#if NETSTANDARD2_0 || NETFRAMEWORK
// In priority order, our three implementations are Win8, Win7, and "other".
if (OSVersionUtil.IsWindows8OrLater())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void RunTest_Normal_NetCore(string password, KeyDerivationPrf prf, int it
}

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

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

#if NET461
#if NETFRAMEWORK
RunTest_WithLongPassword_Impl<ManagedPbkdf2Provider>(salt, "NGJtFzYUaaSxu+3ZsMeZO5d/qPJDUYW4caLkFlaY0cLSYdh1PN4+nHUVp4pUUubJWu3UeXNMnHKNDfnn8GMfnDVrAGTv1lldszsvUJ0JQ6p4+daQEYBc//Tj/ejuB3luwW0IinyE7U/ViOQKbfi5pCZFMQ0FFx9I+eXRlyT+I74=");
#elif NETCOREAPP
RunTest_WithLongPassword_Impl<NetCorePbkdf2Provider>(salt, "NGJtFzYUaaSxu+3ZsMeZO5d/qPJDUYW4caLkFlaY0cLSYdh1PN4+nHUVp4pUUubJWu3UeXNMnHKNDfnn8GMfnDVrAGTv1lldszsvUJ0JQ6p4+daQEYBc//Tj/ejuB3luwW0IinyE7U/ViOQKbfi5pCZFMQ0FFx9I+eXRlyT+I74=");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.DataProtection.Managed
{
internal sealed unsafe class ManagedGenRandomImpl : IManagedGenRandom
{
#if NETSTANDARD2_0 || NET461
#if NETSTANDARD2_0 || NETFRAMEWORK
private static readonly RandomNumberGenerator _rng = RandomNumberGenerator.Create();
#endif
public static readonly ManagedGenRandomImpl Instance = new ManagedGenRandomImpl();
Expand All @@ -20,7 +20,7 @@ private ManagedGenRandomImpl()
public byte[] GenRandom(int numBytes)
{
var bytes = new byte[numBytes];
#if NETSTANDARD2_0 || NET461
#if NETSTANDARD2_0 || NETFRAMEWORK
_rng.GetBytes(bytes);
#else
RandomNumberGenerator.Fill(bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public async Task RunsInIISExpressInProcess()
var applicationName = "CreateDefaultBuilderApp";
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
{
TargetFramework = "net6.0",
TargetFramework = "net7.0",
HostingModel = HostingModel.InProcess
};

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

if (setTestEnvVars)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
$CommonMetadataElements$
<dependencies>
<group targetFramework=".net6.0">
<group targetFramework=".net7.0">
<dependency id="Microsoft.Extensions.FileProviders.Abstractions" version="$AbstractionsVersion$" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
$CommonMetadataElements$
<dependencies>
<group targetFramework=".net6.0">
<group targetFramework=".net7.0">
<dependency id="Microsoft.Extensions.FileProviders.Abstractions" version="$AbstractionsVersion$" exclude="Build,Analyzers" />
</group>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant

<!-- Omit System.Security.Permissions closure. https://github.com/dotnet/runtime/issues/54341
It is brought in by System.Security.Cryptography.Xml for netstandard2.0 compatibility
but not required in net6.0 since the types required exist in System.Security.AccessControl. -->
but not required in net7.0 since the types required exist in System.Security.AccessControl. -->
<Reference Include="Microsoft.Win32.SystemEvents" ExcludeAssets="All" />
<Reference Include="System.Drawing.Common" ExcludeAssets="All" />
<Reference Include="System.Security.Permissions" ExcludeAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant

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

0 comments on commit 70c05f1

Please sign in to comment.