Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I recently added some of my Visual Studio 2010 projects to a solution, and now every time I reopen the program they stop compiling. They complain "Unable to open module file C:\Users[USERNAME]\AppData\Local\Temp\1.NETFramework,Version=v4.0.AssemblyAttributes.vb. System cannot find the file specified." I've checked, the file exists and is accessible from the VS Editor itself!

All the information about this error I've found recommends using rebuild to work around the issue. That works for me, but I would rather not have to run a rebuild the first time I open every one of my solutions! Is there someway to avoid this error?

like image 373
just.another.programmer Avatar asked Jun 11 '11 19:06

just.another.programmer


2 Answers

Yes, this is a problem caused by Remote Desktop Connections. RDC is (by default) setup to use create a new directory each time you log in remotely. Also, it's setup (separate setting) to delete that directory once you log off. The real solution is to remove these two settings so that it will just use your standard Temp folder, not deleting the files at logout.

There are also two workarounds to this problem:

  1. Workaround 1: Delete your .suo file for the solution before opening the solution or rebuilding.
  2. Workaround 2: Use the "Rebuild All" option for the fix

Note: Setting up RDC can really only be done if you're logged on as an administrator on the box, thus, the two workarounds.

like image 71
Richard Avatar answered Nov 03 '22 21:11

Richard


I restarted visual studio and that did the trick...

like image 6
vcuankit Avatar answered Nov 03 '22 22:11

vcuankit