compile v2.0

Topics: SharpMap v2.0
Apr 28, 2009 at 7:32 AM
when i compile sharpmap v 2.0 using vs 2005.  
"private readonly CollectionBase<IFormat> _formats = new CollectionBase<IFormat>((a, b) => !Equals(a, b));" 
will cause this error "invalid expressiong =>"

how to resolve it!!

Apr 28, 2009 at 11:21 AM
Hi snail_tao, I have changed all the lambda expressions to anonymous delegates and all vars to explicit types which should mean that most of the solution will build. However SharpMap.Presentation.Web.SharpLayers  is always net3.5 regardless of the configuration and will have to be removed from your solution. SharpMap.Demo.FormatConverter uses language features from vs 2008 and will also need to be removed from your solution. There may be a few others.. hth jd
Apr 29, 2009 at 10:04 AM
Edited Apr 29, 2009 at 10:05 AM
Can v2.0 be compiled using VS Express 2008 (which uses .net 3.5)


Apr 29, 2009 at 11:46 AM
Hi James, AFAIK it should open in vs 2008 express (I haven't tried it) but you may have to remove the web projects... hth jd
May 2, 2009 at 5:16 AM
when i build sharpmap project(VS 2005),there are some errors in

"sharpmap.ulities.sridutility.sridmapStrategy.cs" and

"sharpmap.ulities.sridutility.sridmapStrategyBase.cs" .

"key = new LongKey() { Authority = cs.Authority, Code = code };" cause
error——"shoul input ; and invalid expressiong "," "


"public ICoordinateSystemFactory CoordinateSystemFactory { get;
protected set; }" cause

error——"must declare main body , it is not marked abstract or extern"

the following has the same error:

public int Priority
protected set;

May 5, 2009 at 9:24 AM
If you can, use vs2008. Otherwise you will need to change every auto property (in the form

Type PropertyName {get;set;}


Type _propertyBackingField;
Type PropertyName
    get {return _propertyBackingField;}
    set {_propertyBackingField = value;}

hth jd