This project is read-only.

Build error for DotSpatial

Dec 13, 2010 at 5:36 PM

Just tried to build DotSpatial last source  (Win XP, Visual Studio 2010 C#, 4.0 target framework) and have these errors:


The name 'ShapeEditorResources' does not exist in the current context C:\mapwindow6_561673f3b96a\MapWindow6Orlando\MapWindow\Plugins\MwShapeEditor\ShapeEditorToolStrip.cs 122 40 MwShapeEditor

The type or namespace name 'Geometries' does not exist in the namespace 'DotSpatial' (are you missing an assembly reference?) 

There is also references to DotSpatial.Designer in MapWindow6 project but Designer.dll could not be found.

 

Also it is evident that when programatically added layers and groups in MaWindow6 project could not be opened with any other MW or DotSpatial MapDemo
application.

I could only opened this map file with my MapWindow6 application but dynamic visibility for that layer could not be set.

I am looking forward if someone could show me what is wrong with my code for adding layers and groups.

Regards, Vojko

 

Dec 13, 2010 at 10:07 PM

You should not be using source code references that have "MapWindow6Orlando" in the path name if you are working with DotSpatial.  The reference above makes me think you are using source code from the MapWindow6 site maybe?  If so, please use the source code from DotSpatial instead if at all possible, as no bug fixes or future source code work are planned on the deprecated code from MapWindow 6.  The latest Click-once in MapWindow6 is not built from the source code in the MapWindow6 site, but rather from DotSpatial.   I suppose someone might also have committed something breaking in the DotSpatial source code repository though.  I will make sure that it can be built later tonight.  Also, as Mark discovered, when you pull from the repository, be sure you "Update" as well.  If you don't update, you may be working with folders or files that no longer exist in the modern version, or have been refactored into completely different classes.

Ted

 

Dec 15, 2010 at 3:39 PM
Shade!
I like to build new aplication like MW6 is from DotSpatial source code.
I tried to down load source using TortoiseHg but URL address for DotSpatial is for me unknown. URL "https://hg01.codeplex.com/DotSpatial" is not coorrect for my connection.
Can you give me exact address.
I succesfuly build your latest DotSpatial source version on Win XP 32bit with FW 4.0 and VS 2010 C#. But DemoMap program fails soon when tried to open ordinary shape file.
Please see the message.
************** Exception Text **************
System.ApplicationException: The specified file type is not supported.
at DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler) in C:\DotSpatial_0b0ce23a5a2e\DotSpatial.Data\DotSpatial.Data\DataManager.cs:line 427
at DotSpatial.Data.Forms.DataManagerExt.OpenFile(IDataManager self) in C:\DotSpatial_0b0ce23a5a2e\DotSpatial.Data\DotSpatial.Data.Forms\DataManagerExt.cs:line 106
at DotSpatial.Controls.Map.AddLayer() in C:\DotSpatial_0b0ce23a5a2e\DotSpatial.Controls\DotSpatial.Controls\Map.cs:line 630
at DotSpatial.Controls.Map.DotSpatial.Controls.IBasicMap.AddLayer() in C:\DotSpatial_0b0ce23a5a2e\DotSpatial.Controls\DotSpatial.Controls\Map.cs:line 613
at DotSpatial.Controls.SpatialToolStrip.cmdAddData_Click(Object sender, EventArgs e) in C:\DotSpatial_0b0ce23a5a2e\DotSpatial.Controls\DotSpatial.Controls\SpatialToolStrip.cs:line 481
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
Regards, Vojko
Dec 15, 2010 at 5:14 PM

I'm afraid I have no idea why the link you posted would not work in TortoiseHg.  https://hg01.codeplex.com/DotSpatial is the exact URL that I pasted into the TortoiseHG configuration setup dialog and it worked fine for me.  You will not be able to push changes back on that link unless you are a developer, but anyone should be able to pull the source down to their own desktop.  Also, how are you able to successfully build from source if you can't get the connection to work?

I'm also not sure why a shapefile would show up as an unsupported file type.  Are you passing in the .shp file?  Maybe there are some foreign language settings on your computer that might be fiddling with the program?  I'm not sure.  Please post that as an issue and you can update the ordinary shapefile that is giving you trouble (probably zipped so that you get the .shp, .shx and .dbf files at least.).  That way I can try it out on my end and see if there is an unexpected formatting issue.  For instance, we don't support Multi-patch shapefiles if that is the shapefile type.  Only point, multipoint, line and polygon shapefiles.  Other than that, I would have a much better time guessing if I could reproduce the exception.

Ted

 

 

Dec 15, 2010 at 6:04 PM

