mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
Fix assembly location lookups
This commit is contained in:
parent
de079e08dc
commit
dd9a418549
@ -185,7 +185,7 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
|
|
||||||
private Stream openResource(string name)
|
private Stream openResource(string name)
|
||||||
{
|
{
|
||||||
string localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().Location).Path)).AsNonNull();
|
string localPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location).AsNonNull();
|
||||||
return Assembly.LoadFrom(Path.Combine(localPath, $"{ResourceAssembly}.dll")).GetManifestResourceStream($@"{ResourceAssembly}.Resources.{name}");
|
return Assembly.LoadFrom(Path.Combine(localPath, $"{ResourceAssembly}.dll")).GetManifestResourceStream($@"{ResourceAssembly}.Resources.{name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@ -54,7 +53,7 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
|
|
||||||
private Stream openResource(string name)
|
private Stream openResource(string name)
|
||||||
{
|
{
|
||||||
string localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().Location).Path)).AsNonNull();
|
string localPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location).AsNonNull();
|
||||||
return Assembly.LoadFrom(Path.Combine(localPath, $"{ResourceAssembly}.dll")).GetManifestResourceStream($@"{ResourceAssembly}.Resources.{name}");
|
return Assembly.LoadFrom(Path.Combine(localPath, $"{ResourceAssembly}.dll")).GetManifestResourceStream($@"{ResourceAssembly}.Resources.{name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user