61

I have a problem where my ASP.NET controls are not able to be referenced from the code behind files.

I found a solution in Stack Overflow question ASP.NET controls cannot be referenced in code-behind in Visual Studio 2008.

But I cannot seem to find my Visual Studio cache to clear it. I am using Visual Studio 2005 on Windows Vista.

Community
  • 1
  • 1
Brian G
  • 53,704
  • 58
  • 125
  • 140

3 Answers3

88

The accepted answer gave two locations:

here

C:\Documents and Settings\Administrator\Local Settings\Temp\VWDWebCache

and possibly here

C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\WebsiteCache

Did you try those?

Edited to add

On my Windows Vista machine, it's located in

%Temp%\VWDWebCache

and in

%LocalAppData%\Microsoft\WebsiteCache

From your additional information (regarding team edition) this comes from Clear Client TFS Cache:

Clear Client TFS Cache

Visual Studio and Team Explorer provide a caching mechanism which can get out of sync. If I have multiple instances of a single TFS which can be connected to from a single Visual Studio client, that client can become confused.

To solve it..

For Windows Vista delete contents of this folder

%LocalAppData%\Microsoft\Team Foundation\1.0\Cache

mech
  • 2,775
  • 5
  • 30
  • 38
GregD
  • 6,860
  • 5
  • 34
  • 61
  • 41
    Those 3 paths generally can be writeen as: `%LOCALAPPDATA%\Microsoft\WebsiteCache`, `%LOCALAPPDATA%\Temp\VWDWebCache` and `%LOCALAPPDATA%\Microsoft\Team Foundation\1.0\Cache` – Janis Veinbergs Sep 13 '11 at 07:32
  • 5
    Another source of errors is **%LOCALAPPDATA%\Microsoft\VisualStudio\11.0\Designer\ShadowCache** _(\11.0\ ==VS2012)_ – pr0gg3r Apr 07 '14 at 16:43
  • 1
    In the comment by Janis Veinbergs above, the `1.0` in the third path will increase over time. For me today, it is now `5.0`. – Tyson Williams Dec 03 '15 at 14:17
20

I experienced this today. The value in Config was the updated one but the application would return the older value, stop and starting the solution did nothing.

So I cleared the .Net Temp folder.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

It shouldn't create bugs but to be safe close your solution down first. Clear the Temporary ASP.NET Files then load up your solution.

My issue was sorted.

Adam
  • 1,203
  • 1
  • 13
  • 16
2

I had the same issue but when i deleted the cached items from Temp folder the build failed.

In order to make the build work again I had to close the project and reopen it.

silver
  • 1,633
  • 1
  • 20
  • 32
  • 1
    This is because somebody in the DevTools division at Microsoft decided to cache file(s) that are required for compilation (.NETFramework,Version=vX.X.AssemblyAttributes.XX) in a temporary directory, and DevTools has decided they don't want to fix it. The file(s) should never have been persisted to disk in the first place, and if they're going to do it anyway, the files should be moved to a more appropriate directory (e.g. "Cache", or something). – jerhewet Apr 23 '15 at 16:04
  • You should never try clearing the temp files while the application is open. I have the same issues when clearing NUGET cache. – Chris Go Aug 04 '18 at 15:18