I work on c++ project on VS, and a lot of operations that were fast now super slow. Saving a file could take minutes, intelISense may take forever to show hints, navigating functions takes long time. I tried to reinstall VS 2017, but behavior havent changed. I tried to move to VS 2019, but observe same things. I have 6700k, 32gb ram, Windows 10 with latest updates, both VS installed on NVME M2 drive(around 3000 mb/s write/read), so my PC rather fast. Any ideas how I can solve it? Development sometimes feels unbearable.
EDIT: So, I deleted everything that was remotely close to Visual Studio (VS15-17-19, build tools, Nsight, CUDA integration) and installed clean VS19 installation only with v142 tools for C++. So far(few hours in) it works fine. I dont know what was the problem, but I hope it fixed it. Will report later if lags will return.
Related
Environment
I'm using Visual Studio 2019 version 16.7.2 on a Windows 10 VM, hosted by Parallels on a brand new MacBook Pro. The VM has eight virtual processors and sixteen gigs of RAM.
Nothing other than Visual Studio is installed on the VM.
What I'm trying to do
I'm trying to compile a Visual Studio solution consisting of seventeen projects. The projects are relatively small. They're all C# console applications or DLL libraries targeting .NET Core 3.1.
Problem
Typically a Rebuild Solution executed after a Clean Solution takes place in about ten seconds. A typical Build Solution (Ctl-Shft-B) that I execute throughout the day takes place almost instantaneously.
But occasionally, in maybe one build out of five, building the solution/projects causes VBCSCompiler.exe to consume 99% CPU usage and freeze up for approximately thirty to forty-five seconds prior to executing the build. Once it starts executing the build though, everything completes normally. This long delay which occurs time and time again is making my development cycle terribly frustrating. I'd like to find a way to eliminate this delay.
What's Changed
The build executed fine on my Amazon Web Server Windows 2016 m4.xlarge VM. I recently switched over to the Parallels VM to save money. That's when the problem began.
Again, I want to reiterate that the Parallels VM is clean. Nothing other than Visual Studio is installed there.
What I've Tried
The following tactics were applied to no avail.
(1) I turned off the Defender real-time virus checker.
(2) Based on the information in this post, I went to Tools | Options | Nuget Package Manager | General, and unchecked 'Allow Nuget to download missing packages' and 'Automatically check for missing packages'
(3) In Tools | Options | Projects and Solutions | Build and Run, I set the maximum number of parallel projects builds to one.
(4) Based on an answer to an unrelated question, I learned that I can view more information about the build process by setting 'MS Build project build output verbosity' to Detailed. I did so. I waited for the freeze to occur so I could examine the last line of output prior to the freeze. It reads as follows:
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn
This line always appears immediately before a freeze.
(5) Based on the output above, I Googled 'shared compilation' and discovered this post.
As a hobbyist programmer, the discussion that took place there, as well as the link in the accepted answer is well above my pay grade. It's unintelligible to me. If the answer lives in that post, I can't decipher it.
Any ideas on how to solve this intermittent freeze? If I can't figure it out, I'll have to assume it's something about my Parallels Windows 10 VM that's causing the problem, and revert back to developing on an Amazon server. I'd prefer to avoid that if possible because of the added expense.
Thanks for your consideration.
Best,
Festus
I installed 2017 and used it for some time (months). After one of the updates, I started having trouble in the file browser window not navigating to other folders without hanging. I can't navigate or choose a file. the app is hung here. I have left it up for several minutes and it stays hung there. I have to kill it from Task Manager in the current version; in prior versions it hung the system and I had to power off. I saw similar problems posted and a reply that indicated it was reproduced and would be fixed. I starting using VS 2015 again in the meantime. That was a few release ago. I had hopes that the most recent one (now on 15.7.3) might fix it since it was fairly large. It made me have a different issue in the same dialog. Now it is blanked out and only VS 2017 is hung. That's a little better since I don't have to restart my system every time I try to run it. But I really need to move to VS 2017.
Any suggestions would be appreciated. I have uninstalled and re-installed several times and tried uninstalling and reinstalling the more recent .net versions.
Windows 10 Enterprise, kept current with Windows Update, 32G RAM
On trying to browse for a solution, this comes up.
I'm working in a project building an application with Computer Vision using C++, OpenCV and Visual Studio. I'm no expert in deploying programs to use them on other PCs.
I've made a program which I need to distribute to a certain amount of people and I can't make it work on all the computers I'd like to. The program was written using Visual Studio 2015, it's an MFC Project and the code is written in C++ since I'm using OpenCV.
When it was finished, I tried to run it on another computer and I realized that it won't open. I looked on the Internet and found out that I needed to statically link the libraries, so I did it. Also, when I was looking for information, I found that Visual Studio 2015 builds its projects so you can run the programs on machines with Win7 to Win10. When I learnt that, I tried to open it on PCs running Windows 7, 8, 8.1 and 10. I tested my program in like 20 computers, give or take.
The results? I couldn't make it work for Windows 7, the error ucrtbase.terminate api-ms-win-crt-runtime-l1-1-0.dll showed every time I tried to open it. It also didn't open in one machine with Windows 8 without showing any error message, but it DID open on most of the machines with Win 8.1 and Win 10. The thing is that "most"; there were some PCs (with Win 8.1 and 10) that I couldn't open my program on. I found that sometimes it would show up in the Task Manager for less than a second and then disappear. The most stressful thing is that it doesn't tell me what the problem is, it doesn't show any error message. It just won't open.
I tried using Dependency Walker (both on my PC and one of those that I couldn't run my program on) to see if there's something missing and I got a reeaaally long list of files that the system couldn't find, here's an example:
List 1/11. Something curious is that my program executes just well on my computer and on those I could open it, even though Dependency Walker (DW) tells me that there might be a problem with it. This indicates me that DW is not finding the exact error I'm having.
Another thing I've tried is to compare the things I have installed on my computer and install them on the one I want to execute my program on. I tried installing .NET Framework 4.6.1 just because VS 2015 says that my project was built using it (and I have it installed in my PC and that other one doesn't. Also I tried with .NET 4.6.1 SDK). Nothing changed.
Just look here:
https://msdn.microsoft.com/de-de/library/ms235299.aspx
The quick-and-dirty way would be to copy the DLLs from your redist directory. For my MS VS 2013 it is hidden under the VS installation directory in:
VC\redist\x86
or
VC\redist\x64
...
which depends on your application.
This question actually is an implicit answer, since I could fix the problem in the meantime for myself. But I wanted to publish my experience, since some other developers might have a similar problems.
The problem:
I am using VS2010 prof SP1 on Windows XP SP3, pure C++ only. (AntiVirus software present).
Since some days Intellisense - which is quite helpful under normal conditions - does not work anymore.
Things tried:
created a new simple console application. -> Intellisense still not working.
resetting VS-Settings by means of Tools/Import & Export Settings/Reset. -> Intellisense still not working
Changes to option settings in Text-Editor/C++/Advanced inclusive logging did not help.
-> Intellisense still not working
There was actually an interesting observation:
Intellisense normally creates a directory 'ipch' in the solution directory to store intermediate files. In my solution folders it disappeared as soon as the solution was opened. When I created a folder 'ipch' and opened the solution Intellisense removed the folder again - strange.
The final fix:
During the last week some new Windows updates were installed. I noticed some other unusual behaviour of my PC as well. After having created an image of my PC, I decided to
uninstall Windows updates from 2013-09-11 (4 packages) and one update from 2013-08-28.
(unfortunately I did not note down the KB-numbers)
AND: out of a sudden Intellisense is working again !
Maybe this report could be helpful for some other persons.
Automatic Updates are now disabled on my PCs.
Confirmed 100%
Microsoft Visual Studio 2010 Version 10.0.30319.1 RTMRel
Microsoft NET framework 4.0.30319 RTMRel
Microsoft Windows XP Professional Version 2002 Service Pack 3
Intellisense stops working after installing KB2876217.
Intellisense is back after removing update.
I had the same problem and also had the idea that one of the Windows Updates is buggy, so I can confirm your report.
I tried to uninstall them one-b<-one and found the "bad guy":
KB2876217 destroys intellisense for VS2010 under XP SP3.
A supported hotfix is available from Microsoft to fix this issue. Check at http://support.microsoft.com/kb/2526044/en-us
Actually, it may not be such a good idea to uninstall update KB2876217. Instead, install Visual Studio SP1 update (if not already installed) and then install update KB2526044. I have tried it before and it does work...
This is probably way too vague for any concrete answers, but this issue has been bothering me so I figured I'd give it a shot here:
Every time I hit F5 to run a project (and I'm talking something tiny 2 - 3 source files), first of all half the time it tells me that I need to rebuild the project even if the only change I made was add a breakpoint and then takes maybe ~20s to actually get the program running. This is a very basic command-line program and with gcc everything happens much, much faster. Any ideas?
PM
When using VS2010 on older operating systems (Like WinXP), then one should make sure to install latest UIA (Windows Automation) component MS KB971513. Failing to do this will cause VS2010 to perform poorly.
Also check ScottGu's Blog for other important hotfixes
The long waiting time before VS actually starts the application when hitting F5 occurs in VS 2008 as well. The simple solution to that is to delete the .suo file. I don't know if VS 2010 uses .suo files, but at least it's something you can try.
This might not be the case, but I remember VS used to act like this when I had lots of breakpoints.