Open dazinator opened 8 years ago
I have just found out how to reproduce this issue easily.
Simply remove the xml declaration from the top of the file contents, so in the .vstemplate
file remove this line:
<?xml version="1.0" encoding="utf-8"?>
You will now start getting the above exception in the FormatBuffer call..
I have attempted to use
WPFDesigner_XML
sample to create my own editor.Edit as per below comment:
However for some reason I can't fathom, I have noticed that when the xml file does not have an xml declaration at the top, then the method that Format's the buffer, and specifically the call toReformatSpan
throw's an exceptionValue does not fall within the expected range
How do we work around the xml file not having an xml declaration?