How to keep the design window from automatically popping up in Visual Studio 2010? - visual-studio-2010

Every time I open up an aspx page it splits my screen between the source and design screens. I can change it over manually each time but it's starting to drive me nuts. Is there a way to make it only open the source window by default?

Right click on any .aspx file in the Solution Explorer, and choose "Open With...". In there, you can choose "Source Code (Text) Editor", then hit "Set as Default".

Tools > Options (Its there somewhere) I managed to change so when I open vb.net forms that the code view opens rather than the designer.

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.

Visual Studio Team Explorer can't properly open a PDF file - Solution Explorer not available for "open with" setting

We have PDF (and other) files attached to TFS Work Items and in Source Control under TFS. They are not opened correctly (they show up as ASCII, basically) in Visual Studio.
The problem seems to be that until you use the 'Open With..' dialog from the Solution Explorer, VS doesn't properly associate a program with extensions like '.pdf'.
If our users had a full installation of Visual Studio, that would be an ok work-around. However, many of them only have Visual Studio 2013 with the Team Explorer component - no Solution Explorer at all.
I'm guessing that there must be some workaround for this case. Perhaps setting the proper registry value? Since VS properly remembers the association if you can tell it (through the Solution Explorer), it must be stored somewhere.
Ideas? Suggestions?
If you've got a PDF file in a project you can right-click in the solution explorer and choose "Open with..". Now you can choose which editor you want to use. If Acrobat isn't already listed you can add it and after that click the button "Set as default".
After that, your PDF's will always open with Acrobat Reader regardless if you open it from source control browser or elsewhere in the Visual Studio. But you need to configure that for all your Studios.
Reference: Answer in MSDN "Source Control Explorer Doesn't View PDF Files"
"Open with" is not available in context menu. But I found solution - well better said workaround:
You have to create external command to open this pdf file in you pdf viewer.
Go to Tools/External tools.
In command section, enter path to your PDF viewer (exe file)
In Arguments, choose "Item path". Save it under preferred name
Put this new command you created in some of existing toolbars or create new one for it. This is also little complicated, so here is how:
Hit the small arrow next to the existing toolbar, choose customize
In the new window, choose "Add command"
In the new window, your new command is hidden under the category "Tools" as command "External command 1". Add it and confirm.
Now here comes the nasty trick. This command will not work in the browser window with PDF file selected, the argument is empty :(
So you have to OPEN the pdf file into that ASCII window and THEN hit the new command. Now the file will open in you selected pdf viewer.
Hope this will help someone

Visual Studio 2012 "Show All Files" button missing

In my solution I have three projects: Console application, class library, and a website project.
The Show All Files button is visible on the console and class library project, but soon as I click on the website project the button disappears.
I am running Visual Studio 2012.
I just got the same problem "Solution Explorer toolbar missing" eg. "Show all files". Here's what I did:
Right click your "Solution".
Select "New Solution Explorer View". This will pop-up a new "Solution Explorer" window with toolbars in it.
Close you original "Solution Explorer" window.
Click on folder which must contain target file and Solution explorer properties will be changed. There you can find Refresh button and Show all files button.
Check this post:
Improved Solution Explorer in Visual Studio 2012 to Improve Productivity
"Show All Files" is not shown in a Web Site Project because it's not needed and all files are already shown in the Solution Explorer. I think that this behavior is the same for older versions of VS
In Solution Explorer, click on a project, and then the 'Show All Files' button will appear.
If you are in a WebSite project all files are shown by default. If there are some missing (added during debugging etc), just hit the refresh button on the top of the solution explorer and they should appear.
None of the above answers worked for me. If this is the case for you try right-clicking on any file in your project, then choosing "Show all files". The "Show all files" icon should now appear on this and all subsequent Solution Explorer windows.
YMMV, be kind. :-)
The "Show All Files" auto hides.
Click on the folder that has the hidden file, the button should show up.
By clicking on the project (the folder under the solution) the solution explore checks if all sub folders has hidden file, this will prompt the button to be revealed.
If you want to get Show all file menu just hide the solution explorer and open it fom view=>Other Windows=>Solution Explorer and clik it it will show all files menu
if you click on solution name in "solution explorer" maybe you will can't see "Show all files" button. because maybe added F# or website project in solution.
if you want see "Show all files" button, you must click on project name which is C# or native C++ or C++.net.
try to open any file use ctrl+alt+a . once a file will open "show all" button will appear automatically.

View the xaml of a Windows Workflow file in Visual Studio

I have a file (just a file. It is not in a solution) that is a Windows Work Flow file.
When I open it I get the GUI interface for WF. How can I show the xaml under it? (With out making a solution and adding my file to the solution.)
Try the File / Open / file menu item. In the Open file dialog, do not click on Open, but on the arrow to the right of the open button. There, choose Open with... and choose the XML editor.
You can also simply press f7 (or whatever your mapping for "View Code" is).
Unlike with clicking f7 on a WPF .xaml file, which opens both the xaml and code-behind next to each other, for Workflows Visual Studio will close the designer view to open the xaml.

how can I find the location of the solution/project on my harddrive in Visual Studio?

I want to know where the solution/project is stored on my hard drive.
I would have thought right clicking on the project from within Visual Studio would have the information on where it is stored on my hard drive, but it doesn't.
Click on the project itself in the solution explorer and in the properties window it lists the project folder.
Only works if you've actually saved the project though. I.e. newly created projects don't have a location.
Start up Visual Studio and go to Tools->Options.
In the dialog box that opens, make sure to check the box that displays "Show All Settings."
From there, you should find a setting called "Projects and Solutions" which will have the list of default locations for projects, templates, etc.
When you have loaded you project in Visual Studio select the solution in the Solution explorer window and then select Properties window. You will see "Path" in the Properties window which points to the actual file.
Open one of the files in your Solution and hover over the tab in the code window. The full path will show up in a tooltip.
You can also go to Window | Windows... which shows you full path to all open files.
One way is to select the project in the solution explorer and then click File / Save As or press F4 and view the 'Project Folder' property.

Resources