How to annotate an SQL source file opened in Visual Studio 2010? - visual-studio-2010

Sorry if this question has been asked before but I did some searches and could not find any information.
When I open an SQL file in Visual Studio 2010 and right click in the editor, the "Source Control" sub-menu in the context menu is not there. I'm particularly after source code annotation.
Is there anyway to make that menu appear? I can navigate to that file in Source Control and get the context menu from there, but that is much slower than just access it directly from the editor.
Thanks.

Related

How can I make Visual Studio open .linq files in LinqPad.exe rather than it's own editor

I have a VS 2017 solution that contains some .LINQ scripts. When I double click those files in the solution explorer in VS I'd love to have them open in LinqPad (the default system editor) rather than a VS text editor.
Is there a way to configure VS to do this? I tried Tools->Options->Text Editor->File Extensions but none of the options there seemed like it would open something outside VS.
I realise this is an old question and I don't have VS2017 but just in case it is applicable, VS2019 provides this functionality. If you right-click on the .linq file in Solution Explorer and choose "Open With..." you will be presented with a dialog similar to below:
LinqPad may not be in the list. If it's not then click "Add..." and navigate to where it is installed and choose the LINQPad.exe executable.
Make sure to click "Set as Default" and then click OK.
Opening the file from Solution Explorer should now open it in LinqPad rather than Visual Studio.

Is there a Command in Visual Studio for "Navigate to this item in TFS Source Explorer"

I want add a command to the R-Click context menu in the Solution Explorer that would navigate the TFS Source Explorer window to the right location corresponding to the item in question.
However I can't see how to do it simply without writing a VS extension, which I want to avoid at all costs.
It's not that I don't want extensions. I just don't want to write a custom one. Previously I'd be able to use macros but those were removed in these versions of Visual Studio.
The VSCommands extension will give you the option to locate a file in TFS and in the Solution Explorer
The Locate in TFS extension adds a context menu entry Locate in TFS to Solution Explorer and Open Tabs.

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

Is there a way to open a file from solution explorer when drag and drop in code editor. VS 2010/2012

I really would like to be able to open files while dragging and dropping it from "Solution Explorer" to Code Editor(main) Window in visual studio.
Is there a way to do that ? Can't believe Microsoft didn't think of that !
Visual Studio instead of opening the file creates a link to that file using its path. This is useless knowing that I can do the same just copy pasting the file into the Code editor.
It is possible though to open the files directly while dragging from Windows Explorer to Code Editor Window. I want the same with "Solution Explorer" !!!

Stop from Visual Studio opening TFS WIQ files as Text

Previously my installation of Visual Studio 2008 and Visual Studio 2010 wre both opening WIQ files correctly - connecting to TFS and wunning the TFS Query. Now both are opening the WIQ file as plain XML.
Of course, I could reinstall Visual Studio to fix the problem.
But I am looking for tips toward a faster work-around. Has someone encountered this problem before? If so how did you fix it?
This should do it:
File -> Open -> Open file
Browse to the WIQ file
Click the right hand end of the "Open" button (on the down-arrow)
A menu appears - choose "Open with..."
Choose this and a dialog appears
Select the editor you wish to use (e.g. XML)
Click "Set as default" so that this will be uised for any "Open" of a WIQ in future.
OK.
(Of course, it might not work if the VSTS WIQ editor isn't connected in to this system)

Resources