mirror of https://github.com/ppy/osu
Fix path not being local enough for some unit tests.
This commit is contained in:
parent
edb2eb1332
commit
6cc5407348
|
@ -8,10 +8,10 @@ public static class Resource
|
|||
{
|
||||
public static Stream OpenResource(string name)
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetManifestResourceStream(
|
||||
$@"osu.Game.Tests.Resources.{name}") ??
|
||||
Assembly.LoadFrom("osu.Game.Resources.dll").GetManifestResourceStream(
|
||||
$@"osu.Game.Resources.{name}");
|
||||
var localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
|
||||
|
||||
return Assembly.GetExecutingAssembly().GetManifestResourceStream($@"osu.Game.Tests.Resources.{name}") ??
|
||||
Assembly.LoadFrom(Path.Combine(localPath, @"osu.Game.Resources.dll")).GetManifestResourceStream($@"osu.Game.Resources.{name}");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,6 +35,7 @@
|
|||
<HintPath>..\packages\ppy.OpenTK.2.0.50727.1337\lib\net20\OpenTK.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue