Visual Studio 2022 duplicate shortcut has changed - visual-studio

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.

Related

Visual Studio pops to the foreground without reason

I am experiencing this weird problem with Visual Studio 2022.
I created the skeleton of a new web application using individual accounts.
I have run the first migration, created some default accounts in the aspnet identity tables and
finally launched the application to test if everything was correctly setup in my PC.
Visual Studio compiles the application without problems and launch the defaul browser (Edge).
The standard Welcome page appears but immediately Visual Studio pops to the front doing nothing.
No errors, no messages nothing wrong. Just the code window here to obscure the browser window.
Now, I switch to the browser window and click on the Login link.
Again, the login window briefly appears in the browser but it is immediately obscured by Visual Studio.
Switch again to the browser, compile the required fields and click on login.
Again Visual Studio thinks that he is the best app on the planet and brings itself on the foregroud.
I have tried to switch to another browser, but the results are the same.
I have tried with an existing application written with Visual Studio 2019, but again the "pop in front of everything" still happens.
I have tried to search for this problem but probably I haven't find the right keywords to represent this problem correctly to a search engine.
I think that probably I have something wrong in the Visual Studio configuration, but it is practically impossible to find something there if you don't know what to look for.
The only option that seems to be related is "Bring Visual Studio to the foreqround when breaking in the debugger" but even after uncheking the option the "pop to front" persists.
So my question is simple. Has anyone experienced a similar behavior? If yes how have you fixed it?
Well, probably this situation is so messed that none will ever see this post.
Nevertheless I would like to share how I have finally resolved the question and leave here a warning for future readers.
The cause of Visual Studio 2022 hiccups is, probably, the import of Visual Studio 2019 settings.
I thought that it was a good idea to set 2022 with the same options used in the last 3 years so, after installing VS 2022
I used this very useful menu (Tools->Import Export Settings) to export all the Visual Studio 2019 Settings in an XML file and I reimported it in 2022.
I thought, if the file is not compatible with VS2022 surely it will abort the import. Right?
No, Visual Studio 2022 doesn't complain during the import of 2019 settings.
But something in that exported file should be very broken.
I have resolved the problem with these steps
Close Visual Studio 2022
Open a command prompt window with administrator rights
Change to the install folder for Visual Studio 2022 and then change dir to subfolder "Common7\IDE"
Finally execute the command
devenv /ResetSettings
After this everything started to work as expected without problems.
I have saved the broken VS2019 setting file and tried to compare it with one produced after the reset,
but they have too many differences to extract something useful to identify the specific problem area

Visual Studio 2019 loses focus when editing code

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.

Visual Studio 2015 Intellisense not working

