in my solution:
(i have multiple solutions with different web projects but the same class library)
one of the files in the class project (utilities.cs) - all of a sudden won't compile into the .dll
i had made a change to this file, but the change wouldn't show on the website. so i put a breakpoint in the .cs file, and tried running it... breakpoint didn't get hit! eventually i put a breakpoint in the .aspx file that called the function. then i stepped the debugger one line on, so it would step into the .cs file, except i got the error:
"This source file has changed. It no longer matches the version of the file used to build the application being debugged."
so the code in utilities.cs is not being updated into the dll. which is weird, because code in my other .cs files IS being updated (i tried changing a few lines) and IS able to catch the debug.
any ideas how to fix this? or even what the cause of the problem is??
Try:
Right click on Solution in Solution Explorer -> Properties -> Configuration Properties -> Make sure Build checkbox is checked for your class library.
When You adding new references to Web project You must choose "Projects" tab:
Projects lists all reusable components created from local projects.
Always rebuild all projects in Release and Debug mode.
You need to find out why the DLL will not build:
Fix the errors and try building again.
The dll that you are trying to debug is from an older version of your code that did compile OK and the debugger pickes that up and is trying to debug against that - it is complaining because the code and the dll no longer match.
Try doing a Build -> Clean on the solution and then rebuilding to see the errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With