Here you can find an install for the HTML 5 Validation in Visual Studio 2010.
An error I was getting right away when trying this was:
Validation (HTML 5): Attribute ‘name’ is not a valid attribute of element ‘input’.
I checked the latest HTML 5 published spec here.
It definitely lists a name attribute for the input element. Therefore I needed to manually insert this attribute into the html_5.xsd file. You can find this file in the directory “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\schemas\html”
Now it is working like I expected it to.
Also don’t forget to let VS 2010 know you want to use this validation. To do that you must use the Menu:
Tools->Options->Text Editor->HTML->Validation
And Choose HTML 5 in Target Dropdown List
try
{
var settings = new Settings(newContent.Properties);
using (var editor = new SourceCodeEditor(settings))
{
return editor.ShowDialog();
}
}
catch (Exception ex)
{
var buffer = new StringBuilder();
buffer.Append(ex.Message);
buffer.AppendLine();
buffer.Append(ex.StackTrace);
MessageBox.Show(buffer.ToString(), "Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return DialogResult.OK;
}