I have a fresh install of VS2015 on windows 8 and intellisense doesn't work at all (nothing!) in any environment.
I also have VS2013 (with Resharper 8)on the same machine which works fine.
Any ideas before I go through a re-install?
Probably the problem is with ReSharper, I'm running VS2013 and VS2015 on the same machine without any issues.
I would try:
In Visual Studio 2015, go to 'Tools | Options | Text Editor | C# | General both "Auto list members" and "Parameter information" should be checked.
If that doesn't work I would try to disable ReSharper in VS2013 and try to get the normal intellisense working. Same procedure as above if ReSharper fails to restore the settings.
Note: Only do this as a last resort, because it will reset virtually all of your user preferences, including where your toolbars are, environment fonts etc.
I reached here because my intellisense was giving 1000's of errors in the Error List after installing Visual Studio 2015 on a clean Windows 7 machine.
The answers here did not apply to me, but this answer on StackOverflow: Razor intellisense not working in VS 2015, worked for me.
Run this command from the VS "IDE" folder:
devenv.exe /resetuserdata
When I restarted Visual Studio it took several minutes to "prepare Visual Studio 2015 for the first time", and when I reloaded the project all the intellisense errors had gone.
For info, this is how I navigate to the command prompt:
Right-click the Visual Studio 2015 shortcut on the start menu to get the context menu:
Select 'Open file location' to open a new Explorer window:
Left-click anywhere on the white to deselect devenv.exe, then shift + right-click to bring up the extended context-menu, then select 'Open command window here':
Then paste the command: devenv.exe /resetuserdata
When Visual Studio starts, it's been reset:
And when I load project, errors are gone:
Make sure Tools -> Options -> Text Editor -> C# -> IntelliSense -> "Show completion list after a character is typed" is checked. I had installed and uninstalled VS 2017 and that's when IntelliSense stopped working in VS 2015 for me.
How I fixed it:
I went to Tools -> Extensions and Updates and uninstalled every extension I wasn't using. There were only about 3 of these. One I remember removing was "Microsoft Office Extensions", or something like that. I don't have either resharper or Xamarin, which I've seen mentioned in relation to this. When I'd finished Visual Studio restarted itself, and XAML intellisense was back! Relief...
It may be the case that all you need to do is uninstall any one extension, and the resetting that VS does after that fixes the problem.
Further detail:
I don't recall changing anything specifically (eg. installing anything), when this problem suddenly appeared. I suspect it was due to a Windows update. I was really worried about this one!
I tried restarting VS, and restarting my PC, several times without success, and also checked my intellisense settings. I tried the suggestion of unchecking them and checking again.
My F# code had also lost intellisense. C# was fine, except for XAML.
It was in all VS2015 projects.
Version: Visual Studio 2015, Windows 10. January 2018.
I might be kind of late for the party, but hopefully this helps out anyone.
Please note, the below is just one possible cause for the issue described in this topic.
Your issue might be that you have one project/library referencing the other, but the Target Frameworks are different.
Make sure the frameworks are compatible and see if intellisense picks up your using references, etc.

Visual Studio crash at start-up

