Visual Studio adds :1 to title - visual-studio

Today I updated to Visual Studio 2019 16.7.6 now I saw, that on the tab riders of code files there is the name and a ":1" added to it, like "Skaarhoj.vb:1". Does anybody know what that is?

It's visible when you have multiple views/windows (tabs) open for the same file.
Note that this is not the same thing as the split-view you can activate by dragging the handle at the top of the vertical scrollbar.
This is not a new feature - I can remember using it in VS2013, possibly VS2010.
The first window/tab has :1, the second has :2 and so on.
You can open new windows for most (but not all) files and file-types via (VS Main Menu) > Window > New Window
Note that not all editors/file-types support having multiple windows open simultaneously, so that menu item may appear disabled for some files.

Related

Web Publish Activity window is not maintained when closing and reopening Visual Studio 2022

I recently applied an update to Visual Studio Community 2022 (64-bit).
Current Version is 17.3.4
We still use Web Deploy for some legacy asp.net sites and the Web Publish Activity window is very useful for switching between dev and production environments.
After a recent Visual Studio upgrade I noticed that the Web Publish Activity window was not visible, so I reopened it via View -> Other Windows... and it appeared as expected in the lower window, as a new tab along with Output and Error List.
But after closing my project and reopening it, the Web Publish Activity window is missing again. I tested other windows like PowerShell and Bookmark Window and they ARE maintained after closing and reopening VS.
I also tried saving a new window layout with the Web Publish Activity window open and then reapplying that layout after a VS restart but that had no affect.
It is very annoying to have to go though multiple levels of the View menu to reopen this window every time I open this project.
Does anyone have any advice on how to keep this window locked/pinned?
Is Microsoft trying to "encourage" me to stop using this window?
If there is another way to quickly change between publish profiles that would be acceptable as well, but I cannot find one.
Thank you.
This may be a bug with this particular window (the fact that it doesn't stay pinned after closing Visual Studio that is).
Perhaps as a decent workaround you can at least assign a keyboard shortcut to open this window:
Go to Options → Environment → Keyboard
Filter down to "View.WebPublishAcitvity" or find it in the list
Create a keyboard shortcut of your liking by typing it in the circled red box and then click the Assign button:
After doing that, you should be able to use that shortcut to open the window much faster at least.

How to manage visual studio tabs

I guess I have hundreds opens files in my VS2015 now and it is really a headache to find the one which I need. I remember seeing somebody's VS screen which can pick up some tabs and list them in the left panel of visual studio. Is that a add-on or some configuration is built-in options?
Maybe it was my Task Canvas extension that lets you open several small editor windows as tabs in one panel.

Blame source file from within visual studio

I'm using AnkSVN within Visual Studio 2010, and it covers ~95% of my SVN needs. The biggest missing feature is that I can't find a way to blame a file from directly within VS. The workaround I currently use is to right click on the file within the tablist, and select Open Containing Folder, and then right clicking on the file in Explorer to call Blame.
It's called Annotate in AnhkSVN.
Subversion -> Annotate in the context menu.
I didn't like AnkhSVN's Annotate feature. So I used the following:How to integrate TortoiseSVN into Visual Studio.
Content from above url:
If you're using Visual Studio, you can integrate TortoiseSVN commands to various context menus.
The first step is to add the TortoiseSVN commands as external tools, under the menu TOOLS->External Tools....
Add the name of the command, the path to TortoiseProc.exe and then the parameters for the command.
Use the VS variables wherever needed. Since I add my commands to the context menu of the open file tab, here's the parameters I used:
/command:blame /path:"$(ItemPath)" /line:$(CurLine)
/command:diff /path:"$(ItemPath)"
/command:log /path:"$(ItemPath)"
Notice the /line: parameter: this will make TortoiseBlame automatically scroll to the same line the cursor is located in the opened file in Visual Studio.
Now to add those new commands to the file tab context menu, go to TOOLS->Customize..., select the Commands tab, click the radio button Context menu and then select Other Context Menus | Easy MDI Document Window.
Now you have to select the commands. Problem is that the custom commands are not shown with their title but only as External Command X with X being the number of the external command.
In my case, the commands were number 9-11, you might have to do some trial-and-error here. Just add the commands you think are the ones you added and then check if the right ones show up in the context menu.
NOTE: In Visual Studio 2010 to add a command to the right-click menu of a document’s tab, first you’ll need to right-click on a Visual Studio document tab to work around a Visual Studio bug. (Otherwise the Easy MDI Document Window context menu doesn’t show up in the Customize dialog.) Source

How to detach document windows from Visual Studio 2010?

I've got 2 displays with very different resolution (which makes just stretching a window over them not a good idea) and actively use both of them, usually looking at one when doing changes in another.
So I wonder if I could move a child window of Visual Studio 2010 from within the boundaries of it's main window an move it to another display. Nowadays I'd enjoy the way child windows behaved (each window, incl a toolbar and a properties pane worked as an independent window on a desktop) in Borland C++ Builder (while it was senseless the days when I actually was using it).
In Visual Studio 2010 Document Windows are (finally) detachable. For an how to, you can check this post:
Free your Document windows
Basically there are different ways you can achieve this:
Simply click and drag the tab for the Document window out of the IDE;
Go to Window -> Float on the Menu Bar.

Will VS 2010 display recent used project and solution in the context menu of the start menu?

Start menu in Windows 7 has a feature: a programs, pinned to the top, can show a context menu with recently used files:
alt text http://img65.imageshack.us/img65/5149/contextmenustartmenuwin.png
Will Visual Studio 2010 be able to display also recently used Projects and Solutions?
It is possible to pin solution files to the recently used file list.
First make sure you already have Visual Studio pinned to the Start Menu.
Next, drag the Solution file on to the Start Menu so that it is pinned in the main list.
Now select the the Recently Used Files button for Visual Studio so that the list is showing.
Drag the solution file from the main list into the recently used file list.
You can now remove the solution file from the main list.
Beta 1 doesn't seem to support this yet. Its easily possible by using the new Taskbar APIs and specifically the custom categories feature. I think their main problem might be that the solution files are associated with an app called VSLauncher.exe (this small app determines what version of VS to load when you launch a SLN file).
If you want to "pin" your fav solution files to any version of VS, one option this is (I currently used this with VS 2008 and 2010 Beta 1:
Open Explorer and browse to any SLN file you want to pin.
Drag it and pin on the taskbar (it will pin to VSLauncher.exe; this is okay)
Now just repeat the steps for other SLN files.
When you click on a SLN file from the above pinned program's jumplist, another instance of VS2010/VS2008 will launch. It won't show your recent projects or solutions, but atleast it allows you to pin your fav/recent solutions manually. I think you can use this for CSProj or other project files as well.

Resources