CSharpie
CSharpie

Reputation: 9477

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:

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?

Upvotes: 5

Views: 3535

Answers (2)

Rajeesh
Rajeesh

Reputation: 11

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" 

Upvotes: 1

tc2617
tc2617

Reputation: 66

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).

Upvotes: 4

Related Questions