diff --git a/global.json b/global.json
deleted file mode 100644
index 2c93a533e4..0000000000
--- a/global.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "sdk": {
- "allowPrerelease": false,
- "rollForward": "minor",
- "version": "3.1.100"
- },
- "msbuild-sdks": {
- "Microsoft.Build.Traversal": "3.0.2"
- }
-}
\ No newline at end of file
diff --git a/osu.Android.props b/osu.Android.props
index 492c88c7e4..db5c933c41 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -52,6 +52,6 @@
-
+
diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs
index 62d8c17058..d1515acafa 100644
--- a/osu.Desktop/OsuGameDesktop.cs
+++ b/osu.Desktop/OsuGameDesktop.cs
@@ -5,6 +5,7 @@ using System;
using System.IO;
using System.Linq;
using System.Reflection;
+using System.Runtime.Versioning;
using System.Threading.Tasks;
using Microsoft.Win32;
using osu.Desktop.Overlays;
@@ -56,16 +57,16 @@ namespace osu.Desktop
string stableInstallPath;
- try
+ if (OperatingSystem.IsWindows())
{
- using (RegistryKey key = Registry.ClassesRoot.OpenSubKey("osu"))
- stableInstallPath = key?.OpenSubKey(@"shell\open\command")?.GetValue(string.Empty)?.ToString()?.Split('"')[1].Replace("osu!.exe", "");
+ try
+ {
+ stableInstallPath = getStableInstallPathFromRegistry();
- if (checkExists(stableInstallPath))
- return stableInstallPath;
- }
- catch
- {
+ if (!string.IsNullOrEmpty(stableInstallPath) && checkExists(stableInstallPath))
+ return stableInstallPath;
+ }
+ catch { }
}
stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!");
@@ -79,6 +80,13 @@ namespace osu.Desktop
return null;
}
+ [SupportedOSPlatform("windows")]
+ private string getStableInstallPathFromRegistry()
+ {
+ using (RegistryKey key = Registry.ClassesRoot.OpenSubKey("osu"))
+ return key?.OpenSubKey(@"shell\open\command")?.GetValue(string.Empty)?.ToString()?.Split('"')[1].Replace("osu!.exe", "");
+ }
+
protected override UpdateManager CreateUpdateManager()
{
switch (RuntimeInfo.OS)
diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj
index 8b8ad9f8af..4554f8b83a 100644
--- a/osu.Desktop/osu.Desktop.csproj
+++ b/osu.Desktop/osu.Desktop.csproj
@@ -1,6 +1,6 @@
- netcoreapp3.1
+ net5.0
WinExe
true
A free-to-win rhythm game. Rhythm is just a *click* away!
diff --git a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
index ff26f4afaa..7805bfcefc 100644
--- a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
+++ b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net5.0
Exe
false
diff --git a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
index 51d2032795..54fddc297e 100644
--- a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
+++ b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
@@ -9,7 +9,7 @@
WinExe
- netcoreapp3.1
+ net5.0
diff --git a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
index 3261f632f2..d55b4fe08a 100644
--- a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
+++ b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
@@ -9,7 +9,7 @@
WinExe
- netcoreapp3.1
+ net5.0
diff --git a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
index 32243e0bc3..345c3e6d35 100644
--- a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
+++ b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
@@ -9,7 +9,7 @@
WinExe
- netcoreapp3.1
+ net5.0
diff --git a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
index 210f81d111..2a5a2e2fdb 100644
--- a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
@@ -9,7 +9,7 @@
WinExe
- netcoreapp3.1
+ net5.0
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs
index b2ad7ca5b4..802dbf2021 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs
@@ -244,7 +244,7 @@ namespace osu.Game.Tests.Visual.Gameplay
internal class TestKeyBindingContainer : KeyBindingContainer
{
- public override IEnumerable DefaultKeyBindings => new[]
+ public override IEnumerable DefaultKeyBindings => new[]
{
new KeyBinding(InputKey.MouseLeft, TestAction.Down),
};
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs
index 40c4214749..6e338b7202 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs
@@ -179,7 +179,7 @@ namespace osu.Game.Tests.Visual.Gameplay
internal class TestKeyBindingContainer : KeyBindingContainer
{
- public override IEnumerable DefaultKeyBindings => new[]
+ public override IEnumerable DefaultKeyBindings => new[]
{
new KeyBinding(InputKey.MouseLeft, TestAction.Down),
};
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs
index e148fa381c..35b3bfc1f8 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
+using System.Diagnostics;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
@@ -74,6 +75,8 @@ namespace osu.Game.Tests.Visual.Gameplay
switch (args.Action)
{
case NotifyCollectionChangedAction.Add:
+ Debug.Assert(args.NewItems != null);
+
foreach (int user in args.NewItems)
{
if (user == api.LocalUser.Value.Id)
@@ -83,6 +86,8 @@ namespace osu.Game.Tests.Visual.Gameplay
break;
case NotifyCollectionChangedAction.Remove:
+ Debug.Assert(args.OldItems != null);
+
foreach (int user in args.OldItems)
{
if (user == api.LocalUser.Value.Id)
@@ -298,7 +303,7 @@ namespace osu.Game.Tests.Visual.Gameplay
internal class TestKeyBindingContainer : KeyBindingContainer
{
- public override IEnumerable DefaultKeyBindings => new[]
+ public override IEnumerable DefaultKeyBindings => new[]
{
new KeyBinding(InputKey.MouseLeft, TestAction.Down),
};
diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj
index 9049b67f90..c0c0578391 100644
--- a/osu.Game.Tests/osu.Game.Tests.csproj
+++ b/osu.Game.Tests/osu.Game.Tests.csproj
@@ -10,7 +10,7 @@
WinExe
- netcoreapp3.1
+ net5.0
diff --git a/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj b/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
index dc4f22788d..185b35e40d 100644
--- a/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
+++ b/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
@@ -11,7 +11,7 @@
WinExe
- netcoreapp3.1
+ net5.0
diff --git a/osu.Game/Database/OsuDbContext.cs b/osu.Game/Database/OsuDbContext.cs
index 2ae07b3cf8..2aae62edea 100644
--- a/osu.Game/Database/OsuDbContext.cs
+++ b/osu.Game/Database/OsuDbContext.cs
@@ -135,6 +135,8 @@ namespace osu.Game.Database
modelBuilder.Entity().HasIndex(b => new { b.RulesetID, b.Variant });
modelBuilder.Entity().HasIndex(b => b.IntAction);
+ modelBuilder.Entity().Ignore(b => b.KeyCombination);
+ modelBuilder.Entity().Ignore(b => b.Action);
modelBuilder.Entity().HasIndex(b => new { b.RulesetID, b.Variant });
diff --git a/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs b/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs
index 94edc33099..d12eaa10f6 100644
--- a/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs
+++ b/osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs
@@ -23,7 +23,7 @@ namespace osu.Game.Input.Bindings
private KeyBindingStore store;
- public override IEnumerable DefaultKeyBindings => ruleset.CreateInstance().GetDefaultKeyBindings(variant ?? 0);
+ public override IEnumerable DefaultKeyBindings => ruleset.CreateInstance().GetDefaultKeyBindings(variant ?? 0);
///
/// Create a new instance.
diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs
index b8c2fa201f..8ccdb9249e 100644
--- a/osu.Game/Input/Bindings/GlobalActionContainer.cs
+++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs
@@ -21,7 +21,7 @@ namespace osu.Game.Input.Bindings
handler = game;
}
- public override IEnumerable DefaultKeyBindings => GlobalKeyBindings.Concat(InGameKeyBindings).Concat(AudioControlKeyBindings).Concat(EditorKeyBindings);
+ public override IEnumerable DefaultKeyBindings => GlobalKeyBindings.Concat(InGameKeyBindings).Concat(AudioControlKeyBindings).Concat(EditorKeyBindings);
public IEnumerable GlobalKeyBindings => new[]
{
diff --git a/osu.Game/Input/KeyBindingStore.cs b/osu.Game/Input/KeyBindingStore.cs
index bc73d74d74..b25b00eb84 100644
--- a/osu.Game/Input/KeyBindingStore.cs
+++ b/osu.Game/Input/KeyBindingStore.cs
@@ -49,7 +49,7 @@ namespace osu.Game.Input
}
}
- private void insertDefaults(IEnumerable defaults, int? rulesetId = null, int? variant = null)
+ private void insertDefaults(IEnumerable defaults, int? rulesetId = null, int? variant = null)
{
using (var usage = ContextFactory.GetForWrite())
{
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index f28a55e016..301ee39a61 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -26,7 +26,7 @@
-
+
diff --git a/osu.iOS.props b/osu.iOS.props
index 93be3645ee..225cf981f2 100644
--- a/osu.iOS.props
+++ b/osu.iOS.props
@@ -70,7 +70,7 @@
-
+
@@ -88,7 +88,7 @@
-
+
diff --git a/osu.sln b/osu.sln
index 1d64f6ff10..c9453359b1 100644
--- a/osu.sln
+++ b/osu.sln
@@ -57,7 +57,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
- global.json = global.json
osu.Android.props = osu.Android.props
osu.iOS.props = osu.iOS.props
CodeAnalysis\osu.ruleset = CodeAnalysis\osu.ruleset