5

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?

12
  • What specifically are you doing when this happens? Commented Nov 13, 2013 at 8:40
  • something simple like changing the order of a string-concatination. from a = b + c to a = b + "\\" + c; Commented Nov 13, 2013 at 8:41
  • Have you configured to download the .NET source files from the MS Symbol Servers? Commented Nov 13, 2013 at 8:45
  • Well it was configured to Download all Symbols, but no symbolserver was chosen Commented Nov 13, 2013 at 9:03
  • Is the string you are changing a file path? Commented Nov 13, 2013 at 9:05

2 Answers 2

4

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).
Sign up to request clarification or add additional context in comments.

1 Comment

Worked like a charm! The thing that was confusing me is the file is actually called ".NETFramework,*.AssemblyAttributes.cs"
1

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" 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.