Vojko, my hope is that many people will build apps like MW6 or DemoMap using DotSpatial without needing to recompile DotSpatial but rather by just linking to/referencing the precompiled DLL assemblies. Is that an option for you? - Dan

*Sent from my Droid*

On Dec 15, 2010 10:14 AM, "shade1974" <notifications@codeplex.com> wrote:
> From: shade1974
>
> I'm afraid I have no idea why the link you posted would not work in TortoiseHg. https://hg01.codeplex.com/DotSpatial is the exact URL that I pasted into the TortoiseHG configuration setup dialog and it worked fine for me. You will not be able to push changes back on that link unless you are a developer, but anyone should be able to pull the source down to their own desktop. Also, how are you able to successfully build from source if you can't get the connection to work?I'm also not sure why a shapefile would show up as an unsupported file type. Are you passing in the .shp file? Maybe there are some foreign language settings on your computer that might be fiddling with the program? I'm not sure. Please post that as an issue and you can update the ordinary shapefile that is giving you trouble (probably zipped so that you get the .shp, .shx and .dbf files at least.). That way I can try it out on my end and see if there is an unexpected formatting issue. For instance, we don't support Multi-patch shapefiles if that is the shapefile type. Only point, multipoint, line and polygon shapefiles. Other than that, I would have a much better time guessing if I could reproduce the exception.Ted
>
>
Dec 16, 2010 at 3:02 PM
Dan
Now I am just discovering all DotSpatial stuff, but my only goal is to build my own application using the precompiled DLL assemblies.
First want to know how DemoMap is build and than will go on with Developer's Corner_DotSpatial documentation.
Thanks for replay, Vojko
Dec 16, 2010 at 3:39 PM
Ted
I am sending you my line shape files in zip which works fine with my MW4 and MW6 applications. Please see why MapDemo DotSpatial can not open them.
The same problem arises with our image tif files.
(I downloaded your DotSpatial souce in zip file not from link in TortoiseHg.)

Regards, Vojko
Dec 17, 2010 at 3:07 PM
Ted
When doubleclick on line symbol or rightclick on legend item for "australia_roads" program MapDemo (DotSpatial) reports messages bellow.
All these actions in MW6 works fine, what is the reason for these mistakes in DotSpatial?
Regards, Vojko

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at DotSpatial.Symbology.Forms.DetailedLineSymbolControl.InitializeComponent() in C:\DotSpatial_6f492d0f0a18\DotSpatial.Symbology\DotSpatial.Symbology.Forms\DetailedLineSymbolControl.cs:line 518
at DotSpatial.Symbology.Forms.DetailedLineSymbolControl.Configure() in C:\DotSpatial_6f492d0f0a18\DotSpatial.Symbology\DotSpatial.Symbology.Forms\DetailedLineSymbolControl.cs:line 749
at DotSpatial.Symbology.Forms.DetailedLineSymbolControl..ctor() in C:\DotSpatial_6f492d0f0a18\DotSpatial.Symbology\DotSpatial.Symbology.Forms\DetailedLineSymbolControl.cs:line 716
at DotSpatial.Symbology.Forms.DetailedLineSymbolDialog.InitializeComponent() in C:\DotSpatial_6f492d0f0a18\DotSpatial.Symbology\DotSpatial.Symbology.Forms\DetailedLineSymbolDialog.cs:line 69
at DotSpatial.Symbology.Forms.DetailedLineSymbolDialog..ctor(ILineSymbolizer original) in C:\DotSpatial_6f492d0f0a18\DotSpatial.Symbology\DotSpatial.Symbology.Forms\DetailedLineSymbolDialog.cs:line 128
at DotSpatial.Controls.Legend.OnMouseDoubleClick(MouseEventArgs e) in C:\DotSpatial_6f492d0f0a18\DotSpatial.Controls\DotSpatial.Controls\Legend.cs:line 390
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
Dec 17, 2010 at 4:18 PM

Not sure.. exactly but we have been having some framework incompatibility issues back and forth in the designers.  Framework 3.5 likes to insert lines of code that fail in 4.0 and vice versa.  This looks like one of those cases because it is in the InitializeComponent.  I think in most cases this has to do with serialization failures.  It seems that when you set the localizable property to true, many attributes of a dialog are serialized to the resx file, not just the text.  When it tries to reconstruct the binary, many of those automatically generated lines of code in the designer will fail.  I'm tempted to shut down the entire "Localizable" process entirely for now.  It's just too much trouble when trying to support multiple frameworks.  The goal would be to have nicely built in language settings for each form or whatever, but we could look at serializing the text parts ourselves and handling that via the resx manually, rather than relying on the "Localizable" characteristic which is buggy as hell when switching frameworks.  I will make this a task in the issue tracker.

Ted