VS2022 - Input issues - c#

Either something has come undone in my brain overnight, or there has been a change to my instance of Visual Studio that I made by accident. I was running v17.3.1 and just updated to v17.3.4 to see if it would fix the issue, but it has not.
For the last few years of pushing out lines of sub-optimal code, I have gotten a space when I pressed the spacebar and a period when I push the period button. I use intellisense a great deal, to the point that when I want to log something, I type logger.in[tab] and I get logger.LogInformation written, waiting for me to type what I want logged.
This morning, my code was way worse than usual. I wasn't getting spaces or periods being typed to the screen. Initially, I thought it was my keyboard, but a quick test showed that my keyboard was fine. Then I noticed that when I would press either the period or spacebar buttons, the intellisense would complete the selection but not insert the space or the period.
Even trying to create a new variable is painful. Typing string[space]myString leaves me with stringmyString in the IDE.
Double tapping the space or period button feels really unnatural to me. Does anyone know what options I may have accidently changed, or how I can get it back to how it was working yesterday?
Thanks in advance.
EDIT: I thought I had fixed it with Edit -> Intellisense -> Switch between automatic and tab-only Intellisense completion, but then I had to double click on the autocomplete that I wanted for it to insert it.

You can open the visual studio installer and Repair the VS it will solve the problem.

This issue was caused by the Telerik extension, in my case "Progress Telerik UI for Blazor". This was reported to Telerik, who quickly published a new version.
The new version of the extension (2022.3.921.3) fixed this issue.

Related

C# Intellisense auto-completion just stopped working

I can still see the recommended completions but I used to just be able to hit enter and it would fill it in, now I have to manually click down on my arrow keys and then hit enter. It's slightly annoying after hours of it.
I already tried turning the intellisense on and off in the options tab.
This does Happen a lot to me to. I recommend that you turn it off, And restart your computer. Once your computer is on, Just turn it back on. This fixed it for me, and I hope that it fixes for you.

Visual Studio 2015 C# when typing it keeps going gray?

Whenever I attempt to write in VisualStudio2015 this occurs, where when I try to write, it works out fine for 1-3seconds, then the line I write on goes gray. It does not matter where I position my mouse, I tried with another keyboard to check if any keys were stuck, did not help.
This issue started to occur when I upgraded my PC to Windows 10. Tried several restarts etc.
Please help. This really gets annoying when trying to code :/
I am very bad at explaining my issue here, so please watch this gif to understand. Basically whenever I try to write, that line I am on grays out, leaving me unable to do so: https://gyazo.com/688a5660b29a3d93c0bb426715bcf038
Issue shown
After almost a month I found out the issue was that my CS:GO was opened meanwhile, and it somehow interferes with my Visual Studio and other programs. Thanks for your help though.

Visual Studio shortcuts in VS 2010 and VS 2012

In in development experience, strange thing I am finding having a PC in a Bank and 3 times it has got errors and changed, and now I am finding issues in VS editors, that for example, short cuts like CTRL KU for uncommenting, and commenting multiple lines together doesn't work properly and my fast typing hands using such short cuts find it difficult to perform activities.
Also, I couldn't do "Undo" of code changes which is very very scary as I used to do a lot of code changes and save and run and again I used to successfully undo everything even though its saved. But I am finding these all not happening in this PC/organization for VS.
I tried googling out for any settings to enable for these features, but futile, as I see not much settings on these found. Could someone please help me out?
Under visual studio
GO to the Tools> Options
A window will pop up. Under Environment choose keyboard.
Make sure visual C# 2005 is selected.
For Comment/Uncomment in your xml file. Make Sure following settings are present there
You might have noticed that "Use New shortcut in" is "Global". In your case it might be something else.
Do the same for Edit.commentselection

Monodevelop crashes when I type the letter "o" instead of an integer

