Consider using #line directives in RoslynCodeTaskFactory #9196
Labels
Area: Engine
Issues impacting the core execution of targets and tasks.
Area: Tasks
Issues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.
backlog
Priority:3
Work that is nice to have
triaged
The CodeTaskFactory implementations can work by being given a snippet of C#, which is assembled into a full
class
definition and fed to the compiler. But errors in C# syntax are reported in a convoluted way. Given:you get
This makes sense given the details of the system, but is hard to chase back to the original error.
By using the
#line
directive we could change the line reported by the compilation to be the line in the project file (or included.cs
fragment) instead, which would be clearer.The text was updated successfully, but these errors were encountered: