Update to .NET 6

This commit is contained in:
abcdefg30
2021-10-27 22:35:06 +02:00
committed by Matthias Mailänder
parent eae6d33cd9
commit b12c15ea9d
13 changed files with 45 additions and 39 deletions

View File

@@ -13,6 +13,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using OpenRA.Mods.Common.FileFormats;
using OpenRA.Widgets;
@@ -472,6 +473,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (Platform.CurrentPlatform != PlatformType.Windows)
return null;
// We need an extra check for the platform here to silence a warning when the registry is accessed
// TODO: Remove this once our platform checks use the same method
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return null;
foreach (var prefix in source.RegistryPrefixes)
{
var path = Microsoft.Win32.Registry.GetValue(prefix + source.RegistryKey, source.RegistryValue, null) as string;