Export as Snippet menu option missing from Visual Studio 2010 Professional - visual-studio-2010

I found these wonderful instructions on how to create your own code snippets in Visual Studio (after using them in Xcode, I have become addicted to snippets). However, when I go to follow the first steps, I select my snippet body code, and right-click, there is no menu pick to export the snippet! And, a bit of Googling failed to turn up any results (as in 0 results, odd). Does anyone know how to enable the menu pick?
Also, I went into Tools / Options, checked off "Show all settings" - and I was unable to find any relevant option that may enable snippet management.
When I go to the Snippet Manager, apparently it is expecting to already have a Snippet XML file to add, and won't give me some dialog to build my own new snippet.
Thanks for your answers.

Apparently, although it dances around the subject, it mentions that you must have Snippet Designer, but no info on how to install it or where to get it! You can obtain it from the GitHub repository at https://github.com/mmanela/snippetdesigner

Related

Code Index API / Code Index Client Applications permissions requested in Visual Studio

A few months ago Visual Studio started popping up a permissions request for "Code Index Client Applications" from "Code Index API".
If I click on the "Report it here" link, I'm taken to another page that says it is from "AME.GBL".
I don't know what this is, so I always hit cancel. I have not noticed any kind of problems with not granting it what it wants, and I'm getting tired of it asking, so I'd like to try and remove whatever it is that is asking. I've tried disabling all my extensions, but it still asks. I have looked in the Visual Studio Installer's "Individual components" and also my Windows "Apps & features", but there is nothing with these names listed there. I have looked online but can't find anything about it.
Does anyone know what this is or how to get rid of it (or is there some reason why I should grant it permission)?
The dialog that pops up has changed slightly and I think it gives the answer:
You can read about Rich Code Navigation here or see a demo of it (primarily in Visual Studio Code) here. Note that the second link is from 2018, so in one form or another, this has been around for some time, but perhaps it has been off by default until a recent update?
At any rate, if you choose to disable Rich Code Navigation, you can do that under
Tools --> Options --> Environment --> Preview features
I did that and the permissions request dialog went away.

In visual studio how can you see the outliner when loading an arm template into visual studio

Ive loaded an ARM template into Visual Studio called armtemplate.json but can see the outliner on the left which shows parameters, variables and resources etc
Does someone know how to enable this?
If you are looking for how to enable the JSON Outliner if it’s not displayed by default.
Below screenshot should help you navigate
Right click on .json file
You should see the option of Show outline and click on it
You should be able to view the JSON Outline on the left hand pane.
But if you are looking for something else, please elaborate your question so we can better understand and try to answer your question.

Small Basic - When would 'Graduate' be used?

So today I decided to take a look at the Graduate feature in small basic, I discovered that it allows you to convert your small basic code to a format for Visual Studio, Great I thought.
Until when I later tried it, Visual Studio reported that there were over 102 errors with the code, I found that this was because the compiler couldn't understand most of the small basic functions like GraphicsWindow, TextWindow, Mouse, Shapes etc. So, have I done wrong? As Visual Studio is my main programming language I couldn’t wait for the small basic code to be magically converted to work with VS. Some of the code could be manually translated such like TextWindow to Console, but what do you do with code that is specific to Small Basic like GraphicsWindow?
You are using the Graduate feature correctly, and you haven't done anything wrong; the reason you're getting errors is because Visual Studio doesn't seem to automatically import SmallBasicLibrary.dll correctly. The last time I used Graduate (~2 years ago) this wasn't a problem, so I imagine this issue is a result of Visual Studio updates.
Thankfully, this issue is easy to fix. You simply need to import SmallBasicLibrary.dll manually and then add a single line to the top of your Visual Basic code. Note that these instructions are for Visual Studio Community 2013, but I would imagine they're the same for most recent versions.
In Visual Studio, go to Project > [Project Name] Properties.
In the tab that opens, go to References on the side panel. Select SmallBasicLibrary in the list and click Remove.
Click the Add button (next to Remove), then in the window that opens select Browse in the side panel. Now click the Browse button at the bottom of the window.
Find SmallBasicLibrary.dll in your Small Basic installation folder (for me this was C:\Program Files (x86)\Microsoft\Small Basic) and double-click it. When you are taken back to the Reference Manager window, ensure that SmallBasicLibrary.dll has its checkbox checked, then click OK.
Select Application in the side panel and ensure that the targeted version of the .NET framework is 4.5.
Finally, open your Visual Basic code using the Solution Explorer and add this line to the top of it:
Imports Microsoft.SmallBasic.Library
The resulting code should look something like the following:
Imports Microsoft.SmallBasic.Library
Module UntitledModule
Sub Main()
TextWindow.WriteLine("Test")
TextWindow.Pause()
' Your Small Basic code here...
End Sub
End Module
All your build errors should be gone, as the Small Basic commands are now available.
Once you've done this, Graduate is ideal for using VB-exclusive commands or libraries along with your Small Basic code.

