Windows 7 Move

Jun 17, 2010 at 4:15 PM
Hi
I am in the process of moving my SharpMap project onto Windows 7.
I've installed the project that was working on the old computer, but it now can't find the Postgis and SharpMap files.
The reference paths have been changed to the new settings.
What else do I need to do??
Bob
Coordinator
Jun 18, 2010 at 9:56 AM
Hi Bob, do you have an exception message and stack trace? You shouldn't need to do anything special, just ensure that all the dependent assemblies are present in the bin folder or Global Assembly Cache (GAC) hth jd
Jun 18, 2010 at 6:39 PM
Hi John
I removed and reinstalled all of the SharpMap dependencies. They are also in the bin folder of the Visual 2008 project.
Below is the error message is you wouldn't mind having a look.
Bob

System.BadImageFormatException was unhandled

Message="Could not load file or assembly 'SharpMap.Extensions, Version=0.9.3256.17233, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."

Source="Data Graphics"

FileName="SharpMap.Extensions, Version=0.9.3256.17233, Culture=neutral, PublicKeyToken=null"

FusionLog="=== Pre-bind state information ===\r\nLOG: User = Bob-PC\\Bob\r\nLOG: DisplayName = SharpMap.Extensions, Version=0.9.3256.17233, Culture=neutral, PublicKeyToken=null\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Users/Bob/Documents/Visual Studio 2008/Projects/Data Graphics/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : Data Graphics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: Using application configuration file: C:\\Users\\Bob\\Documents\\Visual Studio 2008\\Projects\\Data Graphics\\bin\\Debug\\Data Graphics.vshost.exe.config\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\nLOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).\r\nLOG: Attempting download of new URL file:///C:/Users/Bob/Documents/Visual Studio 2008/Projects/Data Graphics/bin/Debug/SharpMap.Extensions.DLL.\r\nERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.\r\n"

StackTrace:

at Demo.frmGraphics..ctor()

at Demo.Program.Main() in C:\Users\Bob\Documents\Visual Studio 2008\Projects\Data Graphics\Program.cs:line 18

at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

InnerException:


From: [email removed]
Sent: Friday, June 18, 2010 1:56 AM
To: [email removed]
Subject: Re: Windows 7 Move [SharpMap:216387]

From: johndiss

Hi Bob, do you have an exception message and stack trace? You shouldn't need to do anything special, just ensure that all the dependent assemblies are present in the bin folder or Global Assembly Cache (GAC) hth jd
Jun 19, 2010 at 8:27 AM

If your application is set to compile for x64 or "Any CPU" it won't work because ShapMap dlls are 32 bit only. This could be one of the reasons you are seeing this error.

If this is the case, change your application's build configuration to x86.

 

HTH