My Visual Studio began crashing at start-up. In my search for finding a remedy, I found these two suggestions, but neither worked for me:
Launching Visual Studio while running in safe mode, and
Running repair on Visual Studio.
However, I found that if I logged into a different Windows account, Visual Studio was able to run from that account without crashing.
Here is an error code that that I observed in the crash report:
LCID: 1033
Can anyone provide a solution for returning my Visual Studio to working order?
For me it turned out to be the plugin that GitExtensions installed into Visual Studio 2013.
-- UPDATE: try this before uninstalling GitExtensions
#Enceradeira proposed in the comments to uncheck the Show current branch in Visual Studio option. In GitExtensions, you get there via Tools -> Settings -> Appearance:
-- END OF UPDATE
After uninstalling GitExtensions and reinstalling it with all VS plugin unselected my VS runs smoothly again.
I even put together a blog post about this issue because it bugged me so much.
Since you're able to run with another user login, something may be wrong with your local settings, you can try to reset them: devenv /resetsettings in Start menu -> Run.
Warning: this will restore visual studio to default settings.
In my case VS used to crash on a single solution. I resolved the problem by deleting the respective solutions's user file: SolutionName.suo
My colleague recently experienced a problem with Visual Studio 2013 crashing on start-up. Unfortunately, we found that the approach recommended in the answer by #Arun M did not solve the problem:
devenv.exe /ResetSettings
...however, using a different command line argument did:
devenv.exe /ResetUserData
An easy way to run devenv.exe is via the Visual Studio command prompt; on Windows 10, it can be found here:
Start Button => All Apps => Visual Studio 2013 => Visual Studio Tools =>
VS2013 x86 Native Tools Command Prompt
For more about these command line arguments for devenv.exe, see this answer to this related question: How do I truly reset every setting in Visual Studio 2012?. ⚠ In particular, please note the cautionary statement in that answer about the /ResetUserData command line argument!
Try to run VS as administrator. That's necessary in my case.
If coincident to these Visual Studio crashes you are getting "Heap corruption" (Exception code: 0xc0000005) errors in your Windows Application log (Faulting module name: WindowsCodecs.dll), here is something worth checking into: A faulty WIC component within Expression Blend can cause ALL versions of Visual Studio to crash upon launch, as well as cause Internet Explorer to crash upon visiting many, if not most sites. Even though Microsoft distributes this component, they call it a "non-Microsoft component". As such, a Visual Studio reinstall won't fix this,, an OS reinstall over existing Windows installation won't fix this, and a system file integrity check won't detect it.
If my case, the misbehaving codec was "C:\Program Files (x86)\Microsoft Expression\Common\Imaging\4.0.360.0\PSDCodec.dll", and simply unregistering this component got my Visual Studio working again from consistent startup launch crashes.
I post this in hopes this solution to one source of Visual Studio crashing might save others from the $500 Microsoft support incident fee and week of downtime this caused me.
I just changed the windows language in the bottom right to "EN", then started as admin. And it worked, interesting..
I had the very strange phenomenon that both Visual Studio 2010 and 2013 on a Windows 7 machine crashed when run in a remote desktop session, started from a Windows 10 pc. Debugging the crash showed a CultureNotFound exception. It was caused by regional settings on the Windows 10 pc, which could not be translated in something understood by Windows 7. I had language English(Belgium) with an Azerty keyboard. I added and selected English(UK) with an Azerty keyboard and the crashes disappeared. No other programs suffered from this.
For me it was being caused by Web Essentials and I was able to resolve by disabling it, restarting VS, enabling it back , restart again. Works now.
I had a crash on startup (or soon after startup, before opening any solution) occurring in git2-msvstfs.dll, caused by placing a 3GB temp file into a directory within my solution. Deleting the file fixed it.
Once I accidentally pressed a random key combination (maybe something like ctrl+', but I didn’t realize I was holding ctrl down so I forgot what keys I hit by the time I realized something bad had happened) that resulted in VS Professional 2017 15.3.5 crashing within half a minute. After relaunching, I found that VS would be interactive for a few seconds before it would crash within half a minute. It was really too fast for me to try to figure out what I had accidentally activated or for me to disable it before VS would crash. Also, it would even crash if I didn’t open any solution, so I figured it was not something that deleting a .vs (per project/solution Solution Explorer/open files state) folder would fix.
To fix, I followed Arun M’s comment and renamed my %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_3f4d04be folder. You will need to adjust the path for the edition/version of VS that is crashing. On my machine, I think 15.0_3f4d04be is Professional and 15.0_0fed6c59 is VS Community Edition. You’ll probably have to guess based on the folder’s modification timestamp which is probably going to reflect the date you last used that edition of VS.
After renaming the versioned dotfolder, VS launched without crashing. It started with default settings but automatically restored some of my settings through the cloud sync stuff after a minute of running and it even remembered my account information so I didn’t need to sign in.
I did not need to rename my %LOCALAPPDATA%\Microsoft\VSCommon folder (which Arun M had also suggested).
I had a similar problem, both VS2015 and VS2013 would crash at startup. Tracked it down to an application I installed which put .net 4.7.2 on the system. Once i removed that app, removed .net, and reinstalled .net 4.6, Visual Studio started working again.

Visual Studio 2008 Blank Tool Window

I have a blank property window that I can not get rid of in Visual Studio 2008 SP1. I have tried every thing to get rid of it.
If I close it it shows right back up after going into debug mode or restarting visual studio. I have tried every thing to fix all the way to reinstalling VS with no luck.
Does any one have a solution for this?
Use the following fix:
Close all instances of Visual Studio Navigate to the following directory (I am using 2008 – for a different version change the 9.0 to reflect the correct version number/folder)
"%userprofile%\Local Settings\Application Data\Microsoft\VisualStudio\9.0".
You should see four files:
toolbox.tbd
toolbox_reset.tbd
toolboxIndex.tbd
toolboxIndex_reset.tbd
Move these files to another folder (or, if you are very brave, delete them altogether. Note, this is very much a case of “Worked on my (colleague’s) PC” – do this at your own risk. Restart Visual Studio and hey presto, your Toolbox should be back to where it needs to be. The user in question did not have any custom items in his toolbox so I can only assume that the fix reverted the toolbox to the original Visual Studio state.
Click Window, Reset Window Layouts.
If that doesn't help, click Tools, Import and Export Settings, Reset all settings. (But backup your current settings)
One thing to try is via the Visual Studio 2008 command line you can run the following command.
devenv /resetsettings
This will restore to factory settings, this could clear up the issue, re-install wouldn't do this for you.

Resources