Custom VB.net project, CPU target

Topics: General
Jun 29, 2010 at 8:22 AM

Heya Radioman.

I succeeded in reducing your windowsform app to almost nothing, just basics. So i thought i could start building mine.
I have my own vb app that's working, so i imported your modules and added a gmapcontrol to the layout.
It compiles but it fails to start with message

"An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'GMap.NET.WindowsForms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b85b9027b614afef' or one of its dependencies. An attempt was made to load a program with an incorrect format."

 

Now i also have difficulties nailing WHERE this appens.

Right now i have only lines in the constructor, i added some IFs and Try/Catch but the exception is thrown the same.

   at Server.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
   at Server.My.MyProject.MyForms.get_ServerMain()
   at Server.My.MyApplication.OnCreateMainForm() in C:\Users\Erupter\Documents\Visual Studio 2010\Projects\Swarm Deployment 0.1\ServerSide\My Project\Application.Designer.vb:line 35
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   at Server.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

 

Since i added your source to my project, i can see that the Gmap.NET.WindowsForms is marked with a white cross on blue background.
While the Gmap.NET is not.

I can't seem to find how to fix this as i cannot even understand where the exception is thrown. Right now the first call to Gmap.net.windowsforms is wrapped in a try/catch and still the exception is thrown...
I can give the source if you want to have a look.

Jun 29, 2010 at 8:30 AM

you can't set Any CPU target while using sqlite cache, as documentation says, set target to x86 so it works anywhere ;}

Jun 29, 2010 at 9:26 AM

I used sqlite in my app, and it works.

Must be something in your implementation...

Anyway thanks, it was that. How did you understand that???

Jun 29, 2010 at 9:37 AM

i guess my telepathic abilities are great too ;]

cheers erupter!

Sep 20, 2012 at 8:16 PM

It worked! Thank you!

Sep 20, 2012 at 8:29 PM

p.s. from version 1.7 you can use any cpu target you want, works