Keyboard shortcut to toggle between Markup and Code-behind - webforms

In vs2012, the f7 key toggles between the Markup and the Codebehind of aspx/ascx/masterpage files. Vs2013 used to behave the same way before I reinstalled my system. Now it will only go from Markup to Codebehind but never the other way. I can get it to switch to the HTML Designer but I'm not interested in that.
I tried to fix it with no avail. Here were my steps:
Create a brand new Webforms project to ensure that corrupt aspx and aspx.cs files were not the root of the problem.
Goto Tools > Options > Enviroment > Keyboard; there I set unique key bindings for ViewCode, ViewMarkup, and ViewDesigner.
Goto Tools > Options > HTML Designer and check off "Enable HTML designer" and "Auto keyboard switching";
Restart Visual Studio
I also tried importing my Keyboard settings from VS2012 into VS2013.

I decided to import ALL of my settings from VS2012 instead of just the keyboard shortcuts and that solved the problem. This at least shows it is possible.

Related

In Visual Studio 2017 is there a way to enable the Source Control dialog from a Tab?

When working in Visual Studio 2017, it would be handy to have access to the Source Control dialog to "Undo Checkout" when you right click on the tab for an open document. We frequently work with complex solutions where files we work on concurrently reside in many different folders. Finding and opening the folder for an opened file is annoying when the task I need to perform is an "Undo Checkout".
Reviewing these preferences, I don't see anything that would enable this type of feature from opened tabs.
Tools > Options > Environment > Tabs and Windows
Tools > Options > Source Control
Is what I'm requesting an available feature, and if so how can I enable it? Thanks.
I don't know of any way of altering the tabs in VS2017 without maybe a plug-in extension.
However, you can right-click on the editor window (where the code is displayed) and in the displayed context menu is a Source Control submenu which will offer the option to "Undo" if changes are pending.
Also, You can add the "Team Explorer" window to one of the sidebars or as a tab in an existing pop-out. I like to have Properties, Solution Explorer, and Team Explorer tabbed together and displayed to the side of the editor work area.

Cannot import window layouts into VS2013 from VS2012

I'm having trouble importing window layouts from Visual Studio 2012 to Visual Studio 2013.
I'm getting this error message, when I try to import *.vssettings file exported from VS2012 to VS2013:
Your settings were imported, but there are some warnings.
Warning 1: Category 'Window Layouts'
({eb4ba109-a9db-4445-bd09-e7604bcdce84}) could not be migrated because
the author of the category did not provide support for migration.
I had same problem with importing window layouts from VS2010 to VS2012. I thought there was some kind of breaking change that prevented direct importing, so I just recreated my preferred window layout in VS2012.
So basically I have to recreate my preferred window layout once again in VS2013. Does anyone have any suggestion how to solve this?
By the way, I've tried to reset settings in VS2013 (Tools -> Import and Export Settings -> Reset all settings...) and then try import settings from VS2012, but no change.
Edit: what's weird, is that I can create a window layout in VS2013, export it, reset settings in VS and then import back settings with that window layout and the import is successful (imported window layout gets applied).
Does this mean Microsoft completely dropped support for migrating window layouts from one version of Visual Studio to another? I would understand, if the imported window layout contains layout information for non-existing windows (like VS2012 -> VS2010 import). But standard way of migrating settings (to newer version of software) should be supported, right?
It's a bug in the Visual Studio settings migration feature, the window layouts are actually directly compatible between VS2010/VS2012/VS2013. The solution is actually really easy: Manually export just the window layout from VS2010, change the version number in the file, then import it into VS2013, and it'll work.
For the step by step solution to this problem, do the following:
Open Visual Studio 2010
From the main menu, select "Tools->Import and Export Settings"
Select "Export selected environment settings" and press "Next"
Select only the "General Settings->Window Layouts" option from the settings tree, and press "Next"
Name the file how you want and select "Finish"
Open the exported settings file in a text editor, and change the second line from this:
<ApplicationIdentity version="10.0"/>
To this:
<ApplicationIdentity version="12.0"/>
Or set the version string to 11.0 for Visual Studio 2012.
Open Visual Studio 2013
From the main menu, select "Tools->Import and Export Settings"
Select "Import selected environment settings" and press "Next"
Save your current settings if desired, and press "Next"
Select "Browse" and locate the modified settings file, then press "Next"
Press "Finish"
I came across this question while searching for a solution myself. I couldn't find an answer anywhere, so hopefully this will help anyone else who comes across this problem.
EDIT: I've now seen a case with a colleague where there was something in his window layout settings that wasn't directly compatible with Visual Studio 2012, so this solution failed for him. If you get errors migrating your window layout, I'd suggest resorting to "slicing and dicing" the window layout to narrow down which part(s) are causing the error.

Maximise XAML in Visual Studio 2010 designer

The Visual Studio designer almost never works with any of my views/pages and I am tired of waiting for it to decide if it is going to (inevitably) fail or not.
I dont even use the VS designer, so I am looking for a way to simply have the XAML section expand by default (without having to open the document in the first place).
Is this even possible?
It's possible just check the "Always open documents in full XAML view" option in the VS2010 settings..
Tools -> Options -> Text Editor -> XAML - >Miscellaneous -> "Always open documents in full XAML view"
Go to
Tools > Options > Text Editor > XAML > Miscellaneous
There us an option for “Always open documents in full XAML view”. Check that box:

"Apply Style" window is lost in Visual Studio 2010

In visual studio 2010 Ultimate I was working with Apply Style window and I temporarily closed this window by clicking X on it. Later when I look for it under View > Apply Style (its usual place) it wasn't there. devenv /resetsettings not seem to be working for me. any idea on how I can return the window back?
Thanks,
Try Tools-->Customize and then look for the Add Command button, where you can find the Apply Styles window under the "View" category.
The problem is solved by resetting the settings..
From Menu, Tools > Import and Export Settings is selected and using the wizard IDE is reset. Then the lost icons come back (visible and ready) under View.
you have to switch to HTML (Web Form) Explorer.
in your solution explorer
right click on index.html >
Open with... >
HTML (Web Form) Explorer
then in your visual studio toolbar select VIEW and you should find Apply Style now

Right Pop up menu coming slowly

When i right click in the text editor in Visual studio 2008 IDE, the Pop Up menu comes at a slower pace. Is there any setting in visual studio that can control this behavior?
After a windows crash my IntelliSense context menu (when clicked over a member/class/declaration) became very slow (~10s to open it). Solution was to close my VS2012, and delete solution cache files (solutionname.suo).
Keep in mind that .suo files are hidden.
After reloading the solution all came back to normal!
You may make VS GUI faster by disabling animation.
Uncheck "Animate environment tools" checkbox in tools - options - environment - general.
This may help...
The problem is possibly a timeout trying to connect to a Visual Studio Team Foundation Server. To disable this in VS 2012:
Tools > Options > Source Control > Plug-in Selection > Current Source control plugin-in > None
This worked for me and I read about it in a comment on this answer: https://stackoverflow.com/a/3467989/1007353 .

Resources