简体   繁体   中英

Visual C++ Source Files Locked by Visual Studio's IntelliSense

I have a Visual C++ code project with plenty of generated code. This slows down code analysis of Visual Studio's IntelliSense. Quite often when I modify a source code file ( .cpp or .hpp ) Visual Studio keeps the file locked for some time and does not allow me to save over it. This is pretty infuriating if you can't save or build for about 1 minute until it randomly works again since it wastes a lot of productive time which could be used to compile or test code. I suspect the delay is the time for the code analysis to finish processing the changes I made but I also Googled a few times and never found any information online about this issue I just described. I have ReSharper C++ disabled already due to performance issues.

How do you properly deal with this or how to fix it? It happens in Visual Studio 2019 and even in the latest update of Visual Studio 2022. It does not happen in every C++ project, however it seems to get worse when using more (large) library dependencies. I don't really use any other odd plugins, just vanilla Visual Studio and C++ tools.

I was finally able to fix my Resharper speed issues by opening the Solution directly instead of through the Recent Projects and Solutions menu. I would try to Repair the Resharper installation, but it still would not speed up, or just be still too slow.

For some reason, the "Recent Projects and Solutions" doesn't update Resharper settings properly or attach to those processes completely.

Also, in <>Menu->Extensions->Resharper-Options->Performance Guide, choose to "Fix Silently" as much as you can so that Resharper can quietly, in the background, pause any operations slowing things down and then it will un-pause them when you use them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM