none
VS 2017 can't find Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs'. and won't open my project RRS feed

  • Question

  • I cleared out my Temp folder.   When I try to open a project that opened without issue with VS2015 I get this message in the Output window:

    [Failure] Could not find file 'C:\Users\LesXmon\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.

    I cannot open the project.

    How can I resolve this - I'm dead in the water?

    Why is a necessary file stored in the TEMP folder??

    Friday, April 21, 2017 6:38 PM

Answers

  • Hi,

    As far as I know, it's safe to clean the Temp folder. Your issue may not related to cleaning the temp folder.

    I cleaned the temp folder and then open a project in visual studio 2015. After this, .NETFramework,Version=v4.0.AssemblyAttributes.cs appears in temp folder automatically.

    The safest way to do that is to run Disk Clean-up. Make sure there's a tick in the 'Temporary files' box and click OK.

    While you're in Disk Clean-up, have a look at other things that may be taking up space (recycle bin, temporary internet files, etc.). If you click its 'Clean up system files' button it will do a deeper check and fine even more things that could be cleaned.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Win7Wannabe Tuesday, April 25, 2017 4:03 PM
    Tuesday, April 25, 2017 6:40 AM

All replies

  • Did a 'repair' of VS 2017 and that fixed the problem.  Of course, I lost all my setups for VS.

    Still believe a necessary file should not be stored in a location called TEMP!!!  Why is this done?

    Friday, April 21, 2017 8:25 PM
  • Hi Win7Wannabe,

    Thank you for your update and glad to hear that you solved this issue successfully.

    Although you clean the Temp folder, when you double click to run the VS 2017 installer again, it will load the Temp files again.

    Usually, the "Could not find file Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs' " error is 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

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, April 24, 2017 7:54 AM
    Moderator
  • I've never logged in remotely?  This is just a normal Win7-64 box that sits next to me?

    I'm not saying that VS deleted the file.  I cleared the TEMP folder myself, as I've always thought that anything in the TEMP folder could by definition be deleted? 

    I cleared it to free up a bit more space.  I underestimated my C drive requirements when I partitioned my RAID and only have about 30GB left (unless I make the swap file much smaller, as I've got 128GB RAM the swap file is 128GB now).

    Are there any other files I need to 'not delete' if I clear out my TEMP folder?  I used a 3rd party tool to make backups of important files, so I'd like to add any in the TEMP folder to this list.

    But, I can't help but wonder if there is a better place that VS could put that file if the project won't open with out it. 

    Also, I believe this was a project, not a solution, so I'm unclear whether deleting the .suo file would solve the problem.  I think it just refused to open the project, so that 'rebuilding' it was not an option.

    Thanks!!

    Monday, April 24, 2017 3:41 PM
  • Hi,

    As far as I know, it's safe to clean the Temp folder. Your issue may not related to cleaning the temp folder.

    I cleaned the temp folder and then open a project in visual studio 2015. After this, .NETFramework,Version=v4.0.AssemblyAttributes.cs appears in temp folder automatically.

    The safest way to do that is to run Disk Clean-up. Make sure there's a tick in the 'Temporary files' box and click OK.

    While you're in Disk Clean-up, have a look at other things that may be taking up space (recycle bin, temporary internet files, etc.). If you click its 'Clean up system files' button it will do a deeper check and fine even more things that could be cleaned.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Win7Wannabe Tuesday, April 25, 2017 4:03 PM
    Tuesday, April 25, 2017 6:40 AM
  • I know this is an older post, but is top in search results, so...

    This fixes it:

    1. Build -> Clean Solution
    2. Build -> Rebuild Solution
    3. File -> Close Solution
    4. View -> Start Page
    5. Open most recent solution from the Start Page

    Rinse/Repeat.  Sometimes I have to do rebuild after re-open, not before.

    • Proposed as answer by dennisf6 Monday, July 2, 2018 6:34 PM
    Wednesday, March 14, 2018 1:48 PM
  • In my experience, that message in the Output window is harmless. I've had it happen many times - never interfered with opening a project. For me, at the top of the window, above that "Failure", it says "Show output from IntelliSense". Ignore it.  See related IDE bug discussion: IDE shouldn't switch to output window when listing intellisense issues #12202

    If you are reading this topic, it is probably because you are having some OTHER, more serious problem, and you are suspecting this dramatic sounding "Failure" is the cause.  Unless you are having a problem with Intellisense, this Failure is not relevant to your problem.

    Instead, search for fixes to crashes in VS. 

    The usual first step for repeated crashes in VS, when they only happen on a particular project or solution, is to exit VS, and delete the (hidden) .suo for your solution.  [Or move it elsewhere, so that VS doesn't find it, but you can move it back if that did not solve your problem.]

    Currently, the .suo is in a hidden folder ".vs", within the folder containing your solution's .sln file.

    ---------------------

    Further details:

    1. Q. Why does that IntelliSense error occur?  A: IntelliSense "holds on to" old references that it shouldn't. 

     If error message mentions . NET Framework version, I think that happens when you change what version of .NET your project is targeting.  When you open a project, a temp reference to the CURRENT targetted version is created in the temp folder. But Intellisense is still looking for the ORIGINAL temp reference, which no longer exists.  

    As seen in the Bug tracking topic linked above, there also were issues when you renamed source files.

    2. FWIW, AnOldMan's steps to "fix" the problem, don't help long-term. The symptom goes away for awhile, but only because after Rebuild Solution, Intellisense no longer tries to find whatever it was searching for. The symptom will return another day.
















    Tuesday, April 10, 2018 6:34 PM
  • I saw this warning today in the Intellisense window and was able to resolve it by saving an empty file in notepad as  "C:\Users\....\AppData\Local\Temp\.NETFramework,Version=v4.7.AssemblyAttributes.vb" 


    Thursday, June 21, 2018 3:46 PM
  • I had this error and Intellisense wasn't working for anything imported from other projects in the solution. I cleaned out the .vs folder and re-opened VS. Issue went away.
    Friday, November 30, 2018 8:53 AM
  • Your workaround doest work for me...
    Wednesday, January 2, 2019 2:47 PM