Cleaning up web cache for Visual Studio 2003
Web cache in Visual Studio 2003 (maybe in VS2002 as well) can give you some unpleasant moments. In my case, two branches of the same project behave differently if you compile them manually, and unexpectedly similar if compiled automatically (by NAnt). The reason of the problem was a cached assembly...
Visual Studio 2003 saves cached versions of your web projects in Web Cache directory. And if you are getting strange errors while opening your project, maybe it worth to clean up the cache.
The cache usually located at C:\Documents and Settings\username\VSWebCache. The path can be customized, and stored in registry under
HKCU\Software\Microsoft\VisualStudio\7.1\WebProject\OfflineCacheDir.
Here is a small NAnt snippet to cleanup web cache (VSWebCache) for the current user. It takes path to the cache from the registry, and delete the whole directory for the current user.
NOTE: you'll lose some of you user settings of your web projects, but automatic build will work correctly. But be sure you know what are you doing ;)
Visual Studio 2003 saves cached versions of your web projects in Web Cache directory. And if you are getting strange errors while opening your project, maybe it worth to clean up the cache.
The cache usually located at C:\Documents and Settings\username\VSWebCache. The path can be customized, and stored in registry under
HKCU\Software\Microsoft\VisualStudio\7.1\WebProject\OfflineCacheDir.
Here is a small NAnt snippet to cleanup web cache (VSWebCache) for the current user. It takes path to the cache from the registry, and delete the whole directory for the current user.
NOTE: you'll lose some of you user settings of your web projects, but automatic build will work correctly. But be sure you know what are you doing ;)
<readregistry property="vs_web_cache" key="Software\Microsoft\VisualStudio\7.1\WebProject\OfflineCacheDir" hive="CurrentUser">
<delete dir="${path::combine(vs_web_cache, environment::get-machine-name())}" failonerror="false">
<delete dir="${path::combine(vs_web_cache, environment::get-machine-name())}" failonerror="false">
Labels: visual studio, vs2003, webdev
2 Comments:
In fact, NAnt is storing in this cache as well, so it happens also when no VS is installed on machine. Common for dedicated build servers.
Not sure if I got it - are you saying the web cache is generated by .NET Framework, not by VS?
Post a Comment
<< Home