Previously (in VS2012) if there was an error in the edmx file the user could open the edmx with the xml editor and the problematic part would have squiggles showing they user where the error is. Now when displaying the edmx we are able to tell the location of the error (i.e. the line and the column) but as soon as we open the edmx in the xml editor the line/column numbers turn to -1 and therefore we no longer show squiggles.
Repro steps:
1. Create a valid edmx from the database
2. Open the edmx in the xml editor
3. Modify the edmx so that is no longer valid (e.g. change a name of a property so that is it invalid by adding a space in the middle)
4. Save and close
5. Open the edmx file in the designer and you will see that the error in the error pane has correct line and column
6. Open the edmx file with the xml editor and the line and the column # will turn to 1,1. There will be no squiggles showing the error location
, change the provider manifest token so that is not recognized etc.
Comments: Fixed with changeset #057fce6 YouHaveGotAnError ln:-2, col:-1 (fix for Designer: xml editor loses error line information and cannot point to the error) The code originally loaded edmx contents to an XDocument, saved it to string and loaded it again. This felt broken and in one of the refactorings serialization and deserialization was changed changed to use XNodeReader which is much faster since the document had already been parsed. However XNodeReader does not report lines and therefore the information about lines is being lost. It turned out that we could just directly read to the XDocument from the uri or string instead of doing some expensive hops just to have a uniform source.
Repro steps:
1. Create a valid edmx from the database
2. Open the edmx in the xml editor
3. Modify the edmx so that is no longer valid (e.g. change a name of a property so that is it invalid by adding a space in the middle)
4. Save and close
5. Open the edmx file in the designer and you will see that the error in the error pane has correct line and column
6. Open the edmx file with the xml editor and the line and the column # will turn to 1,1. There will be no squiggles showing the error location
, change the provider manifest token so that is not recognized etc.
Comments: Fixed with changeset #057fce6 YouHaveGotAnError ln:-2, col:-1 (fix for Designer: xml editor loses error line information and cannot point to the error) The code originally loaded edmx contents to an XDocument, saved it to string and loaded it again. This felt broken and in one of the refactorings serialization and deserialization was changed changed to use XNodeReader which is much faster since the document had already been parsed. However XNodeReader does not report lines and therefore the information about lines is being lost. It turned out that we could just directly read to the XDocument from the uri or string instead of doing some expensive hops just to have a uniform source.