Add Delay in Real Time Compilation in Visual Studio.
Original developer community item
I am working on an Open Source Project based on C# using Visual Studio 2017. Whenever I make any changes in it, Visual Studio (in a delay of about half a second) starts checking the code for errors in it which is why sometimes it gets hanged. I want to know if there is any option to increase this delay. If the delay would have been of about 3 - 5 seconds, I could make changes without any error list generated. I don't want to disable this awesome feature, but it is irritating if you don't have a great typing speed. Any solution?
Related to https://github.com/dotnet/roslyn/issues/19347
This user also mentions a experiencing a hang, so I've asked for a trace in the devcomm feedback.
To add to this - it'd be nice to have an option to only trigger real-time compilation when a file is saved.
The rationale being that if I'm actively editing a file, I know that it's not in a valid state. That when I'm ready to commit to saving, I've decided it should be in a valid state now.
Second the comments above. This should be configurable, and the suggestion from @jgscherber to allow recompilation only on save is excellent. This is not just about avoiding a hang/crash, but a serious usability problem. Having the IDE marking/unmarking errors, adding/removing items from the "Errors List" window and so on while typing fast is incredibly distracting.
Please could you add an option to delay syntax checking until the cursor leaves the current line?
Squiggles constantly appear while typing, and if I type something with a string literal, like s = "Total: ", the rest of my code goes red until I close the quotes! It's very distracting.
Thanks.
Need info on the purported hang that is happening.
May I respectfully suggest that delaying syntax checking until the cursor leaves the line being edited will make the hanging problems moot? The two disparate issues on this page will be simultaneously resolved by delaying the syntax check. Thank you.
Closing this issue as we've seen no reply to the request for more information. If you are able to get the requested information, please add it to the issue and we will retriage it.