Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6c34541
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 9, 2021
90c9c77
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 9, 2021
74cdc6e
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 10, 2021
b4067b9
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 11, 2021
a94695c
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 11, 2021
c759378
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 12, 2021
22b52b6
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 13, 2021
20f5dd0
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 13, 2021
5c4e769
Update TFM to net7.0
wtgodbe Sep 13, 2021
6ef532d
Fixup
wtgodbe Sep 13, 2021
217b2b6
Update src/Shared/CodeAnalysis/DynamicallyAccessedMembersAttribute.cs
wtgodbe Sep 13, 2021
3fe3614
Update src/Shared/CodeAnalysis/DynamicallyAccessedMemberTypes.cs
wtgodbe Sep 13, 2021
fb2d57e
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 14, 2021
388b139
Update netfx to 462
wtgodbe Sep 14, 2021
31c080a
Update more to net462
wtgodbe Sep 14, 2021
e527131
Fix workaround
wtgodbe Sep 14, 2021
78d2adc
Update ifdefs
wtgodbe Sep 14, 2021
cf9a2c2
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 14, 2021
dbfe74a
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 15, 2021
8ef0075
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 16, 2021
7942af9
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 16, 2021
8cb651e
Add workaround for KnownRuntimePack
wtgodbe Sep 16, 2021
fee0c21
Merge branch 'darc-main-c944b2c3-1c63-49a3-b9dd-98cda1a942e3' of http…
wtgodbe Sep 16, 2021
ce65b6b
Merge branch 'main' into darc-main-c944b2c3-1c63-49a3-b9dd-98cda1a942e3
wtgodbe Sep 16, 2021
facaf36
Add SiteExtensions versions
wtgodbe Sep 16, 2021
1a30f27
Fix RepoTasks assembly dir
wtgodbe Sep 16, 2021
8e772be
Update CreateFrameworkListFile to account for new analyzer path forma…
eerhardt Sep 16, 2021
1f31330
Don't target latest runtime in razor tests
wtgodbe Sep 16, 2021
1dedd55
Update Dependencies.props
wtgodbe Sep 16, 2021
94d8822
Update Helix.targets
wtgodbe Sep 16, 2021
8d3bad9
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 17, 2021
ffa8bd5
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 17, 2021
cd7bcd5
Fixup
wtgodbe Sep 17, 2021
5ff2591
Move FrameworkReference update to GenerateFiles
wtgodbe Sep 17, 2021
40df9e7
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 17, 2021
24c05ba
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 18, 2021
cc2bac6
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 18, 2021
926ca3a
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 18, 2021
c1de26e
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 18, 2021
0d6f3ca
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 19, 2021
8fabef1
Update dependencies from https://github.com/dotnet/runtime build 2021…
dotnet-maestro[bot] Sep 20, 2021
f1ec076
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 20, 2021
7a6b6be
Update dependencies from https://github.com/dotnet/efcore build 20210…
dotnet-maestro[bot] Sep 20, 2021
748475a
Have Helix tests import directory.build files
wtgodbe Sep 20, 2021
cb2be04
Keep RunTests at net6
wtgodbe Sep 20, 2021
6ba0465
Quarantine 2 tests
wtgodbe Sep 20, 2021
a47c0a5
revert spa-templates submodule downgrade
halter73 Sep 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update ifdefs
  • Loading branch information
wtgodbe committed Sep 14, 2021
commit 78d2adc8fb325ac564afc0e2edd271231ba2bc8f
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 || NET462
#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 NET462
#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 NET462
#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 NET462
#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 || NET462
#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 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
_rng.GetBytes(bytes);
#else
RandomNumberGenerator.Fill(bytes);
Expand Down
6 changes: 3 additions & 3 deletions src/Identity/Extensions.Core/src/PasswordHasher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public PasswordHasher(IOptions<PasswordHasherOptions> optionsAccessor = null)
_rng = options.Rng;
}

