Visual Studio 2019 loses focus when editing code - visual-studio

I'm using VS 2019 for Unity development, and sometimes when I'm writing code, my input randomly dissapears.
Example:
I'm typing:
private
but in the editor after I typed
pr
My other keyboard input dissapears and I have to click inside the editor to fix it. This bug is driving me crazy so I hope someone also had this and found a solution for it.

It was caused by an extension as #Alex K. mentioned. (Perforce not yet made a vs 2019 plugin)
Update they made one.

Related

Visual Studio 2022 duplicate shortcut has changed

Microsoft Visual Studio Community 2022 (64-bit)
Version 17.0.6
I have been using Ctrl+D for years in Visual Studio however today duplicate no longer works. This has been working in vs 2022 for several months.
When I check the edit menu it shows Ctrl+E,V
I also noticed Alt+Up Alt+Down no longer work to move lines.
Any ideas how these shortcuts can be reset or what may have caused them to change?
I managed to fix the issue by clicking reset mapping scheme.
Tools
Options
Environment
Keyboard
Reset
No idea how they got messed up in the first place because I have never touched these settings. Perhaps it was an extension.
My scheme still showed (Default) before clicking reset.
I'm using version 17.2.3 of Visual Studio Community. Going in and doing a reset didn't do anything for me. I found that Ctrl-C, Ctrl-V was the only thing that worked on a WinForm to duplicate either a single control or multiple controls.

Double Click in Visual Studio 2013 Update 3 Solution Explorer Not Working

Until quite recently it was possible to click on a method in the VS 2013 Solution Explorer and have the method appear in the code window. That does not appear to be working anymore. Any idea of how to enable this functionality? It was quite useful. For example, in the Solution Explorer view below, clicking on either addBlanks or formatSql would move the code window to the method in question.
It turns out that I have more information about this problem. I completely uninstalled VS 2013 Pro and reinstalled it. Somewhat predictably the problem went away... However, I was getting an error message about the NuGet package manager not being properly installed. To fix this I removed and reinstalled the NuGet package manager. That did resolve the NuGet error message, but the problem with clicking on methods in the Solution Explorer came back. Finally I removed and reinstalled VS 2013 Pro yet another time and now clicking on methods in the Solution Explorer works correctly.
Somehow the original problem reflects some combination of VS 2013 Pro, NuGet, etc.
It is still possible to quickly display a source code file. I am using Visual Studio 2013 Express Update 3.
It might make a difference to highlight/activate the right-most code preview symbol in the Solution Explorer panel:
It is located to the right of the properties screw-wrench symbol.
If this symbol is active, a single click on a file name is sufficient to get the file displayed in the code view. The same applies to methods. Double-click also works, when the preview symbol is not highlighted.
This turned out to be a bug in Visual Studio 2013 Pro Update 3 (and perhaps other versions). Microsoft recognized this bug and has fixed it in VS 2013 Pro Update 4. See https://connect.microsoft.com/VisualStudio/feedback/details/1001072/double-click-in-visual-studio-2013-update-3-solution-explorer-not-working for a discussion and Microsoft's resolution.

Visual Studio removes line break on start

I have the problem that Visual Studio (or maybe Resharper?) removes line breaks when I try to start my application. This happens in a way that when I press F5 or click on the run button with the mouse that a line break at the line where the cursor was the last time will be removed which is extremely annoying.
I have not tried so many things yet because I really don't know where to start. I never experienced this problem before and was always working with the same setup:
Visual Studio 2010
Resharper 6.1.1
Other plugins I use but which were installed after the problem (so I think they should not be related to the problem):
AnkhSvn
TeamCity
Example:
Before:
public void test(){
int x = 5;
}
After running the solution:
public void test(){
int x = 5;}
Edit: This issue seems to be related to Resharper - so hopefully they will be able to fix this issue as I never had this with any previous versions. (http://devnet.jetbrains.net/message/5456038#5456038).
This is a problem with Dexexpress Dim#ster patch. If you delete licenses.licx and compile in the source code. Not happend. The problem is when you open a form and licenses.licx is created again. Is you uninstall the patch this dissapear. But I dont understand why deactivating Resharper the problem gone too. But without patch and resharper + devexpress trial working fine.
The problem is the patch.
I'd do this before reinstalling:
Uninstall All plugins
Type devenv.exe /resetsettings
Now try and use your code as described without plugins. Slowly add back your plugins if its ok and check after each is installed if the problem manifests itself. if not it was some setting in one and its now gone, if it comes back after one is installed you have a good thing to look at.
Just blatting the environment means you'll never find out whats causing it, which would annoy me :)
Have a look at ReSharper's Braces-settings: http://www.jetbrains.com/resharper/features/code_formatting.html#Code_Style_Configuration_and_Sharing (1st screenshot). Try changing those settings according to your needs.
If you're a member of a team, maybe someone else enabled sharing of "code style settings". See the previous link for that, 2nd screenshot.
Does it also occur when you just build the project?
In the build options try doing clean project, then open close the program. After this do a rebuild project. Also make sure the project is in debug mode for testing =)!
Delete the settings resharper in solution. Helped me.
I know that this question is a little bit old. But this may help anyone who encountered the same error with resharper and devexpress controls. I've tried all the above instructions, but the nothing works. BTW I'm using visual studio 2017 with resharper 2017.2.2 and devexpress 17.2.3
This what works for me.
Open build&run window in resharper. Click Resharper>Windows>Build&Run to open the the window then select "Enable 'Resharper Build'. Open any file in text editor and move the cursor at the end of any line of codes or on any empty line and try to build the project to see if it works.
Hope this will help.
At this point I would suggest uninstalling and reinstalling VS. Then add ReSharper and any of your extensions one at a time.
I had the same problem. I use this prebuilt-event script
break>$(ProjectDir)\Properties\licenses.licx
I have ReSharper 10.0.2, VS2013, DevExpress Components and VisualSVN.

