"The source file is different...." message in Visual Studio 2008 is result of debugging x32 apps on x64 Windows

I'm writing ADO.NET provider. For debugging I use class DbProviderFactories.GetFactory method. This method constructs my inherited DbProviderFactory class that i use for create DbConnection inheritor of my provider and etc.. When I try set breakpoint in my provider code I sow it isn't work - execution doesn't stopped. When I throw exception in my code VS2008 showed message box describing "The source file is different...". Debugging works good before day before tomorrow, but it isn't now. Does somebody know "magic checkbox" for resolve my trouble? Any idea?

Update1: Provider assembly is adding to GAC on post build step. Compiler didn't find errors in solution. Update2: Source code of static referenced assemblies is "different" too.

Update3 and last: I've found source of trouble. I use x64 version of Windows 7. My application use some COM servers (usual native x32 COM Servers) that can't be loaded in x64 context. So I decided run it as x32 app using WOW so I set platform target as x32. But debugger started show messages like "The source file is different....". I don't understand why it works as works. I will write to microsoft support team.


You can tell it to ignore the problem by going to Tools, Options, going to the Debugger section, and unchecking Require source files to exactly match the original version.

To solve the problem, check your assembly locations. Your program is probably referencing a different version of your provider DLL than the one in the debugger. Try removing the reference and adding a Project Reference.

EDIT: Try removing the provider from the GAC (manually or at the beginning of the post-build step)

“The source file is different…” message in Visual Studio 2008 is result of debugging x32 apps on x64 Windows. See new thread

If you are using Visual Studio Express, you probably don't have Build->Clean Solution.

Try to remove the pdb debug file located in C:\Users\yourusername\Documents\Visual Studio 2010\Projects\yourproject\yournamespace\bin\Debug.

If you are afraid to delete the file completely, i would move it to a temporary folder.

Then try Debug->Start Debugging(F5)

Happy coding!

Need Your Help

Best format to pack data for correlation determination?

python csv scipy correlation

I'm using a Java program to extract some data points, and am planning on using scipy to determine the correlation coefficients. I plan on extracting the data into a csv-style file. How should I for...