Error when drag the map to WinForm

Topics: Help, Windows Forms
May 24, 2013 at 10:09 PM
Hi,
When i want to drag the map component to the form show this error and fail,
"Failed to Create Component 'GmapControl'. The error message follows: 'System.MissingMethodException:Method not found: 'System.String System.Data.SQLite.SQLiteConnection.get_SQLiteSourceId()'.
at GMap.Net.CacheProviders.SQLitePureImageCache.Ping()
at GMap.Net.GMaps.SQLitePing()
at GMap.Net.WindowsForms.GMapControl.cctor()'
".
I before added the Dlls to my refrence,and i try all of .Net Versions!, so what is wrong?

Thanks for your help.
May 24, 2013 at 10:25 PM
And you can see error picture:
Image

link:
TEXT
Coordinator
May 25, 2013 at 6:17 AM
ignore the error
Aug 19, 2013 at 11:09 AM
I have the same problem!
What do you mean by ignoring it? If I click on the OK button, then it won't be added to my form. What should I do?
Coordinator
Aug 19, 2013 at 11:58 AM
it's buggy designer, you may add some panel, and the map control manualy
Aug 19, 2013 at 1:03 PM
Edited Aug 19, 2013 at 1:08 PM
I closed visual studio and opened it again and the problem was solved!
But now I have another problem!

What's wrong with this piece of code?
//*************************************************************
private void Form1_Load(object sender, EventArgs e)
    {
        // Initialize map:

        gmap.MapProvider = GMap.NET.MapProviders.YahooMapProvider.Instance;
        GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerOnly;
        gmap.Position = new PointLatLng(32.641218, 51.67576);
    }
//************************************************************
while gmap is my instance of GMapControl component.

When I run the program, it gives this error:
A first chance exception of type 'System.TypeInitializationException' occurred in usdllofgmap.net.exe

Additional information: The type initializer for 'GMap.NET.WindowsForms.GMapControl' threw an exception.

And it refers to this line in Designer.cs code:
this.gmap = new GMap.NET.WindowsForms.GMapControl();

Would you please help me?
Coordinator
Aug 19, 2013 at 1:09 PM
can you check inner exception?
Aug 19, 2013 at 1:10 PM
Edited Aug 19, 2013 at 1:14 PM
How should I do this?
Aug 19, 2013 at 1:19 PM
I enabled first chance exceptions. Now it gives this error:
A first chance exception of type 'System.BadImageFormatException' occurred in GMap.NET.Core.dll

Additional information: Could not load file or assembly 'System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. An attempt was made to load a program with an incorrect format.

what dose it mean? I've added System.Data,SQLite.dll into the project's references and add using System.Data.SQLite, expression to my code too. And I copy System.Data.SQLite.dll from the source code directory which I was worked it before without any problem.
Coordinator
Aug 19, 2013 at 2:38 PM
you don't need to do that anymore
Aug 19, 2013 at 3:55 PM
So what's the problem with my program?!
I can't solve it :(
Coordinator
Aug 21, 2013 at 5:03 PM
remove System.Data,SQLite.dll from the references