System.InvalidOperationException when instanstiate Map

Sep 16, 2015 at 9:42 AM
I receive this exception

Exception thrown: 'System.InvalidOperationException' in GeoAPI.dll

Additional information: Cannot use GeometryServiceProvider without an assigned IGeometryServices class

The code that throws this excepction is

map=new SharpMap.Map(new Size(DEFAULT_MAP_SIZE_VALUE, DEFAULT_MAP_SIZE_VALUE));
Just when I create my map... So i don't if i have to set first something in order to remove this exception.
Coordinator
Sep 16, 2015 at 1:54 PM
place
GeoAPI.GeometryServiceProvider.Instance = NetTopologySuite.NtsGeometryServices.Instance;
right at the beginning of your application.