I've spent every day this week trying to find information about this problem I'm encountering when trying to debug an ASP.NET application. I've looked in the source file is different from when the module was built and Getting “The source file is different from when the module was built.” for help with this and haven't gotten anywhere.
I have a solution containing one project with a DLL reference to a library produced from another project within a different solution that contains many different projects.
My web app uses the source code from the first project, so I'm attaching the debugger to it and running the web app with breakpoints set up in the code.
While using the app I try to step into code from the DLL that is referenced and it tells me that 'The source file is different from when the module was built.'
I've tried deleting the bin and obj folders from both solutions and rebuilding the dlls then removed and re-added the reference to the dll within the first project. I don't understand why it would tell me the source file is different from when the module was built when I JUST built it and added the reference.
I think there is something simple that I'm overlooking but i don't know what else to try. Has anyone else fixed a situation like this before?
Edit: I've just tried to attach the source code from the project that actually builds the DLL that I'm using, and even that does not line up correctly with where the debugger stops in my code. I can't seem to find a way to look up the location of the DLL that is being used by the debugger, but it certainly is not the one I'm building.
Edit 2: I've managed to find out that there was a copy of the old DLL in "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files" which I deleted, but every time I would run the application it would re-create that folder and file structure exactly how it was before. So I've made a batch file I run every time I compile my project that copies over the new DLL to the DNN bin folder in the meantime.