diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9209ca387fc47a..f8b3f0c85f6793 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -10,61 +10,61 @@ - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 - + https://github.com/dotnet/arcade - 61cde6e8fb9d5c9790867b279deb41783a780cd8 + ee39cd1573dbb8011f343e1037af51d4fc00a747 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 4d23f613656aba..17b7f41ae6e069 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,16 +48,16 @@ - 5.0.0-beta.20474.4 - 5.0.0-beta.20474.4 - 5.0.0-beta.20474.4 - 5.0.0-beta.20474.4 - 5.0.0-beta.20474.4 - 5.0.0-beta.20474.4 - 2.5.1-beta.20474.4 - 5.0.0-beta.20474.4 - 5.0.0-beta.20474.4 - 5.0.0-beta.20474.4 + 5.0.0-beta.20506.7 + 5.0.0-beta.20506.7 + 5.0.0-beta.20506.7 + 5.0.0-beta.20506.7 + 5.0.0-beta.20506.7 + 5.0.0-beta.20506.7 + 2.5.1-beta.20506.7 + 5.0.0-beta.20506.7 + 5.0.0-beta.20506.7 + 5.0.0-beta.20506.7 5.0.0-preview.4.20202.18 5.0.0-preview.4.20202.18 diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index e78ed9a1c6ecd9..8b81a7e51436fb 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -204,7 +204,7 @@ jobs: - ${{ if eq(parameters.enablePublishTestResults, 'true') }}: - task: PublishTestResults@2 - displayName: Publish Test Results + displayName: Publish XUnit Test Results inputs: testResultsFormat: 'xUnit' testResultsFiles: '*.xml' @@ -213,6 +213,16 @@ jobs: mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true condition: always() + - task: PublishTestResults@2 + displayName: Publish TRX Test Results + inputs: + testResultsFormat: 'VSTest' + testResultsFiles: '*.trx' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx + mergeTestResults: ${{ parameters.mergeTestResults }} + continueOnError: true + condition: always() - ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: CopyFiles@2 diff --git a/eng/common/templates/steps/perf-send-to-helix.yml b/eng/common/templates/steps/perf-send-to-helix.yml index 8427de59cd10bd..a468e92ce44d1d 100644 --- a/eng/common/templates/steps/perf-send-to-helix.yml +++ b/eng/common/templates/steps/perf-send-to-helix.yml @@ -11,7 +11,7 @@ parameters: WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion - DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml index 5eceb48725dcf5..bb5f1a9293895b 100644 --- a/eng/common/templates/steps/send-to-helix.yml +++ b/eng/common/templates/steps/send-to-helix.yml @@ -18,7 +18,7 @@ parameters: XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion - DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json + DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." diff --git a/global.json b/global.json index 359a7ec19926d4..1cfdd8d23916e7 100644 --- a/global.json +++ b/global.json @@ -12,10 +12,10 @@ "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20474.4", - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20474.4", - "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20474.4", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20474.4", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20506.7", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20506.7", + "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20506.7", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20506.7", "Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "5.0.0-preview.8.20359.4", "Microsoft.Build.NoTargets": "2.0.1", diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs index b7da71cc34d8bb..8bae64052c42e2 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs @@ -698,7 +698,7 @@ public static bool SetComObjectData(object obj, object key, object? data) if (!SetComObjectData(o, t, Wrapper)) { // Another thead already cached the wrapper so use that one instead. - Wrapper = GetComObjectData(o, t); + Wrapper = GetComObjectData(o, t)!; } } diff --git a/src/installer/managed/Microsoft.NET.HostModel/AppHost/RetryUtil.cs b/src/installer/managed/Microsoft.NET.HostModel/AppHost/RetryUtil.cs index 38be96dc3f0c7f..60a77f44735ef0 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/AppHost/RetryUtil.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/AppHost/RetryUtil.cs @@ -41,7 +41,7 @@ public static void RetryOnIOError(Action func) public static void RetryOnWin32Error(Action func) { - bool IsKnownIrrecoverableError(int hresult) + static bool IsKnownIrrecoverableError(int hresult) { // Error codes are defined in winerror.h // The error code is stored in the lowest 16 bits of the HResult diff --git a/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs b/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs index 8cd899189bf327..4fd668d463d70e 100644 --- a/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs +++ b/src/libraries/Common/src/Extensions/ParameterDefaultValue/ParameterDefaultValue.cs @@ -47,7 +47,7 @@ public static bool TryGetDefaultValue(ParameterInfo parameter, out object? defau [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2067:UnrecognizedReflectionPattern", Justification = "CreateInstance is only called on a ValueType, which will always have a default constructor.")] - object? CreateValueType(Type t) => Activator.CreateInstance(t); + static object? CreateValueType(Type t) => Activator.CreateInstance(t); // Handle nullable enums if (defaultValue != null && diff --git a/src/libraries/Common/src/Interop/Interop.Calendar.cs b/src/libraries/Common/src/Interop/Interop.Calendar.cs index bf71a56cf3f08f..6befb033d68bc9 100644 --- a/src/libraries/Common/src/Interop/Interop.Calendar.cs +++ b/src/libraries/Common/src/Interop/Interop.Calendar.cs @@ -16,7 +16,7 @@ internal static partial class Globalization internal static extern unsafe ResultCode GetCalendarInfo(string localeName, CalendarId calendarId, CalendarDataType calendarDataType, char* result, int resultCapacity); [DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_EnumCalendarInfo")] - internal static extern unsafe bool EnumCalendarInfo(delegate* callback, string localeName, CalendarId calendarId, CalendarDataType calendarDataType, IntPtr context); + internal static extern unsafe bool EnumCalendarInfo(delegate* unmanaged callback, string localeName, CalendarId calendarId, CalendarDataType calendarDataType, IntPtr context); [DllImport(Libraries.GlobalizationNative, EntryPoint = "GlobalizationNative_GetLatestJapaneseEra")] internal static extern int GetLatestJapaneseEra(); diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs index aae94df92914d0..3a61901297a3cb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs @@ -122,10 +122,10 @@ internal static extern bool IsNLSDefinedString( internal static extern int GetLocaleInfoEx(string lpLocaleName, uint LCType, void* lpLCData, int cchData); [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] - internal static extern bool EnumSystemLocalesEx(delegate* lpLocaleEnumProcEx, uint dwFlags, void* lParam, IntPtr reserved); + internal static extern bool EnumSystemLocalesEx(delegate* unmanaged lpLocaleEnumProcEx, uint dwFlags, void* lParam, IntPtr reserved); [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] - internal static extern bool EnumTimeFormatsEx(delegate* lpTimeFmtEnumProcEx, string lpLocaleName, uint dwFlags, void* lParam); + internal static extern bool EnumTimeFormatsEx(delegate* unmanaged lpTimeFmtEnumProcEx, string lpLocaleName, uint dwFlags, void* lParam); [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] internal static extern int GetCalendarInfoEx(string? lpLocaleName, uint Calendar, IntPtr lpReserved, uint CalType, IntPtr lpCalData, int cchData, out int lpValue); @@ -140,7 +140,7 @@ internal static extern bool IsNLSDefinedString( internal static extern int GetGeoInfo(int location, int geoType, char* lpGeoData, int cchData, int LangId); [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] - internal static extern bool EnumCalendarInfoExEx(delegate* pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string? lpReserved, uint CalType, void* lParam); + internal static extern bool EnumCalendarInfoExEx(delegate* unmanaged pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string? lpReserved, uint CalType, void* lParam); [StructLayout(LayoutKind.Sequential)] internal struct NlsVersionInfoEx diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index 954e900b03bb0e..ea40e570582dd3 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -171,9 +171,6 @@ - - true - $(UndefineProperties);TargetFramework;Platform @@ -291,4 +288,10 @@ + + + + + diff --git a/src/libraries/System.Console/src/System/Console.cs b/src/libraries/System.Console/src/System/Console.cs index b4f2270afb861b..642c48b468784d 100644 --- a/src/libraries/System.Console/src/System/Console.cs +++ b/src/libraries/System.Console/src/System/Console.cs @@ -128,12 +128,12 @@ public static Encoding OutputEncoding if (s_out != null && !s_isOutTextWriterRedirected) { s_out.Flush(); - Volatile.Write(ref s_out, null); + Volatile.Write(ref s_out, null!); } if (s_error != null && !s_isErrorTextWriterRedirected) { s_error.Flush(); - Volatile.Write(ref s_error, null); + Volatile.Write(ref s_error, null!); } Volatile.Write(ref s_outputEncoding, (Encoding)value.Clone()); diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs index 026d5d8aa0d826..68019f60a305dc 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs @@ -331,7 +331,7 @@ internal static string GetUntruncatedProcessName(ref Interop.procfs.ParsedStat s } } - string? GetUntruncatedNameFromArg(Span arg, string prefix) + static string? GetUntruncatedNameFromArg(Span arg, string prefix) { // Strip directory names from arg. int nameStart = arg.LastIndexOf((byte)'/') + 1; diff --git a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.GeneralizedTime.cs b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.GeneralizedTime.cs index 72e9214d92bc5e..9acf1d591d9a4f 100644 --- a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.GeneralizedTime.cs +++ b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.GeneralizedTime.cs @@ -144,7 +144,7 @@ private static DateTimeOffset ParseGeneralizedTime( const byte SuffixState = 2; byte state = HmsState; - byte? GetNextState(byte octet) + static byte? GetNextState(byte octet) { if (octet == 'Z' || octet == '-' || octet == '+') { diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs index 4eea5fdd781963..3e07cea34d5467 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs @@ -473,7 +473,7 @@ private unsafe void ProcessEvents(int numEvents, this._context = ExecutionContext.Capture(); - ParsedEvent ParseEvent(byte* nativeEventPath) + static ParsedEvent ParseEvent(byte* nativeEventPath) { int byteCount = 0; Debug.Assert(nativeEventPath != null); diff --git a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamExtensions.netstandard.cs b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamExtensions.netstandard.cs index de706edd81d4f6..2fbd2bcac89c29 100644 --- a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamExtensions.netstandard.cs +++ b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamExtensions.netstandard.cs @@ -25,7 +25,7 @@ public static ValueTask ReadAsync(this Stream stream, Memory buffer, byte[] sharedBuffer = ArrayPool.Shared.Rent(buffer.Length); return FinishReadAsync(stream.ReadAsync(sharedBuffer, 0, buffer.Length, cancellationToken), sharedBuffer, buffer); - async ValueTask FinishReadAsync(Task readTask, byte[] localBuffer, Memory localDestination) + static async ValueTask FinishReadAsync(Task readTask, byte[] localBuffer, Memory localDestination) { try { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs index 5388df7411d2b7..2318077011db88 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs @@ -101,7 +101,7 @@ internal ValueTask ConnectAsync(EndPoint remoteEP, CancellationToken cancellatio return WaitForConnectWithCancellation(saea, connectTask, cancellationToken); } - async ValueTask WaitForConnectWithCancellation(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) + static async ValueTask WaitForConnectWithCancellation(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) { Debug.Assert(cancellationToken.CanBeCanceled); try diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Windows.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Windows.cs index 1d7947523b12ef..2572ebfc544211 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Windows.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Windows.cs @@ -920,7 +920,7 @@ public static unsafe SocketError Poll(SafeSocketHandle handle, int microseconds, public static unsafe SocketError Select(IList? checkRead, IList? checkWrite, IList? checkError, int microseconds) { const int StackThreshold = 64; // arbitrary limit to avoid too much space on stack - bool ShouldStackAlloc(IList? list, ref IntPtr[]? lease, out Span span) + static bool ShouldStackAlloc(IList? list, ref IntPtr[]? lease, out Span span) { int count; if (list == null || (count = list.Count) == 0) diff --git a/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/ManagedWebSocketExtensions.netstandard.cs b/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/ManagedWebSocketExtensions.netstandard.cs index ba18158f08f260..d4d9cdd6467ca9 100644 --- a/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/ManagedWebSocketExtensions.netstandard.cs +++ b/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/ManagedWebSocketExtensions.netstandard.cs @@ -33,7 +33,7 @@ internal static ValueTask ReadAsync(this Stream stream, Memory destin byte[] buffer = ArrayPool.Shared.Rent(destination.Length); return new ValueTask(FinishReadAsync(stream.ReadAsync(buffer, 0, destination.Length, cancellationToken), buffer, destination)); - async Task FinishReadAsync(Task readTask, byte[] localBuffer, Memory localDestination) + static async Task FinishReadAsync(Task readTask, byte[] localBuffer, Memory localDestination) { try { @@ -61,7 +61,7 @@ internal static ValueTask WriteAsync(this Stream stream, ReadOnlyMemory so source.Span.CopyTo(buffer); return new ValueTask(FinishWriteAsync(stream.WriteAsync(buffer, 0, source.Length, cancellationToken), buffer)); - async Task FinishWriteAsync(Task writeTask, byte[] localBuffer) + static async Task FinishWriteAsync(Task writeTask, byte[] localBuffer) { try { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs index 5f13e3d67dc17c..b2703e7bdbb446 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs @@ -143,7 +143,7 @@ private static T EnsureInitializedCore([NotNull] ref T? target, Func value return target!; } - return EnsureInitializedCore(ref target, ref initialized, ref syncLock); + return EnsureInitializedCore(ref target, ref initialized, ref syncLock); } /// diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs index faf99efec76aab..e09e8f9ec14061 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs @@ -665,7 +665,7 @@ private static string IteratorToString(XPathNodeIterator it) } else { - return XmlConvert.ToXPathString(argument); + return XmlConvert.ToXPathString(argument)!; } } diff --git a/src/libraries/System.Security.Cryptography.Encoding/src/Internal/Cryptography/OidLookup.cs b/src/libraries/System.Security.Cryptography.Encoding/src/Internal/Cryptography/OidLookup.cs index b36159a2e7197b..a3fb3cf9acda49 100644 --- a/src/libraries/System.Security.Cryptography.Encoding/src/Internal/Cryptography/OidLookup.cs +++ b/src/libraries/System.Security.Cryptography.Encoding/src/Internal/Cryptography/OidLookup.cs @@ -136,7 +136,7 @@ static OidLookup() private static void InitializeLookupDictionaries() { - void AddEntry(string oid, string primaryFriendlyName, string[]? additionalFriendlyNames = null) + static void AddEntry(string oid, string primaryFriendlyName, string[]? additionalFriendlyNames = null) { s_oidToFriendlyName.Add(oid, primaryFriendlyName); s_friendlyNameToOid.Add(primaryFriendlyName, oid);