Visual Studio text editor does not recognize F# source?

I have got the following problem with F# code recently: almost the complete code is underlines with curly red lines (indicating problems) and whenever I hover with the mouse cursor over any word the pop-up appears with the message "Unexpected token". IntelliSence doesn't work either.
Nonetheless if I start the project it is executed without any problem.
This happens both to already existing F# files and to newly created F# projects. I remember it was working just 2-3 months ago!
I tried to deactivate all possible extensions but it doesn't help.
Any ideas?
I get this too. Sometimes, simply exiting and going back into VS helps. When I tweeted the problem, Don answered with this:
"do you have "python tools for visual studio alpha" installed? if so, uninstall it or apply the hot fix"
This wasn't relevant to me (as I haven't been anywhere near python) but I'm posting here in case it helps you.
-- Edit: here's a link to the patch, thanks to Alexander Galkin: http://pytools.codeplex.com/workitem/599
I haven't seen this situation before but here's a guess at why it's happening and how you might cure it.
Visual studio works on a system for plugins. Even the stuff that is "native", like the C#/F#/VB.NET project systems, are just plugins that uses the visual studio shell. It looks like the F# plugin has been damaged in someway.
If this is Visual Studio 2010:
You might try opening the visual studio installer and trying a repair installation or deactivation and reactivating the F# project system
If this is Visual Studio 2008:
You might try uninstalling and reinstalling the F# plugin

Scrolling in Visual Studio causes text to become unreadable

Since the past week I'm having a very bothering issue that blocks me from using Visual Studio.
For instance, here's what I normally see:
But as soon as I scroll a bit down (either with the arrow key, mouse wheel or the scroll bar), this is what I get:
As you can see, part of the frame seems to be "locked" in the screen.
The only way to see it right, is to make some other window cover VS's window, then going back to VS I see it right.
This is what I have tried (checking if the issue was solved after each step):
Check for updates
Repair VS2010
Remove R# and any other extension/add-in
Reinstall R# and any other extension/add-in
Remove VS2010 and any related software
Reinstall VS2010 + SP1 and updates
Remove any other unused software
Remove any recently installed/updated software
Run CCleaner
None of these steps solved the issue.
This happens only with VS2010, regardless the project or solution I'm opening.
I think you need to start looking beyond Visual Studio for issues. The next thing I'd look at is your graphics driver. Make sure you have the latest available version.
I have the same problem with VS 2012.
Scrolling up and down, does not refresh sections (rectangles) on my text editor view.
(unfortunately I've not enough reputation to post a screenshot.)
I managed to workaround it in VS 2012, by floating the editor.
i.e. Right Click on a file tab / Float All.
Otherwise I tried everything posted here, without any luck.
Hopefully someone out there knows how to undo this magic.
I had the same problem and it was due to the DameWare Development Mirror Driver.
I disabled it and the problem went away.
I'm having the same issue in VS 2015 pro.
Setting the editor windows to float fixes the problem which definitely looks like a bug in visual studio.
I'm on a Citrix virtual Desktop and the problem appears to be that a "column" of the editor (on the left side) is not redrawing properly after scrolling right, left, or down. For some reason scrolling up is fine.
For me, using VS 2013 Pro, the cause was having the JAWS Screen Reader installed, which, ominously, included a video interceptor. Once uninstalled VS started working normally again.
I had this same problem and it turns out it wasn't a graphics driver issue. The company I work for uses software that acts like a virtual monitor to remotely log into our PCs to install software and fix problems. It turns out that this extra virtual monitor was the problem. Disabling it fixed the scrolling in Visual Studio.
I had the same problem in Visual Studio 2017. When I changed the color theme to 'dark' the problem seemed to be fixed

Resources