Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
321 views
in Technique[技术] by (71.8m points)

c# - Getting "The source file is different from when the module was built."

I'm trying to debug an ASP.Net web project that I received. I modified a class in the "Apps_LocalResources" folder.

When I debug and the code tries to step into that class, I get

"The source file is different from when the module was built.".

I rebuilt the solution and didn't get any change. I even published it to a different location and the pdb and dll in the bin folder didn't change so I didn't copy them over.

Ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you are attaching to asp.net worker process, then kill the process, start up the website and reattach the debugger.

If you are using the built in web server, then make sure you stop the project and the WebDev.WebServer.Exe associated with it.

If all else fails, right click on the breakpoint and choose locations. Then enable the "allow code to be different..." check box at the bottom.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...