It seems to me that there are major breaking changes in TagBuilder as of beta7 with no mention about them in the announcements repo.
Specifically .ToString no longer ren
Having lost span.SetInnerText(somestring); it is now possible to do
span.SetInnerText(somestring);
span.InnerHtml.SetContent(somestring);
using Microsoft.AspNetCore.Html.HtmlContentBuilderExtensions.
Microsoft.AspNetCore.Html.HtmlContentBuilderExtensions
This is coming from a perspective of 4.7 with AspNetCore 2.0.1.