* Configuration.cs:
Added missing namespace to embedded resource name. Embedded OpenTK.dll.config now loads correctly.
This commit is contained in:
parent
3181275d1e
commit
f7cce64eed
1 changed files with 5 additions and 3 deletions
|
@ -239,7 +239,7 @@ namespace OpenTK
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Assembly asm = Assembly.GetAssembly(typeof(Configuration));
|
Assembly asm = Assembly.GetAssembly(typeof(Configuration));
|
||||||
name = asm.GetName().Name;
|
name = asm.GetName().Name; // In case someone embeds OpenTK into another dll.
|
||||||
monopath = Path.Combine(
|
monopath = Path.Combine(
|
||||||
Environment.GetFolderPath(Environment.SpecialFolder.Personal),
|
Environment.GetFolderPath(Environment.SpecialFolder.Personal),
|
||||||
".mono");
|
".mono");
|
||||||
|
@ -252,8 +252,10 @@ namespace OpenTK
|
||||||
CreatePath(outpath);
|
CreatePath(outpath);
|
||||||
|
|
||||||
Debug.Print("Loading embedded config.");
|
Debug.Print("Loading embedded config.");
|
||||||
// Note: the dll name is hardcoded
|
// Note: the resource name and namespace are hardcoded.
|
||||||
Stream str = asm.GetManifestResourceStream("OpenTK.dll.config");
|
// This will fail if someone recompiles OpenTK with a different namespace
|
||||||
|
// (not *our* problem, though).
|
||||||
|
Stream str = asm.GetManifestResourceStream("OpenTK.OpenTK.dll.config");
|
||||||
if (str != null)
|
if (str != null)
|
||||||
{
|
{
|
||||||
using (str)
|
using (str)
|
||||||
|
|
Loading…
Reference in a new issue