I have an issue I've recently noticed in visual studio (2015 Enterprise) where when I'm working on a View and I format a document using the "Format Document" functionality either through the keyboard shortcut or the edit menu, that visual studio will add in one or more External Source Directives throughout the document e.g.:
#End ExternalSource
#ExternalSource ("C:\ProjectLocation\CurrentView.vbhtml",12)
The End statement also comes before the start statement, even if there isn't another start above it. The number is not usually the same, and reading up it's a line number.
I assume this has something to do with having code in the View (using Razor), but is there a way to prevent this from happening when I'm formatting a View, as it's frustrating and it doesn't even format the document correctly!