5

I use the x64 version of Windows 7. My application use some COM servers (usual native x86 COM Servers) that can't be loaded in x64 context. So I decided run it as a x86 application using WOW so I set platform target as x86.

But Visual Studio 2008 debugger started to show messages like "The source file is different...." for all source files when I try debug it. What is reason for this behaviour? This question was born there "The source file is different...." message in Visual Studio 2008 is result of debugging x32 apps on x64 Windows

Update: I cleaned solution, rebuilt solution, removed obj, bin and etc. folders, restarted computer, reinstalled Visual Studio... So, what else could be the problem?

Update2: If you create new Windows Application project and change target platform to x86 you will see this trouble. But if you delete Settings1.settings from project the trouble will be eliminated!!. Any Idea?

Update3: http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/bc297668-65b4-46e8-969e-c7a6340d33b6

4
  • Did you clean your project's output folders and checked the build log that the build really was successful? Commented Jan 6, 2010 at 17:16
  • I answered in description of question. Commented Jan 6, 2010 at 17:21
  • And if you switch back your target platform to x64, debugging works again? Commented Jan 6, 2010 at 17:33
  • Yes, but it fails by exception (library isn't fount, it's about loading x32 library to x64 context, I wrote about it). Commented Jan 8, 2010 at 11:38

3 Answers 3

4

The error message you are getting is unrelated to debugging a WOW64 bit application. It's even less of an issue here because Visual Studio runs a 32 bit process inside of WOW64. So instead of x64 -> x86 you are actually doing an x86 -> x86 debugging session.

What's going on here is that Visual Studio is reading the checksum for the source files out of the PDB and it does not match the checksum of the files you are using to debug the application. The most likely causes for this are

  • Out of date PDB's
  • Using the incorrect source files. This is more common than you think in branching scenarios where you could easily grab the wrong version of the file.

The way I typically debug through this is

  • Close VS and manually delete all of the binaries and binary directories
  • Restart VS and rebuild
  • Close VS
  • Restart VS and attach to the running project without opening the solution
  • Then manually open the files
Sign up to request clarification or add additional context in comments.

Comments

4

Windows 7 sets Windows Xp sp 3 compatibility mode for VS 2008 by default. Changing compatibility to Windows Vista SP2 mode have solved trouble.

Comments

1

You might also check the x86 build type. When you created it you may not of copied the settings from the default build and as such none of your code is building when you run your application.

Bring up the Solution Properties and check the Configuration Properties\Configuration page. Then make sure all of the projects are checked under Build for the Config/Platform combo you are using.

3 Comments

Indeed, projects being excluded from build in the current configuration seems a common mistake to me. However, a total clean of the solution (as the OP did) should make you notice that?
True. But he is ignoring the compiler errors/build messages he may not have seen this probable. Also if he was to tell it to explicitly build after a clean he also would not see this problem.
I haven't made x86 "build type", I have just changed Platform target on Build page of project properties from Any CPU to x64. It's all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.