Use the RazorFormat plugin in .netframework, which has a MinifyHtml property. Why does not the .netcore use this plug-in without the MinifyHtml property?
in .netframework
Plugins.Add(new RazorFormat{MinifyHtml = true, UseAdvancedCompression = true});
in .netcore
Plugins.Add(new RazorFormat());
How to implement MinifyHtml in .net core?