Fix:
1. Clear Temp Manually/ Automatically
· Press Win + R, type %temp%, and delete unnecessary files.
· Use Windows Disk Cleanup or Storage Sense to automatically remove temp files.
2. Check Visual Studio Settings
· Go to Tools > Options> projects and solutions
· Look for paths pointing to Temp and Redirect them to another drive if needed.
3. Disable Diagnostic Tools Auto Collection
· Go to Debug>Windows>Show Diagnostic tools.
· In settings, disable Enable Diagnostic tools while debugging if you don’t need it(This can generate very large .dmp and trace files in temp.)
4. Limit or clean component cache
· Run in Developer command prompt for VS:
· This clears cached component data.
Devenv.exe /clearcache
5. Check extensions
· Some extensions(e.g., ReSharper, code analyzers) generate lots of temp files.
· Try disabling extensions and see if the problem reduces.
6. Update Visual studio
· Make sure you are on the latest VS 2022 version – some builds had issues with excessive log/temp file creation
7. Redirect TEMP folder(optional)
· If space is limited, change the TEMP/TMP environment variables to another drive with more space.
Hope this helps, please let me know if you have any other query and if it helps please mark the answer as answered.