Disable HTML element tooltips in Visual Studio

I was wondering if anyone has had any luck disabling the HTML element tooltips in Visual Studio 2015. I find them to be a real annoyance, especially when dragging/ctrl+dragging text around (they get in the way most the time). Here's a screenshot the feature in action (updated):
I Googled and was only able to find the post where the feature was announced, but no mentions of how to disable it. I checked my Visual Studio preferences and have "Auto list members" and "Parameter information" disabled for the HTML text editor.
Any ideas or suggestions?
Update (10/16/2015): I think this issue may be related to the Web Essentials package. I disabled the package and was able to make the tooltip show up, however, I don't currently have a computer with a default Visual Studio 2015 install to test my theory on. I updated the screenshot to reflect the actual tooltip I'm getting (the original one was the screenshot included in the linked blog post).
Try this:
Go to: Tools > Options... > Text Editor > HTML > General
In the 'Statement completion' section you will see an 'Auto list members' checkbox, uncheck it.
However, I'm not sure if the feature above reffers to an in-design html editing or will only affect in specific html development environment (editing an html file for example), so I'll give an additional solution:
Go to: Tools > Options... > Environment > Keayboard
Here, find the command Edit.ToggleCompletionMode and assign the keyboard shortcut that you desire.
Then just use it when you wish to toggle the auto completion of members (including html members I supose).
Update
Sorry If I confussed what you want, because with the absence of auto completion it will remove existance of tooltips but I don't know if you need auto completion suggestions or not.
Anyways, for tooltips you could try doing the same procedure I explained in the images above but with the "Parameter Information" checkbox and/or the corresponding keyboard shortcut, Edit.ParameterInfo. Because seems that html element tooltips are treated as parameter info.
This was annoying the Hell out of me as well & I found that ElektroStudios' solution wasn't suitable in my case. I'm fairly sure that they are VS-native (definitely not Web-Essentials or ReSharper).
For VS2015 at least, the offending tool-tips are located within the file:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Schemas\1033\HTML\html.loc
Deleting the contents of this file has "disabled" the tool-tips for me, although I can't say whether this will be a permanent fix.

Writing VS2010 Extension

I'd like to create an extension for Visual Studio 2010. The functionalities I need are these:
Add a context menu item for Project (when user right clicks project name in his solution, he'll get my context item in the list).
When he clicks, a new WinForms form appears, where he can input some data, and an option to save that data for future reuse.
When he clicks OK on that Form I'll generate some files and add those files to be a part of his project that he rightclicked.
The WSCF.blue is exactly the kind of behaviour I want to immitate in VS, but it's source was written in VS2008, and I'd like to use VS2010 Extension options which are quite changed as I understand...
I found some resources on the msdn, but I found it confusing with incomplete info (e.g. MenuAndCommands example).
Can anyone shed some light on how to achieve what I'm after?
I really don't know where to point out so you can get specific examples of what you are trying to achieve. However, in the following resources you will find complete and detailed information about the overall process, and some help to achieve 1. and 2.
VS 2010 Package Development – Chapter 1: Visual Studio Packages
VS 2010 Package Development – Chapter 2: Commands, Menus and Toolbars

Resources