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

Compile Steps and NuGet?

Topics: General Topics, SharpMap v0.9 / v1.x
Feb 6, 2012 at 6:09 AM


I think this may be a silly question, but I have been unable to find an answer anywhere...

What are the steps to compile SharpMap 0.9 from source, specifically the latest Trunk (Change Set 95837) or Tagged version “v0.9\2011-11-13”?

I am trying to get to a point where I can run the WinFormSamples project contained within the source.

I have been able to run the WinFormSamples from source for Tagged version “v0.9\2011-08-03” OK, but I have another problem with that version which I am hoping a later version will fix.

The tagged version (\v0.9\2011-11-13) and the latest Truck (Change Set 95837) I am unable to compile fully.

When trying to compile the Trunk in the latest Change Set (95837) I run into the following problems:

  • I need to modify the references of the SharpMap.VS2010 project to point to the ExternalReferences (for BruTile & DotSpatial.Projections). I also modify the SharpMap.VS2010 build events to remove nuget commands which produce errors.
  • I try modifying the references for SharpMap.Extentsions.VS2010 in a similar way but then get errors such as:

Error    8    The type or namespace name 'PrecisionModel' could not be found (are you missing a using directive or an assembly reference?) ... \Tags\v0.9\2011-11-13\SharpMap.Extensions\Data\Providers\NtsProvider.cs    Line 109    Column 40    SharpMap.Extensions.VS2010

Should I be using NuGet somehow? If so how? Or is there something else I should be doing?

Any help would be much appreciated.

Feb 6, 2012 at 7:48 AM

You need to get nuget working somehow, since it pulls the unresolved references you are getting.

These steps might help:

  1. Prepend ECHO to the custom pre-build step and watch the output during build.
  2. Look for the nuget command(s) in the build output.
  3. Examine what is wrong with e.g. paths.
  4. If nothing seems to be wrong with the paths, copy the nuget command and run in in cmd-shell.
  5. Please report full output

Maybe nuget is blocked as it was received from an internet download?

Hth FObermaier

Feb 6, 2012 at 8:22 AM

Thanks for the quick reply.

It turns out there is a known problem with NuGet when used with VS2010 Premium (the edition I am using). During NuGet install it thinks VS2010 is Ultimate edition and does not install correctly. There is a workaround so I now have NuGet installed correctly (I think).

Additionally I am working behind a web proxy which require authentication. It appears NuGet may have some problems with that.

I can see the build output from the NuGet.exe and the paths look correct, but still not working correctly (yet).

I will try building the source from home tonight using my home (non-proxy) internet connection to eliminate any possible proxy issues and will report back the results of your suggestions.

Feb 6, 2012 at 10:47 AM

imho you do not need to install nuget visual studio extension.

The nuget command line tool is within the solution folder. It seems to be a plain proxy issue.


Feb 6, 2012 at 12:03 PM

It appears our proxy is the reason I was unable to compile. I have just successfully compiled using a system NOT connected to a network which uses a proxy.

Also, I luckily happened to read you note about not needing to install NuGet just before I was about to install it in my test environment and indeed it does not need to be installed in order to successfuly compile!

Thanks for you help.

Feb 7, 2012 at 5:27 AM

Some follow up information...

It turns out that the version of the NuGet.exe which is included in the SharpMap source (change set 95837) is version 1.5.20830.9001. This version does have problems with web proxy server that require authentication (i.e. it partially works, but not enough to compile SharpMap).

The current version of NuGet.exe (1.6.21205.9031) works perfectly!

I have confirmed this by updating the NuGet.exe in my environment and was able to compile the source without any problem.

I suggest that it might be a good idea to update the version of NuGet.exe which is include with SharpMap in the various BuildTools directories to the latest version so that other people don't have this problem.

Feb 7, 2012 at 7:15 AM
Edited Feb 7, 2012 at 9:58 AM

Thanks for the information, I fixed it