Visual studio reopen editor after debugging - visual-studio-2013

I started debugging (some C# MVC application) and a lot of windows pop-up. So I closed all of them. But I probably change something.
Now when I have open some files in editor and press Debugging - it close them. After Stop debugging they are still closed. When I try to double-click on file in Solution explorer - nothing happen. Right click and Open - nothing. Only when right-click - Open with... and select another editor, it will open. Sometimes it ask that file is already open and if I want to close him. So it is probably open somewhere.
Any ideas how to fix it? I tried reset all setting, imported old environment, restarted Visual Studio and also computer and nothing helped.
Thank you for help

You can try to Reset Window Layout from the main Window menu in normal and debug modes.

so finally I installed new VS 2015 and everything works as normal

Related

Updated toUnity 5.4.f2f - VS Autocorrect stopped working

I reecently updated my Unity editor from 5.1 to 5.4.f2f, and my IDEs started misbehaving. I use Visual Studio 2015 Community, and when I updated its Intellisense stopped recognizing all Unity terms. When I open scripts from the Inspector, VS opens nothing first, and open the script with broken Intellisense if I try and open it a second time. Monodevelop also cannot recognize any Unity terms. When I try and "Open C# Project," Visual Studio opens nothing.
The Unity editor also keeps on mentioning in the Inspector that GameObject scripts are missing too.
I'd really appreciate some help here guys. Keep in mind that I've also accidentally pressed the "Publish" button at the bottom of the VS window, but It was after the issue surfaced, so I'm not sure if it has any ties to this.
I think I solved the Problem.
It involved manually opening the Unity project in Explorer and opening the projects .sln file.
Apparently, this is a Windows OS flaw.
I got this answer from This link

Backspace doesn't work in Visual Studio

I keep getting a very annoying problem in Visual Studio. When I try to delete some text by pressing backspace it doesn't work. Why is this? What is going on? Sometimes I have to close and open Visual Studio to make this problem go away but I just tried that right now and it didn't work. Backspace works in Notepad in case you are wondering.
In Visual Studio go to:
Tools
Options
Environment
Keyboard
Find "Edit.DeleteBackwards" command.
In "Use new shortcut in:" dropdown select "Text Editor".
In "Press shortcut keys:" click backspace so it would show "Bkspce"
Click "OK".
Backspace should start working for you again.
This seems to happen to me when I open a solution and there are files already open. I used to close the files, then close and re-open the solution to fix it, but now I just hit Alt + Enter.
Here is the blog where I found this trick.
I solved this issue resetting keyboard mapping scheme.
Tools -> Options -> Environment -> Keyboard -> Reset.
A quick fix for me is to simply open any menu from the menu bar. Once the menu is closed the non-character keys start to work again.
Except for the above methods.
You should also check the shortcut key settings:
File -> Preferences -> Keyboard Shortcuts -> 'Then check the item: deleteLeft'.
I get this from time to time in VS2010 as well and simply just using the mouse to change tabs/files seems to always fix it now. Nothing more.
This method is working at 100%.
Go to "File-> Preferences -> Keyboard Shortcuts" and search for deleteLeft and add keybinding "Backspace".
Odd that this is still an issue even in VS 2019. Both the backspace and delete keys didn't work. Quick fix, I just ran the project and it seemed to give it the kick it needed.
All I did was exit visual studio and restart it.None of the above options worked for me.
In my case the problem was the "When" Condition in "File-> Preferences -> Keyboard Shortcuts".
I removed "textInputFocus && !editorReadonly" and it works now as expected.
I'm looking forward to the side effects ;).
Try resetting your Visual Studio Settings
Go to :
All Program > Visual Studio 20xx > Visual Studio Tools
Run Developer Command Prompt for VS20xx as Administrator and this command:
devenv.exe /resetsettings
A quick work-around for me is locking the pc (Windows+L) and logging in again.
You can reset keyboard mapping scheme like this
Options => Environment => Keyboard then select (Default) in the comboBox and click Reset button and then Ok button to confirm
Visual studio 2019 : Keyboard mapping sheme
Tested in Visual Studio 2019
This problem happened for me when I used a different version of resharper at home and then took that project to my employment. Backspace works for me now after I deleted the bin and obj and resharper directories.
I have this problem after I install Vim, uninstall Vim Backspace works fine.
When this issue has happened to me, I've found that hitting delete or backspace is unresponsive only within a portion of my code. This portion happened to be some code that I've pasted in from the internet somewhere.
To fix this issue, I cut out the recently pasted problematic code and then pasted it into a text editor like Notepad++. Then copying and pasting that same code out of the text editor and back into Visual Studio fixed the problem.
Using Visual Studio Community 2019 (16.4.3)
I just searched this issue because I could click in my document, type, et cetera, but I could not use backspace, delete, ctrl+z, or the arrow keys.
Opening the "File" menu, I noticed the Save option referred to a different file. I checked that file and found that all of the keys that seemed not to work were actually editing that other file.
Switching between the file in half-focus and the file I intended to edit worked and, luckily, undo was able to fix the file I unknowingly butchered.
If you wound up here, check your "File" menu to make sure the correct file is referenced, since the fix is quick and easy to try.
Just had this exact issue (along with 'Enter', 'Ctrl+X', 'Ctrl+C', 'Ctrl+V', 'Ctrl+Z' keyboard mappings seemingly doing nothing) in the latest VS preview version below:
Microsoft Visual Studio Professional 2022 (64-bit) - Preview
Version 17.2.0 Preview 6.0
The fix for me was to move to another tab (I had multiple open) use the backspace key which worked fine, then move back to the original tab with which it wasn't working, save the file (as it had outstanding changes) and then I found backspace and all other shortcuts then worked!
I can only think that VS got in a locked (to keyboard mappings) state for that particular tab.
A few notes on this:
I knew it wasn't a keyboard issue as I was able to use those
keys/mappings fine in other apps.
I found closing and reopening VS didn't work.
Also resetting the keyboard mappings (through Options menu as others have described) didn't work.
I had multiple tabs open.
Resharper was disabled.
I just had this happen in one instance of Visual Studio 2022, caused by the debug settings editor window being open in another instance of Visual Studio 2022 in the background where I couldn't see it.
Closing that window resolved it.
I've had this issue for a long time. I'm not sure what causes it, but Alt + Enter works.
The extensions that I'm running include AnkhSVN, MySQL Tools, and Productivity Power Tools.

Open the start page in Visual Studio after closing a project?

When you start Visual Studio you get a start page with all the latest projects in a list.
But when you've opened and closed a project, how do you open that start page again?
(Without restarting VS)
Visual Studio 2010-2015
There's a menu item View -> Start Page
Additionally you can choose to keep the start page open when loading a project. There's a check box below the projects list for that.
(Tested in VS2010, VS2012, VS2013, VS2015)
In current versions, you can also use the Quick Launch (Ctrl+Q) to search for the command
(Just type "Start Page" in Quick Launch)
Visual Studio 2017
There's a menu item File -> Start Page
You can configure the behavior of the IDE on startup via Tools -> Options -> Environment -> Startup.
In Visual Studio 2017, the start page will open automatically when the solution is closed. As far as I know, this cannot be changed directly in the IDE but there's an extension that adds that feature. See this question on SO and this VSIX-Extension (but this will disable the start page completely - if you try to open it manually, it will be immediately closed automatically)
You also have the Start Page icon in the toolbar :
In VS2013 by default I do not see the "Start Page" command in the View menu but adding it was simple. The icon also looks different in VS2013.
Right click on the toolbar and choose Customize... at the bottom then go to Commands
Switch to Toolbar/Standard and then click the Add Command button an locate the View group on the left
Finally locate the Start Page item and click OK.
In VS 2017 the new location for viewing the start page
is under the 'file' menu. as appears in this link:
https://developercommunity.visualstudio.com/content/problem/4603/view-start-page-menu-item-is-missing.html
In VS 2017 it's in File->Start Page.
By now there is an extension exactly for that purpose:
https://visualstudiogallery.msdn.microsoft.com/e64380ab-e3aa-4ac7-aa11-95719c5c91e9
I tried it an it works like a charme in VS 2015 :)
To get start page in visual studio 2017 Go to File -> Start Page
In case of Visual Studio 2019, go to File->Start Window.
It used to be automatic in VS2008 - Anything you had open outside of any solution/project (including the start page) would close when you opened a project/solution, then when closed that product/solution it went back to what was open before. That is how it should work, they broke it in VS2010. So all the prior VS users searching for the answer - there is none - technology continues to regress.
You can create custom shortcuts in VS under Tools > options > Environment > Keyboard.
makes it super easy to reopen the start page.
Here is my setup if you get confused
custom start page shortcut
In VS 2022 it's in Tools->Option->Environment->General->On Startup
Screenshot

