This project has moved and is read-only. For the latest updates, please go here.

Broken solution, v2.0, problems with references to GeoAPI, GeoAPINoTFS

Topics: SharpMap v2.0
Mar 25, 2008 at 2:53 AM
I tried to download latest solution from google svn and as result clean checkout did not work, 2 projects are missing:

NTS/ ......................................
GeoAPI/ ................................ http://localhost:8081/GeoAPI/branches/v2.0

Projects missing:


What did I do wrong?

Some suggestions:
  1. Would be nice to have all projects in one svn.
  2. Please put and keep it up-to-date svn path to all required repositories / paths on HOWTO page.

Mar 25, 2008 at 8:05 AM
Your location for NTS is off. Try this one:

You might find the existing HOWTO (Building SharpMap v2.0) helpful. It looks like everything there is current.
Mar 25, 2008 at 7:30 PM
Edited Mar 25, 2008 at 7:34 PM
I installed VS2008, added NTS from branches/v2.0, but there are still errors with references :(. .

I'm wondering why there are some projects referencing GeoAPI.dll from ExternalReferences and some other as project GeiAPINoTFS in solution ??. It looks like I did a clean checkout of all sources listed in HOWTO but they contain the following references:

------GeoAPINoTFS - this one is by project
------GeoAPI - from NTS\ExternalReferences\Debug_Net20\GeoAPI.dll
------GeoAPI - from NTS\ExternalReferences\Debug_Net20\GeoAPI.dll


D:\src\SharpMap\NTS\NetTopologySuite\Index\Chain\MonotoneChain.cs(228,34): error CS0305: Using the generic type 'GeoAPI.DataStructures.Pair<TItem>' requires '1' type arguments
d:\src\SharpMap\NTS\ExternalReferences\Debug_Net20\GeoAPI.dll: (Related file)
D:\src\SharpMap\NTS\NetTopologySuite\Geometries\GeometryFactory.cs(78,17): error CS0246: The type or namespace name 'IWktGeometryEncoder' could not be found (are you missing a using directive or an assembly reference?)
D:\src\SharpMap\NTS\NetTopologySuite\Geometries\GeometryFactory.cs(79,17): error CS0246: The type or namespace name 'IWktGeometryDecoder' could not be found (are you missing a using directive or an assembly reference?)
D:\src\SharpMap\NTS\NetTopologySuite\Geometries\GeometryFactory.cs(80,17): error CS0246: The type or namespace name 'IWkbEncoder' could not be found (are you missing a using directive or an assembly reference?)

After I changed all projects referencing GeoAPI.dll from externals to use GeoAPINoTFS - I got more errors ... it sounds like a bug in VS2008 :). Compiler is not able to find correct GeoAPI.dll anymore and gives 2364 errors! It seems to be really a bad practice to make project names different from assembly names in VS2008.

I tried to reference GeoAPI.dll (NoTFS one) by specifying path to the dll and then by making NetTopologySuite project depend on GeoAPINoTFS, then I get an error in ShapeFileProvider.cs:

ICoordinateSequence coordinates = _geoFactory.CoordinateSequenceFactory.Create(2); // << overloaded function Create(int) is not found?

How to solve this one? Looks like someone forgot to commit something?


It will really help a lot if all sources will be put into one svn reporitory, even if they are from different CodePlex projects, e.g.:


You can always release them separately if some other projects use them:

---SharpMap-2.0/ - copy of trunk with all correct versions of dependent libraries

Advantages are:

  • All sources can be viewed and debugged in one solution with a clean checkout.
  • Will be easier to automate build in the future (I do hope SharpMap will have some good items from CI implemented soon ;)).
  • Projects like NTS, etc. can be easily grouped using folders in VS solution and unloaded / loaded: Unload Project which is saved in user local settings and which is a useful feature when you have big source code tree.
Mar 25, 2008 at 10:29 PM
yes, it should be possible to build everything after a single checkout, but I don't think this should be accomplished by copying all code of the dependencies into a single repository. If this was a general practice copies of the same code would be all over the place.

In V1 the problem is solved by adding compiled versions of the dependencies to the repository. For V2 this is not practical because development is going on in all projects at the same time. In the Java world they use Ant and Maven to automatically download the source of dependencies. Hopefully we can find such a solution for .net as well. If not I think we should write our own scripting to retrieve the dependency sources.
Mar 25, 2008 at 11:16 PM
Hi gvd, at the moment v2 is still a bit bumpy and you won't see a rendered map just yet.. to get around the multitude of errors you are experiencing change the geoapi refs to the project GeoAPINoTFS and edit the project files (unload project then right click and edit) - set UseProjectReferences = true. this is not a complete solution - but it will reduce the errors to a handlful - you may still need to add stubs for a couple of interfaces... Drop by on the irc (see the project home page for details) on wednesdays around 8 pm (UTC) for the dev chat (and quite a lot of us are on during working hours) and we'll give you a leg up where we can... jd
Mar 26, 2008 at 12:19 AM
Edited Mar 26, 2008 at 12:24 AM
Hi all, thanks for your suggestions, I will try. I'm wondering maybe something is wrong with my VS installation - will find it out very soon.

JohnDiss: my goal is not to get a nice map for now (it can be done with 0.9 and I tried it already) but at least to "feel" on which stage v2.0 is, put hands on a source code, write some tests and experiment with it a little.

I guess a main problem with dependencies is as you say because all projects are being changed simultaneously. Ant does not help much with dependencies in Java (or can easily get complicated), Maven is a nice program indeed - would be nice to check status of the Apache NMaven:,, I'm not sure if it is already usable.

If all geo-related projects will be in Subversion - dependencies between repositories can be established using externals property, see more details here: Directories in existing repository can be set to automatically get all data from external repository. IMHO one more reason to use Subversion for all geo-related .net projects, it is really very good tool and is already de-facto standard in OSS world.
Mar 26, 2008 at 1:36 AM
Edited Mar 26, 2008 at 8:04 AM
I tried nmaven a while back, then it crashed on me. It seems to be an active project, so it is probably worth another try.

If we can solve it by simply setting the externals property that would be an even better solution. Good idea.
Mar 31, 2008 at 10:01 AM

Check out the latest version of that document:

It includes a very pertinent note for this discussion: "You should seriously consider using explicit revision numbers in all of your externals definitions. Doing so means that you get to decide when to pull down a different snapshot of external information, and exactly which snapshot to pull. (...) this could be the difference between a successful and a failed build of an older snapshot of your complex codebase."