Help me,I can't load and compile SharpMap V.2 Project

Topics: SharpMap Project, SharpMap v2.0
Jul 16, 2009 at 9:57 AM

Help me,I get SharpMap V2 Project by TortoiseSVN from http://sharpmapv2.googlecode.com/svn/trunk

but i can't comile project (Error when compile)because i can't load all project in SharpMap V.2 solution and i always recieved

Error    2682    The imported project "C:\Microsoft.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.    C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpMap.Data.Providers\DbProviderBase\SharpMap.Data.Providers.Db.csproj  and etc.

Coordinator
Jul 16, 2009 at 10:15 AM

Hi coinguon86 it sounds like you have a broken environment variable the actual import statement is: 

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Are you using vs2008? If not it may be that vs2005 expects the parth to be:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

edit the relevant csproj file.. hth jd

Jul 18, 2009 at 3:34 AM

Hi joindiss,Thank you for your answer for me, I'm using vs2005, but when I load up vs2005 solution of the many project can not load and when I compile the encounter very many errors, I met a lot of errors as:

- Unable to read the project file "file name" + "file path" .The imported project  "C:\Microsoft.CSharp.target" was not found.Comfirm that the path in the <Import> declaration is correct and that  the file exist on disk.

- Error    77    The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)    C:\Documents and Settings\Administrator\Desktop\SharpMap\NTS\NetTopologySuite\Index\AbstractNode.cs    71    26    NetTopologySuite

- Error    435    Metadata file 'C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpMap\bin\Debug_Net20\SharpMap.dll' could not be found    SharpMap.Rendering.Gdi

 

I have changed "MSBuildToolsPath" by "MSBuildBinPath" but an error appears as follows

- Error    449    The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration='Debug_Net20'  Platform='AnyCPU'    SharpMap

 

you use this project as normal ? I think can do the environment of my computer do not match ?

 

Coordinator
Jul 18, 2009 at 11:06 AM
it builds and runs fine with vs2008...
Jul 20, 2009 at 1:14 PM

Hi,I'm using vs2008 but I met a lot of errors as:

- Error    5899    Metadata file 'C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpLayers\SharpMap.Presentation.Web.SharpLayers\bin\Debug_Net20\SharpMap.Presentation.Web.SharpLayers.dll' could not be found    SharpMap.Demo.SharpLayers

- Error    5989    Unable to copy file "App.config" to "bin\Debug\SharpMap.Data.Providers.Db.Test.dll.config". Could not find file 'App.config'.    SharpMap.Data.Providers.Db.Test

- Error    5993    The command "xcopy /Y C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpMap.Data.Providers\SharpMap.Data.Providers.SpatialLite2\SQLite\lib*.dll C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpMap.Data.Providers\SharpMap.Data.Providers.SpatialLite2\bin\Debug_Net20\" exited with code 4.    SharpMap.Data.Providers.SpatiaLite2

- Error    5997    The command ""C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpLayers\SharpMap.Presentation.Web.SharpLayers\OpenLayers\Build\build.py"" exited with code 1.    C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpLayers\SharpMap.Presentation.Web.SharpLayers\SharpMap.Presentation.Web.SharpLayers.csproj    893    5    SharpMap.Presentation.Web.SharpLayers

Help me !

Coordinator
Jul 20, 2009 at 1:28 PM

For the error #5997 either install python 2.6 or disable the SharpLayers projects. For #5989 get latest as I have added a missing file hth jd

Jul 22, 2009 at 8:32 AM
Edited Jul 22, 2009 at 8:33 AM

Hi,I built project with vs2008 but I met a error as:

Error    6345    The command "xcopy /Y C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpMap.Data.Providers\SharpMap.Data.Providers.SpatialLite2\SQLite\lib*.dll C:\Documents and Settings\Administrator\Desktop\SharpMap\SharpMap.Data.Providers\SharpMap.Data.Providers.SpatialLite2\bin\Debug_Net20\" exited with code 4.    SharpMap.Data.Providers.SpatiaLite2

Help me !

Coordinator
Jul 22, 2009 at 9:20 AM

Hi coinguon86,

in the Build Events tab of the SpatiaLite2 Provider's options dialog set the command in post build event from

xcopy /Y $(ProjectDir)SQLite\lib*.dll $(TargetDir)

to

xcopy /Y "$(ProjectDir)SQLite\lib*.dll" $(TargetDir)

(look for double quotes in second line).

Hth
FObermaier

Jul 23, 2009 at 1:19 PM
Edited Jul 23, 2009 at 3:09 PM

Hi Fobermaier !

I have built successfully

Thanks !

Coordinator
Jul 23, 2009 at 3:56 PM

I have updated the project in svn..

Aug 5, 2009 at 4:54 PM

Hi JD, im trying to compile with any luck, the sharpmap version2 from the trunk in the google code website. I´m trying with the full version of  vb2005 and and also with  vb2008 express... I meet a lot of errors! Should i download the complete vb2008 and try with it? Any future errors i might find?  When are u guys uploading v2 to stable version?!?!?!? :S

Thx in advance

Mr.Musso

Coordinator
Aug 5, 2009 at 5:13 PM

err.. its written in c# not vb.. You will likely need vs2008 professional or higher to build.. You will probably find lots of errors if you go to far off the beaten track..

Sep 18, 2009 at 1:32 PM
Edited Sep 18, 2009 at 1:34 PM

Instead of adding quotes to the Build event you also could remove spaces from your project dir.