Working with Monodevelop has been a nightmare overall. But among all the crashes, I have been able to recreate one of them reliably.
It seems like when I type "o" (the letter) when Monodevelop expects me to type an integer it will always crash.
Examples:
if (spriteRenderers.Length == o <----*CRASH*
for (int i=o <----*CRASH*
Now, of course, this typically only happens when I've made a mistake, but it does seem to be causing the crash.
And by "crash" I mean that Monodevelop stops working, and I get an error message from Windows asking if I would like to force quit the application. Upon re-opening Monodevelop it shows a blank white screen (every time).
The only fix I've found for the white screen is to delete the "Assembly-CSharp..." files in the project folder and then resync the Monodevelop project in Unity3D. I sometimes have to repeat this up to 10 times before Monodevelop will work again, and about half the time I lose a significant amount of work as a result.
Has anyone else experienced something similar? Any ideas on how to prevent this type of crash?
PS: It also tends to crash a lot when I'm typing "default" within a switch statement, but not every time like the "o" instance above.
If typing a specific letter crashes monodevelop there's certainly something going totally wrong here. First, confirm whether typing 'o' crashes monodevelop anywhere in any situation. Because I find it hard to believe that it crashes only when you type o where 0 is expected - because how would monodevelop know what is "expected" in a given situation? So unless that is confirmed, I assume this is not what is actually going on but rather something that you've came to conclude due to confirmation bias (ie it happend two or three times by chance in a situation where you intended to type 0 rather than o).
That said, check if any keyboard shortcut has been assigned to the letter o. You may want to reset keyboard shortcuts to their default. In general you may want to reset all preferences just to ensure monodevelop is using safe defaults for everything. Also check any plugin you may have installed, and disable them if only for testing.
You should also try shutting down Unity, and only run monodevelop. Then create a standalone project in monodevelop (ie C# windows app) to see if the problem also appears in "regular app development mode".
Lastly, upgrade Unity. If you are already on 4.6, get the latest "patch release" from the download page. This might also give you an updated monodevelop.
If all of that does not help, you may want to try Xamarin - the latest version of monodevelop. You can integrate that with unity by installing its Unity plugins, but currently it will not allow you to debug with Unity. In any case it installs itself side-by-side, so you should at least try that to see whether that has a similar problem.
If all of that fails, consider that the problem may be with your system. For instance a tool might have set a global keyboard shortcut on the letter o. A virus scanner or system driver may somehow interfere. Or the whole system is just whacky, perhaps a trojan, a hardware failure, and so on. That is all rather speculative, so at this point it's a matter of trial and error.

Ctrl+K, Ctrl+C is a command no longer working in Visual Studio 2010

I am using Visual Studio and Resharper 8.
For some reasons, my favorite shortcut Ctrl+K, Ctrl+C or Ctrl+D no longer works.
Indeed, the application shows in the status bar the message: The key combination is(Ctrl K Ctrl C ) is not a command.
Any ideas how to reset them?
Many thanks.
Very strange problem. Yes, it is possible to edit the command in Visual Studio. Select Tools and then Options. Once the window is shown, select the Environment option group and then Keyboard, as shown in the picture below:
There, you can edit the shortcuts:
Edit.CommentSelection for commenting a selection (Default shortcut: Ctrl+K, Ctrl+C)
Edit.FormatDocument to format the document (Default shortcut: Ctrl+K, Ctrl+D)
I have had this issue off and on myself in different versions of VS (now VS 2017). I just figured out that it is a combination of two keys to comment and uncomment code in VS.
To comment code: Press Ctrl+K, then also press C while still holding the Ctrl key.
To uncomment code: Press Ctrl+K, then also press U while still holding the Ctrl key.
You can release the Ctrl key after pressing K, then press Ctrl+C (or Ctrl+U to uncomment), but is just easier to press the keys in succession.
I had never noticed the status bar at the bottom of the window stating it was waiting on the second key press (C or U).
Sorry to resurrect a old thread like this but I have had issues with chording since this whole WFH/Covid-19 thing started. When it first happened the only thing that worked was to reinstall VS 2019. It happened again and this time I reset the keyboard setting back to default and it fixed it with out having to reinstall VS2019. It happened again today. Resetting keyboard settings didn't work and I was not in the mood to re-install so I was living with it for a while. It was after I took a lunch break that I noticed that a light on the top right of my keyboard, which is usually on, was off. It's the light for scroll lock. I hit the scroll lock key, the light came back on my keyboard and suddenly all my short cuts were back.
May not be the answer for everyone but if it's intermittent like mine was, it may be this ridiculous key that I have apparently never hit at work...
Visual Studio 2019 here, not using Resharper - CTRL + K, CTRL + C "stopped working".
In my case, the solution was simple.
While editing your files, make sure that you are in the Solution View, not the Folder View.
I also has this issue and found this post, but then realised that ctrl-K wasn't working if code already has a comment within it, Not this is specifically when trying to make a comment in a razor view where there are html comment <!-- --> within the code that needs commenting. This is odd and the first time I have encounter this since the first version of VS.
The solution here is to delete or uncomment that code first.
Faced this issue with Resharper enabled just a few minutes ago in VS2019.
All I had to do was to reset the mappings. No restart required. (Warning : that will reset all your manually added mappings to its default values)
Tools --> Options
Had the same problem with Format.
Follow the directions in the previous post - if Ctrl+K already appears under Edit.FormatDocument, click on Remove and then define it again as Ctrl+K. A warning will come up saying command Ctrl+K was used to clear bookmarks. This may be the root cause, as Ctrl+K is defined in multiple places by default. Once I redefined it, it worked properly.
Select Tools and then Options.Then select the Environment > Keyboard.
In the Keyboard section click Reset.
'Ctrl+K' following with C for comment and U for uncomment while holding Ctrl works. However to simplify and unify the keyboard shortcut to what you are used to you can just change the mapping scheme to something else like VSCode:
'Tools>Options>Environment>Keyboard'
Be sure that you saved the file with .py extension. Otherwise, the software does not perceive the code as command lines and thus does not transfer the lines to comments

Categories

Resources