Q: ASP.NET caching problems (parser and compiler error messages).

A: In case you get one of the errors below you may have a caching problem, which means that there are cached assemblies that conflicts with the assembly you are trying to build.

  • Parser Error Message: Could not load type 'development.Global'
  • Compiler Error Message: CS1595: 'System.Collections.ArrayList' is defined in multiple places; using definition from 'c:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll'
  • Compiler Error Message: CS1595: 'System.Runtime.CompilerServices.CompilerGlobalScopeAttribute' is defined in multiple places; using definition from 'c:\windows\microsoft.net\framework\v1.0.3705\mscorlib.dll'

To solve caching problems you need to delete all conflicting files (mainly dlls and exes) from the .Net Framework 1.0 caches. Here is how:

  1. Shut down IIS.
  2. Delete all cached project files in
    %windir%\Microsoft.NET\Framework\version\Temporary ASP.NET Files\
  3. Delete all cached project files in
    C:\Documents and Settings\user\VSWebCache\
  4. Delete all cached project files in
    C:\Documents and Settings\LocalService\Local Settings\Application Data\assembly\
  5. Restart IIS.

Here are sample command line statements that you can put in a BAT-file to do 2-4 above:

del /S /F /Q "C:\Documents and Settings\user\EPiServer*.dll"
del /S /F /Q "C:\Documents and Settings\LocalService\Local Settings\Application Data\assembly\EPiServer*.dll"
del /S /F /Q "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\*.dll"