Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging error when editing code

Occasionally I get this strange error when debugging code. It occurs when I change something in code while debugging.

This isn't really linked to the framework, as this was happening in different versions so far.

Translated from german:

Error 1 The sourcefile "C:\Users\xxxx\AppData\Local\Temp\8\.NETFramework,
Version=v4.5.1.AssemblyAttributes.cs" 
could not be opened("Unknown Error").   folderOfProjectFile

The whole directory "8" isn't existant in appdata\local there is only "4"

Additional Info:

  • Visual Studio Premium 2013, though I bellieve it happened in 2010 too.
  • Terminalserver running 2008 RC2 DataCenter x64

There isn't much Google offers when searching for this errormessage. Mostly because my translation probably isn't exactly the correct one.

Here is the original exception

Fehler  3   Die Quelldatei "C:\Users\XXXX\AppData\Local\Temp\5\.NETFramework,
Version=v4.5.1.AssemblyAttributes.cs" 
konnte nicht geöffnet werden ("Unbekannter Fehler ").     folderOfProjectfile

Does anyone know what could cause this problem?

like image 302
CSharpie Avatar asked Nov 13 '13 08:11

CSharpie


2 Answers

I have run into this issue sporadically. It has occurred for me in 2 ways:

  • The file existed in a different folder.
  • The settings in the file did not match what visual studio expected.

I resolved both situations the same way:

  1. Close the project, and preferably VS
  2. Delete the solution's *.SUO file
  3. Additionally, I also remove any C:\Users\*\AppData\local\Temp\*\.NETFramework,*.AssemblyAttributes.cs file from my profile's local temp folder(s).
like image 93
tc2617 Avatar answered Sep 30 '22 15:09

tc2617


Go to the folder:

C:\Users\username\AppData\Local\Temp

and make sure the following file is not hidden:

".NETFramework,Version=v4.5.AssemblyAttributes.cs" 
like image 29
Rajeesh Avatar answered Sep 30 '22 15:09

Rajeesh