Share via


Why deleting temporary files cause Visual Studio Installer no longer recognize the installed component?

Question

Friday, June 7, 2019 6:12 PM

I have change my 2 temporary files to one Directory, Both TMP and TEMP path to the same folder, which means two temp files(in system32 and appdata).

So all my temp files are in the same folder.

However if I delete all the files inside, the vs installer can nolonger recognize my installed vs, that make the maintaince and uninstaller no longer usable.

How can I delete my temp files without effecting vs installer?

All replies (3)

Monday, June 10, 2019 9:31 AM | 1 vote

Hi TruffleWorm,

Welcome to the MSDN forum.

How did you change these two temporary files to one Directory? Did this action is after you installed the VS? If so, it seems some temp files that VS requires be deleted. Please have a try with the following to re-install VS:

  1. delete %LocalAppData%\Microsoft\VisualStudio\15.0_xxxx\ComponentModelCache, start VS
  2.  please follow the steps as below to clean up the installed VS and re-install it:
  • See if you have this file on your machine: "%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe"
  • If so, please launch it from an admin command prompt with a -full param:

InstallCleanup.exe -full

  • If not, please manually delete the "%programfiles(x86)%\Microsoft Visual Studio\Installer” folder
  • Relaunch the newly downloaded vs_enterprise.exe (or vs_professional.exe or vs_community.exe…)
  • Allow the first step to install the installer
  • Once the installer comes up and you can see workload choices (.net desktop and the like), close it
  • Go launch the same InstallCleanup.exe to clean up old build of VS
  • Then re-run the VS installer to install

Usually, we can delete the temporary files under the folders:

%LocalAppData%\Microsoft\VisualStudio\xxxxx(like 14.0/15.0_xxxx/16.0_xxx)

%USERPROFILE%\AppData\Local\Temp

Best regards,

Sara

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 [email protected]


Wednesday, June 12, 2019 7:58 PM

Thanks for you reply so much, but I think we may out of the topic a bit. If I may, start over.

I had changed the path in system environment both just like this BEFORE I installed vs, just like this:

My space in C:\ is not enough, so I want to clean the temporary files, just like what I did before-simply delete all the temp files.

However, after I deleted(moved)all the files in the merged temporary files directory, the vs_installer can no longer maintaince the vs which has been installed correctly. After I restored the files, it became usable again.

Without any doubt that some files in the temporary directory is what the vs_installer required, which is weird and unreasonable. That make me no longer able to clean the temp files.

I meant, in the past, we are(I am) always safe to delete temp files in the directory TMP and TEMP refer to, but now I can't just clean my temporary files safely. I can not understand why vs_installer saved the data files in that files, rather than in a more proper directory, for instance, AppData.

You gave the process, but can that promise the vs do not put something important inside my temporary folder again?

BTW this is the first time I changed TMP and TEMP, for better temporary files management.


Thursday, June 13, 2019 10:02 AM

Hi TruffleWorm,

Have you tried to clean up the VS installation cache like I said? I will try to follow your step to reproduce this issue. 

BTW, please change the value of TEMP/TMP not the Chinese language to have a try.

Best Regards,

Sara 

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 [email protected]