Monday, July 30, 2012

Not able to compile due to missing temp files

Have you ever encountered an error like below which makes your beautiful C# or VB.Net code as just txt file. I believe if the code is not getting compiling its just like a txt file. You must have seen if you are a frequent user of windows disk clean up utility or CCleaner.

“Visual Studio 2010 “cannot find” C:\Users\[USERNAME]\AppData\Local\Temp\1\.NETFramework,Version=v4.0.AssemblyAttributes.vb “

Please don’t doubt your code when you see problems like this after cleaning your temp files using any cleaning utilities. Why this is happening is because of Microsoft Visual Studio’s usage of temp space to achieve its functionalities. When VSTS cannot find the temp file which was copied earlier it reports errors.

Do a clean and rebuild on your solution to solve this issue. Never doubt your code or your team members like what I did when I first saw this error Smile. Goto the below link to see what MSFT is saying about the same error.

http://connect.microsoft.com/VisualStudio/feedback/details/515041/unable-to-open-module-file-when-an-existing-solution-is-loaded