From 4acf0f3cd7c68e0ca302ea16c49a457ccc667fd2 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Thu, 23 May 2024 22:15:18 +0200 Subject: [PATCH] Fix IL3000 warning on Android > osu-framework\osu.Framework.Tests\IO\TestOnlineStore.cs(102,35): warning IL3000: 'System.Reflection.Assembly.Location' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. --- osu.Framework.Tests/IO/TestOnlineStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Framework.Tests/IO/TestOnlineStore.cs b/osu.Framework.Tests/IO/TestOnlineStore.cs index 2d10d37095..f673909ba9 100644 --- a/osu.Framework.Tests/IO/TestOnlineStore.cs +++ b/osu.Framework.Tests/IO/TestOnlineStore.cs @@ -99,7 +99,7 @@ public void TestNullUrlReturnsNull() public void TestFileUrlFails([Values(true, false)] bool async) { // Known, guaranteed file path. - string path = new Uri(RuntimeInfo.EntryAssembly.Location).AbsoluteUri; + string path = new Uri(AppContext.BaseDirectory).AbsoluteUri; byte[]? result = async ? store.GetAsync(path).GetResultSafely()