Open
Description
Current behavior
When an invalid XAML is encountered, it's not always easy to see where the error is.
Expected behavior
The source generator should generate #line
directives instead of "comments" that mention line numbers. We should make sure that the current way of generating source information as comments is accurate enough before moving to #line
right away.
That way, compile errors in generated code will easily map to XAML
For example:
using System;
class C
{
#line 11 "BlankPage1.xaml"
code producing error; // the error here will point to Line 11 in BlankPage1.xaml
#line hidden
}