Visual Studio 2010 Bookmarks problem

When I create bookmarks into editor code with Bookmarks window, work for a while adding methods, removing statements etc. and then I reopen the IDE the line number for bookmarks are wrong...
Any idea?
One way to work around this problem is to not close visual studio before finishing writing your code. The bookmarks will update if the program is still running, but will show the wrong lines if loading a save file.

Is there anyway to tell Visual Studio not to open all the documents when I load solution?

When you open a solution in Visual Studio 2008 (or ealier versions for that matter), it opens all the documents that you did not close before you closed Visual Studio. Is there anyway to turn this functionality off, or a plugin that fixes this behavior? It takes forever to load a solution with 50 files open?
Have you tried deleting the .suo file?
It's a hidden file that lives beside your solution (sln) file. suo is "solution user options", and contains your last configuration, such as what tabs you left open the last time you worked on the project, so they open again when you
reload the project in Visual Studio.
If you delete it, a new 'blank' suo file will be recreated silently.
You can automate the process of closing all the files prior to closing a solution by adding a handler for the BeforeClosing event of EnvDTE.SolutionEvents -- this will get invoked when VS is exiting.
In VS2005, adding the following to the EnvironmentEvents macro module will close all open documents:
Private Sub SolutionEvents_BeforeClosing() Handles SolutionEvents.BeforeClosing
DTE.ExecuteCommand("Window.CloseAllDocuments")
End Sub
Visual Studio 2008 appears to support the same events so I'm sure this would work there too.
I'm sure you could also delete the .suo file for your project in the handler if you wanted, but you'd probably want the AfterClosing event.
From Visual Studio 2017 Update 8 there is an option in projects and solutions which you can use to enable this:
ALT-W-L
That's the key combination to close all open tabs, which can be pressed before closing a project, unless you prefer clicking Window | Close All Documents before closing the project.
--Gus
I dont think there is an option for this (or I couldnt find one) but you could probably write a macro to do this for you on project open.
This link has some code to close open files which you could adapt:
http://blogs.msdn.com/djpark/
I couldnt find the answer to this particular question but a good link for ide tips and tricks is:
http://blogs.msdn.com/saraford/default.aspx
Alternative answer:
Before you close your solution, press and hold Ctrl+F4, until all windows have been closed.
VS attempts to save the last known view. Other than the scripts mentioned above you can manually close all documents before exiting VS

Resources