IntelliSense keeps giving [Failure] Could not find a part of the path C:\TEMP

Abel picture Abel · Mar 22, 2017 · Viewed 14.2k times · Source

After changing my temporary folder, I got an issue with IntelliSense in VS2015 complaining it cannot find the temp folder (other applications, including VS2015, find the new location just fine).

The error I receive after firing up a project (seems to happen with any type of solution, C#, ASP.NET etc) is repeatedly this message in the output window of Visual Studio 2015:

enter image description here

[Failure] Could not find a part of the path 'R:\TMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.
[Failure] Could not find a part of the path 'R:\TMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.
[Failure] Could not find a part of the path 'R:\TMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.
[Failure] Could not find a part of the path 'R:\TMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.
[Failure] Could not find a part of the path 'R:\TMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.
[Failure] Could not find a part of the path 'R:\TMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.
[Failure] Could not find a part of the path 'R:\TMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs'.

I think I replaced all rogue references to the R:\TMP location in the registry, but this one remains. Anyone any idea how to fix this?

Answer

pero picture pero · Mar 22, 2017
  1. Exit Visual Studio
  2. Delete all non-project files (bin, obj. .vs, _ReSharper.Caches folders, *.suo files, ...)
  3. Start VS and rebuild

That fixed it for me.