Skip to main content

All Questions

2 votes
2 answers
1k views

Code-Snippet not refreshed in Visual-Studio

I am creating Code Snippet in Visual-Studio 2010 using "Snippet Editor". All is working fine when i first save the snippet in the folder ... Visual Studio 2010\Code Snippets\Visual C#\My Code Snippets....
sstassin's user avatar
  • 388
0 votes
0 answers
172 views

How to get Visual Studio 2010 to complete Select code snippet on an enum in VB.Net

I'm a C# developer by experience, but have recently been working on some legacy VB.net code. In C# I can type switch then the name of a variable of an enum type and Visual Studio inserts a case for ...
Martin Brown's user avatar
  • 25.3k
1 vote
1 answer
207 views

Export as Snippet menu option missing from Visual Studio 2010 Professional

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 ...
Jay Imerman's user avatar
  • 4,640
0 votes
1 answer
87 views

How can I find (and rehabilitate, if necessary) the Code Snippet I created?

I created a code snippet (the first of many, hopefully) using mainly this article as guidance. It seemed to work. Here are the steps I took: First, I created this file with the code snippet (...
B. Clay Shannon-B. Crow Raven's user avatar
0 votes
1 answer
346 views

Code snippets generating a lookup from enum to object

I'd like to generate dictionary lookup code snippet that iterate through existing enums and does a foreach enum print "{ enum.A, "A"}," Like how the code snippet does 'switch', but my own version of ...
PanMan's user avatar
  • 1
14 votes
1 answer
335 views

Expanding multi-line snippet adds extra line at the bottom

Is there any way to prevent the addition of an extra line below a multi-line snippet in VB.NET? (hit tab key to expand snippet...) I've double checked that the snippet itself does not have an extra ...
rory.ap's user avatar
  • 35.4k
3 votes
1 answer
74 views

How do URLHelp and Keyword elements work in the definition of the Visual Studio code snippet?

When a snippet of code for C# in Visual Studio 2010 SP1 is defined with either URLHelp or Keyword members, the url and the keyword does not show up anywhere on the screen: when the snippet is invoked ...
colemik's user avatar
  • 1,567
1 vote
0 answers
424 views

Creating my first snippet: trying to auto add a reference

I'm trying to create my first snippet. One of the things that I often do is to create a class wrapper object for reading a web.config or app.config file. Below is my attempt. One of the things that I ...
Chad's user avatar
  • 24.7k
2 votes
3 answers
3k views

Shortcut to string in Visual Studio

When using Visual Studio console applications I often use the following line of code: Console.WriteLine("press [enter] to exit"); Is there a way of setting up a short-cut key in Visual Studio so that ...
whytheq's user avatar
  • 35.6k
0 votes
1 answer
273 views

Configure the code snippet using Registry

I have HTML Code snippets. I need to configure it in customer machine while install the setup. I am using below registry entry to configure the code snippets in VS 2010. HKEY_CURRENT_USER\Software\...
Vinoth's user avatar
  • 1,995
5 votes
2 answers
2k views

NLog nlogger snippet not working Visual Studio 2012

Does anyone know how to get Nlog's nlogger snippet to work in Visual Studio 2012 like it did in 2010? I don't see anything on their forum or on the internet when googing around. Seems like something ...
gcoleman0828's user avatar
  • 1,542
5 votes
1 answer
2k views

Get namespace in a Code Snippet

The Microsoft link here lists three methods that we can use. But how do we get the current namespace? I see there is a similar question, but the answer to that is using Macros, which doesnt solve ...
dushyantp's user avatar
  • 4,726
1 vote
1 answer
323 views

Visual Studio Snippets with subString variable

I'm trying to setup an environment to work with SenchaTouch in VS2010 and I'm writing some Snippets using Snippet Designer. I wonder if somebody could explain me how to make variable one part of a ...
Alain BUFERNE's user avatar
0 votes
1 answer
348 views

Snippet Designer that allows for keyword replacement Visual Studio 2010 SQL

I am currently trying to use Snippet Designer to speed up my development. I am either missing how to best leverage it or missing a feature that I need. I am looking for assistance accomplishing the ...
jon3laze's user avatar
  • 3,196
18 votes
1 answer
9k views

What's wrong with this code snippet?

I tried to import this into the Code Snippets Manager and got the error "The snippet files chosen were not valid." Since this is my first snippet, and the error message doesn't deign to point out why ...
Thom Smith's user avatar
  • 14.1k

15 30 50 per page
1
2 3 4 5