itinero / routing

The routing core of itinero.
Apache License 2.0
221 stars 70 forks source link

Beginning with Itinero C# : Unable to load 'Itinero.RouterDB' #264

Open EmmanuelLYON opened 5 years ago

EmmanuelLYON commented 5 years ago

Hello everyone ! I am new to Itinero and OsmSharp. I use VS2017 (C#) and I created a new project with three references :

For the code source, I used the following one : https://docs.itinero.tech/docs/itinero/index.html

At the compile phase : all thing is right. But at the execution time, I receive the error message (in french) :

_'Itinero.exe' (CLR v4.0.30319: DefaultDomain) : Chargé 'C:\windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0_b77a5c561934e089\mscorlib.dll'. Impossible de trouver ou d'ouvrir le fichier PDB. 'Itinero.exe' (CLR v4.0.30319: DefaultDomain) : Chargé 'D:\Users\emmanuel.guignier\Documents\Visual Studio 2017\Projects\Itinero\Itinero\bin\Debug\Itinero.exe'. Les symboles ont été chargés. Une exception non gérée du type 'System.TypeLoadException' s'est produite dans Module inconnu. Impossible de charger le type 'Itinero.RouterDb' à partir de l'assembly 'Itinero, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

=> Unable to load the Itinero.RouterDb !!

Is there anybody to help me to solve the problem ... I would like to use Itinero :)

Best regards. Emmanuel

EmmanuelLYON commented 5 years ago

Hello,

The problem is relative to the initialisation of the RouterDb().

The simplest code is the following : using Itinero; using Itinero.IO.Osm; using Itinero.Osm.Vehicles; namespace ItineroProject { class Program { static void Main(string[] args) { var routerDb = new RouterDb(); } } }

Compiling : OK Execution : Une exception non gérée du type 'System.TypeLoadException' s'est produite dans Module inconnu. Impossible de charger le type 'Itinero.RouterDb' à partir de l'assembly 'Itinero, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Please help !! I tried the dll for .NET 4.5 but nothing change ! Thanks. Emmanuel