The Path.GetDirectoryName() method in Mono simplifies repeated '/', thus mangling URI in the form 'file://blah'. As the paths here are local, do not use URIs at all.
-- Emanuele Aina Studio Associato Di Nunzio e Di Gregorio http://dndg.it/ Via Maria Vittoria, 2 10123 Torino - Italy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
>From 26ead54b038bd057957b4bfe24946e082cd9e3cb Mon Sep 17 00:00:00 2001 From: Emanuele Aina <[email protected]> Date: Mon, 6 Jul 2009 22:49:19 +0200 Subject: [PATCH 2/7] Fix DbMetal assembly loading on Mono The Path.GetDirectoryName() in Mono simplifies repeated '/', thus mangling URI in the form 'file://blah'. As the paths here are local, do not use URIs at all. --- .../Implementation/SchemaLoaderFactory.cs | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DbMetal/Generator/Implementation/SchemaLoaderFactory.cs b/src/DbMetal/Generator/Implementation/SchemaLoaderFactory.cs index 5595021..e3c1666 100644 --- a/src/DbMetal/Generator/Implementation/SchemaLoaderFactory.cs +++ b/src/DbMetal/Generator/Implementation/SchemaLoaderFactory.cs @@ -163,8 +163,10 @@ namespace DbMetal.Generator.Implementation private Assembly LocalLoadAssembly(string baseName) { Assembly assembly = LoadAssembly(baseName, Directory.GetCurrentDirectory()); - if (assembly == null) - assembly = LoadAssembly(baseName, new Uri(Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase)).LocalPath); + if (assembly == null) { + var path = Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase); + assembly = LoadAssembly(baseName, path); + } return assembly; } -- 1.6.3.3
