If the environment variable route does not work for you, check the integrity of the project file.
I had this problem in 2017 and it was due to double entry in vcxproj from a manual editing error. Our vcxproj file had the following in it:
<ClInclude Include="XXXX.h" /> <ClCompile Include="XXXX.h" />
In 2017, we got exactly the error that you described when trying to add an existing file, slightly different when adding new and strange crashes elsewhere. The discovery of the solution in 2015 launched the exact problem and failed to download the project. We deleted the double entry, and all the mysterious problems disappeared.
source share