From f7cce64eedb1dce6bba0a8d9281589bf8398606d Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 8 Dec 2010 08:06:01 +0000 Subject: [PATCH] * Configuration.cs: Added missing namespace to embedded resource name. Embedded OpenTK.dll.config now loads correctly. --- Source/OpenTK/Configuration.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/OpenTK/Configuration.cs b/Source/OpenTK/Configuration.cs index d7116ba0..16b59c8b 100644 --- a/Source/OpenTK/Configuration.cs +++ b/Source/OpenTK/Configuration.cs @@ -239,7 +239,7 @@ namespace OpenTK try { 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( Environment.GetFolderPath(Environment.SpecialFolder.Personal), ".mono"); @@ -252,8 +252,10 @@ namespace OpenTK CreatePath(outpath); Debug.Print("Loading embedded config."); - // Note: the dll name is hardcoded - Stream str = asm.GetManifestResourceStream("OpenTK.dll.config"); + // Note: the resource name and namespace are hardcoded. + // 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) { using (str)