Mikhail Arkhipov (MSFT) wrote: If there is no service to verify that bp is valid (as it happens with txt files), VS will optimistically set the breakpoint, hoping for the best. This is standard behaviour of C+++ which is unable to verify bp location until application is run. Setting bp does not quarantee that it will get hit though. Do you get breakpoints hit in txt files?
Yes, if the included files are renamed from .cs to .txt, breakpoints can be set and they are hit.
One option is to rename our included C# "fragments" to .txt (or some other innocuous extension), but then we lose the syntax highlighting that we get when they are named with a .cs suffix.
When the included files have a .cs suffix, it seems that VS 2005 is attempting to compile them as plain C# files even though they are included from an aspx file (and errors are generated, as these files contain aspx directives). Is it the "language service" that is attempting to
compile these in order to gather the information required to verify the breakpoint is valid?
Thanks,
John.