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

Sharpmap and VS2010

Apr 21, 2011 at 12:42 PM

I am using Sharpmap with VS 2010, but seem to be having a lot of trouble. The map works fine. I then create an rdlc report - when I try and link the dataset to the report I get the following error: "Could not load file or assembly 'ProjNet',Version=1.0.2794.16965, Culture=neutral,Public Token = a1f5bdcd9c6f5740 or one of its dependencies. The system cannot find the file specified." I don't understand this as what has a file used by SharpMap got to do with the RDLC dataset. I recreated the app without SharpMap, and everything works fine when I try to link the dataset. As soon as I add SharpMap I get the error. I took dll's out 1 at a time and it seems that the SharpMap.dll file is causing the problem.  Can anybody help?


Apr 21, 2011 at 2:55 PM

Dont worry - I have found a solution - I see on the web other people are experiencing the same problem (not using SharpMap) - it seems that you have to rename the bin folder to something else - add your datasource and then rename your bin again - apparently  Microsoft is working on this problem.

Apr 22, 2011 at 1:57 PM

I had a similar (though different) runtime System.BadImageFormatException for assembly "SharpMap" when trying to run DemoWinForm.VS2010 project.  Here's what I did to get SharpMap to build and run in VS2010:

  1. Change these project properties to target .NET Framework 3.5 - DemoWinForm.VS2010, SharpMap.VS2010, SharpMap.UI.VS2010
  2. Change SharpMap.VS2010 platform target to "Any CPU" and verify the others are set accordingly.  Double check the project references are happy (no warning icons).
  3. Build and run


- Dustin

Apr 22, 2011 at 3:11 PM

try set target to x86 or x64 (according to your processor).