Follow these steps to force Visual Assist to parse complex code in a specific way, typically only upon direction from Whole Tomato Software. In normal circumstances, do not edit, or bother to find, the default stdafx.h or va_stdafx.h installed with Visual Assist.
The process for creating and editing stdafx.h or va_stdafx.h varies greatly, depending in your build of Visual Assist, IDE, and OS.
Visual Studio 2003 and newer, using Visual Assist build 2283 or newer
To make a single va_stdafx.h apply to all Visual Assist users of a solution, create the header in the .va\shared\ subdirectory of the solution directory. To make va_stdafx.h apply to all of your solutions, create the header in your %APPDATA%\VisualAssist\Misc directory. To make the header apply to a specific solution, create the file in the .va\user\ subdirectory of the solution directory.
Continue with instructions regarding content in the callout for builds 1912-2238.
Visual Studio 2003 and newer, using Visual Assist build 2248-2270
To make va_stdafx.h apply to all of your solutions, create the header in your %APPDATA%\VisualAssist\Misc directory. To make the header apply to a specific solution, create the file in the same directory as a .sln or .vcxproj file.
Continue with instructions regarding content in the callout for builds 1912-2238.
Visual Studio 2003 and newer, using Visual Assist build 1912-2238
Create a local, solution-specific file called va_stdafx.h in the same directory as one of your .sln or .vcxproj files.
Add content to va_stdafx.h as directed by Whole Tomato Software. (Do not copy or modify stdafx.h or va_stdafx.h found in the installation directory of Visual Assist.)
Ensure va_stdafx.h ends with a blank line.
Force Visual Assist to rebuild its symbol database:
![](/~/media/wholetomato/kb/override-the-parser-in-a-stdafx_h-specific-to-visual-assist/rebuild.ashx?la=en&hash=040CC0510ADC0C24D222062E857BDB1CECD2181D)
Build 1912 and newer continue to support the method described for build 1908 and older for scenarios in which a global override is preferred.
Visual Assist build 1908 and older
If you have Visual Assist build 1908 or older:
- Copy the default StdAfx.h as directed below.
- Add content to the bottom of the target stdafx.h or va_stdafx.h as directed by Whole Tomato Software.
- Ensure the local header file terminates with a blank line.
- After adding content, force Visual Assist to reparse all files: Visual Assist Options | Performance | General | Rebuild symbol databases
Note: with Visual Assist build 1908 and older, your copy of StdAfx.h is not updated when you install a newer build of Visual Assist, so you must diff the newly installed StdAfx.h with your copy, and merge updates into your local copy. For this reason, Whole Tomato recommends you use a newer build of Visual Assist and follow the simpler steps above. With Visual Assist build 1912 and newer, your local copy is a supplement to the default, not its replacement.
Visual Studio 2012 or newer
Copy:
C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\<IDE version>\Extensions\<hashed name>\Misc\StdAfx.h
to:
C:\Users\<USERNAME>\AppData\Roaming\VisualAssist\Misc\StdAfx.h
Visual Studio 2010
Copy:
C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Whole Tomato Software\Visual Assist X\<version number>\Misc\StdAfx.h
or
C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\<hashed name>\Misc\StdAfx.h
to:
C:\Users\<USERNAME>\AppData\Roaming\VisualAssist\Misc\StdAfx.h
Visual Studio 2010 using Windows XP
Copy:
C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\VisualStudio\10.0\Extensions\Whole Tomato Software\Visual Assist X\<version number>\Misc\StdAfx.h
or
C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\<hashed name>\Misc\StdAfx.h
to:
C:\Documents and Settings\<USERNAME>\Application Data\VisualAssist\Misc\StdAfx.h
Visual Studio 2008 or older
Copy:
C:\Program Files\Visual Assist X\Misc\StdAfx.h
to:
C:\Users\<USERNAME>\AppData\Roaming\VisualAssist\Misc\StdAfx.h
Visual Studio 2008 or older, using Windows XP
Copy:
C:\Program Files\Visual Assist X\Misc\StdAfx.h
to:
C:\Documents and Settings\<USERNAME>\Application Data\VisualAssist\Misc\StdAfx.h