Clearing Cache

From Visual WebGui Wiki
Jump to: navigation, search
VWG 64+ The content of this article is valid for version 6.4 and later, including v7.x;


Clearing the Cache in Visual WebGui applications

Future contents

This article should cover all aspects of clearing the cache in Visual WebGui application scenarios, as well as describing the different levels of cache, and how to clear each.

Special mention should be for the Disable Caching switch in web.config, and what effect it has. PrivateVersion should also be discussed/referenced.

The need to rereference Gizmox DLL's after version change should also be discussed (remember different folder locations for DLL's based on with or without sources installations).

See Also

Visual Studio Add-In helper for ReReferencing

As a convenient and quick way of performing the most common task of cearing cache, (re)referencing all the existing and common Gizmox DLLs on your project, we have created simple Visual Studio Add-In that will perform the following steps on a project:

  • Clean the project
  • Build a list of current Gizmox assemblies referenced on your project
  • Remove all references to Gizmox assemblies on your project
  • Reference again all the Gizmox assemblies found in the second step
  • Reference any missing "standard" or "common" Gizmox assemblies, in addition to the list above.
  • Upper the privateversion in web.config

Each download below is an Add-In for the corresponding version of Visual Studio and this Add-In is available for Visual Studio 2008, 2010, 2012, 2013 and 2015. When the Add-In has been installed, you use it by right clicking on any project and choose "ReReference VWG DLLs". The progress is shown in a dialog and if there is a problem, the dialog is left open, otherwise it will close on completion. The most common problems you will get are related to assemblies not found or one or more of your project files are in use. If you get an error, you can often solve it by simply closing down Visual Studio then opening it again and run the Add-In again.

To install the Add-In, just download, unzip and double click the .MSI or .VSIX file.

Standard procedure

This procedure for clearing the cache, has been posted countless times on the forums. It deserves some overhaul and update, but stands here until this article is fully written.

Clearing cache on development workstation

  1. Shut down VS if it's running
  2. Delete your browser cache (IE=Delete temporary internet files FF=Clear Private Data + Cache)
    1. You can also use Ctrl-Shift-Del in almost any browser
  3. Shut down all running Microsoft Web-Servers on your machine, including MS Visual Studio Web-Servers.
  4. Go to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.xxxxx\Temporary ASP.NET Files, delete all Visual WebGui assemblies (Gizmox.WebGUI.*.dll). Please note that this step removes server cache for both MS Visual Studio Web-Servers and MS IIS. (Note that for Vista/Win7 and Visual Studio Development server this directory might be different and you should then look for it at 'c:\users\<username>i\AppData\local\temp\Temporary ASP.NET Files' )
  5. Open sample application in MS Visual Studio.
  6. Delete obj and bin folders (and ClientBin if SilverLight deploy)
  7. [For Visual Studio 2005 only] Delete all Gizmox references
  8. [For Visual Studio 2005 only] Reference the Gixmox DLL's, which now should be correct version
  9. Temporarily set "Disable Caching" in General tab of Visual WebGui integration (remember setting back if production app). This is equivialent to Web.config setting: <add name="VWG_DisableCachingSwitch" value="1" />
  10. Increase Private Version of project
  11. Clean
  12. Recompile
  13. If you have a "route" directory in the root directory of your project (generated from use of StaticResources), remove it completely.

Clearing cache on dedicated webserver

After clearing the cache on your development machine and deployed your application to the webserver, making sure that all required DLLs are up to date on the webserver, these are the extra steps needed to completely clear cache on the dedicated webserver:

  1. Shut down IIS if it's running. This is an extream step and is not always doable. If not doable, you might be unable to delete some locked files in later steps.
  2. Go to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.xxxxx\Temporary ASP.NET Files, delete all Visual WebGui assemblies (Gizmox.WebGUI.*.dll).
  3. Increase Private Version of project by updating web.config
  4. If you have a "route" directory in the root directory of your project (generated from use of StaticResources), remove it completely.
  5. Start IIS, if it was stopped in step 1

Clearing cache on the clients

On ordinary browser clients there is only one step to perform.

  1. Delete browser cache (IE=Delete temporary internet files FF=Clear Private Data + Cache)

Extended steps for sticky Visual Studio caching problems

In extream cases for Development Machines, Visual Studio caching of projects on various locations on your development machine can be a problem. In such cases you should be aware of the following Visual Studio caching locations, and most of the time can simply delete all files from these locations. Remember to close down all your Visual Studio instances before you do. The following locations are specific to Window7 operating system, but similar locations should be locatable on XP operating systems. Please also note that the "10.0" in the path(s) below is for Visual Studio 2010. For Visual Studio 2008 you should use "9.0" and for Visual Studio 2005 you should use "8.0". It is unclear at this point if all versions of Visual Studio use all the below locations.

  • C:\Users\<YourUserName>\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies
  • C:\Users\<YourUserName>\AppData\Local\Microsoft\WebsiteCache
  • C:\Users\<YourUserName>\AppData\Local\Temp

In addition, you should also be aware of the Visual Studio HintPath problem.

Clearing the cache in Transposition Studio

Locate the following folder and remove its contents:


VWG reference The following section is a reference only section;


Forum threads

Other references