Cannot drag and drop map box control with RC1

Topics: WinForms Controls
Mar 28, 2013 at 8:29 AM
While dragging and dropping MapBox control on windows form, getting this error:

Image

Thanks and regards,
Abhi
Coordinator
Mar 28, 2013 at 8:33 AM
Hi, you need to add the assemblyredirect of GeoAPI to your config.

You config-file should look something like
<?xml version="1.0"?>
<configuration>
<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="GeoAPI" publicKeyToken="a1a0da7def465678" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.7.1.0" newVersion="1.7.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Mar 28, 2013 at 10:03 AM
I have added this in my config file app.config (windows form application), but still it is not working.
Coordinator
Mar 28, 2013 at 10:13 AM
  • Does GeoAPI.dll exist in your output directory (with verison 1.7.1)?
  • Does yourapplicationname.exe.config exist in your output directory and include the above configuration?
Mar 28, 2013 at 7:42 PM
I got the same error when drag MapBox or MapImage control on the form!
All libraries are located next to the executable file and app.config fixed

Vladimir
Coordinator
Mar 28, 2013 at 9:57 PM
Hi,

I can verify that the Visual Studio designer doesn't work for MapBox. The app.config settings doesn't seem to be used in VisualStudio Designer Mode.

You can get around it by adding the assemblyRedirect statement to your visual studio config file (devenv.exe.config) or to your Machine.config file.

However, this is not a good solution.

We will have to discuss how we should handle this for the release of 1.0.
Either we need to make sure that GeoAPI/NTS is not loaded in designer mode or we'll have to force a new release of NTS and that way get around the AssemblyRedirect of GeoAPI.
Coordinator
Mar 28, 2013 at 10:00 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 4, 2013 at 5:55 PM
The fix for this issue is included in SharpMap 1.0 RC2 just released under downloads section.

Best Regards,
Peter