#if NETSTANDARD2_0 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
// Compares two byte arrays for equality. The method is specifically written so that the loop is not optimized.
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
private static bool ByteArraysEqual(byte[] a, byte[] b)
Expand Down Expand Up @@ -244,7 +244,7 @@ private static bool VerifyHashedPasswordV2(byte[] hashedPassword, string passwor

// Hash the incoming password and verify it
byte[] actualSubkey = KeyDerivation.Pbkdf2(password, salt, Pbkdf2Prf, Pbkdf2IterCount, Pbkdf2SubkeyLength);
#if NETSTANDARD2_0 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
return ByteArraysEqual(actualSubkey, expectedSubkey);
#elif NETCOREAPP
return CryptographicOperations.FixedTimeEquals(actualSubkey, expectedSubkey);
Expand Down Expand Up @@ -283,7 +283,7 @@ private static bool VerifyHashedPasswordV3(byte[] hashedPassword, string passwor

// Hash the incoming password and verify it
byte[] actualSubkey = KeyDerivation.Pbkdf2(password, salt, prf, iterCount, subkeyLength);
#if NETSTANDARD2_0 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
return ByteArraysEqual(actualSubkey, expectedSubkey);
#elif NETCOREAPP
return CryptographicOperations.FixedTimeEquals(actualSubkey, expectedSubkey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static class Rfc6238AuthenticationService
{
private static readonly TimeSpan _timestep = TimeSpan.FromMinutes(3);
private static readonly Encoding _encoding = new UTF8Encoding(false, true);
#if NETSTANDARD2_0 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
private static readonly DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
private static readonly RandomNumberGenerator _rng = RandomNumberGenerator.Create();
#endif
Expand All @@ -22,7 +22,7 @@ internal static class Rfc6238AuthenticationService
public static byte[] GenerateRandomKey()
{
byte[] bytes = new byte[20];
#if NETSTANDARD2_0 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
_rng.GetBytes(bytes);
#else
RandomNumberGenerator.Fill(bytes);
Expand Down Expand Up @@ -68,7 +68,7 @@ private static byte[] ApplyModifier(byte[] input, string modifier)
// More info: https://tools.ietf.org/html/rfc6238#section-4
private static ulong GetCurrentTimeStepNumber()
{
#if NETSTANDARD2_0 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
var delta = DateTime.UtcNow - _unixEpoch;
#else
var delta = DateTimeOffset.UtcNow - DateTimeOffset.UnixEpoch;
Expand Down
4 changes: 2 additions & 2 deletions src/Identity/Extensions.Core/src/UserManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class UserManager<TUser> : IDisposable where TUser : class
new Dictionary<string, IUserTwoFactorTokenProvider<TUser>>();

private bool _disposed;
#if NETSTANDARD2_0 || NET462
#if NETSTANDARD2_0 || NETFRAMEWORK
private static readonly RandomNumberGenerator _rng = RandomNumberGenerator.Create();
#endif
private readonly IServiceProvider _services;
Expand Down Expand Up @@ -2429,7 +2429,7 @@ private IUserRoleStore<TUser> GetUserRoleStore()
private static string NewSecurityStamp()
{
byte[] bytes = new byte[20];
#if NETSTANDARD2_0 || NET462
#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 @@ -13,7 +13,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: table => new
{
Id = table.Column<int>(nullable: false)
#if !NET462
#if !NETFRAMEWORK
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
#endif
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
Expand All @@ -31,7 +31,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: table => new
{
Id = table.Column<int>(nullable: false)
#if !NET462
#if !NETFRAMEWORK
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
#endif
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
Expand Down Expand Up @@ -59,7 +59,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: table => new
{
Id = table.Column<int>(nullable: false)
#if !NET462
#if !NETFRAMEWORK
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
#endif
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
Expand All @@ -84,7 +84,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: table => new
{
Id = table.Column<int>(nullable: false)
#if !NET462
#if !NETFRAMEWORK
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
#endif
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
Expand Down
2 changes: 1 addition & 1 deletion src/Mvc/perf/benchmarkapps/BasicApi/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void ConfigureServices(IServiceCollection services)

switch (databaseType.ToUpperInvariant())
{
#if !NET462
#if !NETFRAMEWORK
case "MYSQL":
services
.AddEntityFrameworkMySql()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: table => new
{
Id = table.Column<int>(nullable: false)
#if !NET462
#if !NETFRAMEWORK
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
#endif
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
Expand Down
2 changes: 1 addition & 1 deletion src/Mvc/perf/benchmarkapps/BasicViews/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void ConfigureServices(IServiceCollection services)

switch (databaseType.ToUpperInvariant())
{
#if !NET462
#if !NETFRAMEWORK
case "MYSQL":
services
.AddEntityFrameworkMySql()
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/CommandLineUtils/Utilities/DotNetMuxer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// System.AppContext.GetData is not available in these frameworks
#nullable enable

#if !NET451 && !NET452 && !NET46 && !NET462
#if !NETFRAMEWORK

using System;
using System.Diagnostics;
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/OperatingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore
{
internal sealed class OperatingSystem
{
#if NET462
#if NETFRAMEWORK
private const bool _isBrowser = false;
#else
private static readonly bool _isBrowser = RuntimeInformation.IsOSPlatform(OSPlatform.Create("browser"));
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/test/Shared.Tests/PropertyHelperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void PropertyHelper_RefStructProperties()
var helper = Assert.Single(PropertyHelper.GetProperties(obj.GetType().GetTypeInfo()));
Assert.Equal("Prop5", helper.Name);
}
#elif NET46 || NET462
#elif NETFRAMEWORK
#else
#error Unknown TFM - update the set of TFMs where we test for ref structs
#endif
Expand Down Expand Up @@ -746,7 +746,7 @@ private class RefStructProperties
private readonly ref struct MyRefStruct
{
}
#elif NET46 || NET462
#elif NETFRAMEWORK
#else
#error Unknown TFM - update the set of TFMs where we test for ref structs
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private async ValueTask<WebSocket> DefaultWebSocketFactory(WebSocketConnectionCo
{
// Full Framework will throw when trying to set the User-Agent header
// So avoid setting it in netstandard2.0 and only set it in netstandard2.1 and higher
#if !NETSTANDARD2_0 && !NET462
#if !NETSTANDARD2_0 && !NETFRAMEWORK
webSocket.Options.SetRequestHeader("User-Agent", Constants.UserAgentHeader.ToString());
#else
// Set an alternative user agent header on Full framework
Expand Down Expand Up @@ -276,7 +276,7 @@ private async Task StartReceiving(WebSocket socket)
#if NETSTANDARD2_1 || NETCOREAPP
// Because we checked the CloseStatus from the 0 byte read above, we don't need to check again after reading
var receiveResult = await socket.ReceiveAsync(memory, CancellationToken.None);
#elif NETSTANDARD2_0 || NET462
#elif NETSTANDARD2_0 || NETFRAMEWORK
var isArray = MemoryMarshal.TryGetArray<byte>(memory, out var arraySegment);
Debug.Assert(isArray);

Expand Down
2 changes: 1 addition & 1 deletion src/Testing/src/xunit/FrameworkSkipConditionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private static bool CanRunOnThisFramework(RuntimeFrameworks excludedFrameworks)
return true;
}

#if NET462 || NET46
#if NETFRAMEWORK
if (excludedFrameworks.HasFlag(RuntimeFrameworks.Mono) &&
TestPlatformHelper.IsMono)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected override int Execute()
return loadContext.LoadFromAssemblyPath(assemblyPath);
};

#elif NET462
#elif NETFRAMEWORK
AppDomain.CurrentDomain.AssemblyResolve += (source, eventArgs) =>
{
var assemblyName = new AssemblyName(eventArgs.Name);
Expand Down