Your official information source from the .NET Web Development and Tools group at Microsoft.
Following Visual Studio 2008 release I updated my Spell Checker add-in for VS 2008 as well as added some new useful functionality.
What's new in version 2.0:Spell checker now supports text verification in:
Spell checking is supported in style and script blocks as well as in JS, CS, VB, CSS, CPP ahd H files. There are two separate binaries for VS 2005 and VS 2008. The can be installed side by side if you have both VS 2005 and VS 2008 installed on the machine.
Requirements:Microsoft Visual Studio 2008 or 2005, any edition except Express.Microsoft Word 2003 or 2007
InstallationClose Visual StudioDownload and run VSSpellChecker2005.msi or VSSpellChecker2008.msi. Run Visual StudioOpen a Web site or standalone HTML, ASP, VB, C#, JS, VBS, CSS or CPP file.You should see Spell Checker entry in the Tools menu.UninstallClose Visual StudioOpen Control PanelGo to Add/Remove ProgramsLocate Spell Checker Add-in for Visual Studio 2005 or 2008 and click Remove.How to use the Spell CheckerOpen a Web Form, HTML, ASP, JS, VBS, CS, VB, CPP or CSS file and click Tools | Spell Checker. Spell check may take 10-15 seconds on decently sized files. There is no immediate progress indication, but you can see that squiggles appear one by one under misspelled words. Double click on the misspelled word brings list of suggestions. <Cancel> closes the suggestion list. Spell checker messages also show up in the Error List as informational messages. They are not entered as errors or warnings so they don't break builds.
VS 2005 screenshot:
VS 2008 screenshot:
As before, Spell Checker support mutiple languages in HTML markup, it detects lang attribute specified on elements, extracts ISO language and uses it to specify appropriate dictionary for the Office spell checking engine.It uses default Office spell checking language in code comments:
In order to be able to spell check multiple languages you may need to install Microsoft Office 2003 Proofing Tools or an appropriate Office 2007 Language Pack. If you never used particular language dictionary in Word, you have to try it before it becomes available in the Spell Checker add-in. Many dictionaries are installed on demand and if particular language was never activated in Word, the dictionary may be still missing. Open Word, type something in the desired language and run Word spell checker at least once to make sure it works and dictionary is installed.
Customization You can customize spell checker behavior by editing rules.xml file located in Program Files\VS 2005 Spell Checker Add-In or VS 2008 Spell Checker Add-In. You can exclude certain elements and add more rules for attribute checking. You probably want to do that if you are using custom controls and want spell checker to verify spelling in custom control attribute values. All element and attribute names much be in lowercase. You don't have to close the HTML document or Visual Studio after editing the file, the file is loaded every time spell checking is performed. <?xml version="1.0" encoding="utf-8"?><rules> <!-- Exclude content of script and style elements from spell check --> <exclude name="script" /> <exclude name="style" /> <!-- Check 'value' attribute on all elements without a namespace --> <element name="*"> <attribute name="value" /> </element> <!-- Rules in ASP namespace --> <namespace name="asp"> <!-- Check all attributes ending in 'text' as well as tooltip attribute in all ASP.NET elements --> <element name="*"> <attribute name="*text" /> <attribute name="tooltip" /> </element> <!-- Special rule for asp:Calendar --> <element name="calendar"> <attribute name="caption" /> </element> <!-- Add more rules for ASP.NET elements here if needed --> </namespace> <!-- Add rules for custom controls here if needed --> </rules>
Important note: Add-in does not work with Visual Web Developer Express as Express editions are not extensible.
Visual Studio 2005 Add-in download
Visual Studio 2008 Add-in download
You may have to run as admin during the setup since add-in needs to register COM components. If, for some reason, add-in does not appear in Visual Studio, try running regsvr32 vsspellchecker.dll from command line in the add in installation folder in Program Files. Look for more details here: http://blogs.msdn.com/mikhailarkhipov/archive/2007/12/13/troubleshooting-spell-checker-setup.aspx.
- Mikhail Arkhipov
What about adding support for meta tags with Content-Language specifying the default language for the document?
Do you have any plans to support text verification for C++/C#/VB strings? I mean quoted string constants like c = "foo bar"
The spell checker seems to work when I run Visual Studio as my admin user, but not when I run Visual Studio as a non-admin user (which is how I prefer to run Visual Studio). The Add-In Manager doesn't list the Spell Checker when I run Visual Studio as a non-admin but it does for the admin user.
I did choose to install the Add-In for All Users in the setup UI. I am running Windows Vista.
David: default installation is per user. Try choosing 'Install for all users' when installing the add-in.
Just spotted something a little funny, where i have code starting Rem it thinks that whatever comes next is a comment.
e.g. allSuppliers.Remove(1) - where ove(1) is spelt wrong?!?
I'm using this in vb2008
I tried to install VS2008 addin for "everyone" and it did not work. When I install it for "me only" it worked ok.
Looks like the spell checker has a bug dealing with C# XML document comments. For example, it doesn't recognize that </para> is a closing tag in the line below and puts squiggles under "Notes</b></para>".
/// <para><b>Developer Notes</b></para>
<body>zxcvzxc</body> is caught
is not. Any ideas?
the spell checker has some problems with XML comments
i have a comment
''' <param name="Location">the new location of the mobile device</param>
and the speller highlights the device</param> as a problem.
any chance this will be fixed?
Tom, David: I fixed </param> as well as premature termination of spell checking after <% %> block. Update will be published soon.
Updated version is here: http://blogs.msdn.com/mikhailarkhipov/archive/2007/12/31/spell-checker-update-2-1-a-few-bug-fixes-and-couple-of-new-features.aspx
Any chance the spell checker might be setup to work with older versions of MSWord (say from Office 97) for those of us that don't need, or want for that matter, to upgrade to 2003/7? Or is the API significantly different?
Awesome tool guys thanks!