The recently-released .NET tooling seem to have support for embedding C# in PDBs, which should improve the experience of stepping into third-party, etc. Running csc /?
csc /?
There's now a proper MSBuild EmbedAllSources property:
netstandard2.0 true [...]
From what I observed locally, it behaves the same as the mentioned EmbedFiles target.
EmbedFiles