ERROR in VS 2010 Using SharpMap and Crystal Reps for VS 2010
I have a VS2010 app that uses Sharp Map and Crystal Reps for VS 2010 – it was previously in VS 2005 with the Crystal Reps for VS 2005 version – Everything was working absolutely fine with this scenario, but now I have a continual error.
If I start the app and run a crystal report – it works
If I then start the Map (SharpMap) and try to load the aerial photo – I get the following error
- The type initializer for ‘OSGEO.Gdal,Gdal.Pinvoke’ threw an exception – it happens on this line of code OSGEO.Gdal.Gdal.AllRegister() in SharpMap.Extensions\Layers\GdalRasterlayer.cs code
However, if I restart my machine and go to the Map first and load the aerial photo, everything is OK
If I then go and try and run a Crystal Report I get the following error
- The type initializer for ‘CrystalDecision.CrystalReports.Engine.CRPE’ threw an exception – this happens on my line of code RepDoc.load(ReportPath)
I have tried the above about 4 times and each time I would get the same result – I would have to reboot my machine to move between the 2 errors – this leads me to believe that these 2 pieces of software are somehow interfering with each other
Does anyone know how to resolve this?