I'm (still) trying to find a way to edit the default Visual Studio 2012 template so that every new JavaScript file I create has the ECMAScript5 "use strict" pragma at the top of each file. I came across at least one similar question for C# templates, but those questions do not address Visual Studio 2012. Ultimately, the answer might be the same as the VS 2010 answer in the end (I haven't finished my research to come to a firm conclusion about it), but let's suppose the existing answer is insufficient for the newer version.

Does it make sense in this case to make a comment/question on the existing answer, or should I ask a new question for the new version?

  1. If I make a comment on the existing answer, and someone can answer the question via comment or an edit, this maintains a canonical location to find the answer for every version, but if no one notices the comment or no one can answer the followup, it might take a while for the answer to be edited, and perhaps even longer for me to notice the edit.
  2. Asking a new question has the benefit of getting a higher chance at a quicker answer, as well as instant notification of the answer (I'm leaning this way), but then there would be now two different places to find a canonical answer. I suppose I could in this case also, once the answer is given, edit the original answer as well.
  • 3
    the general answer to your question is "make a project template". It is a very tiny amount of work (make new proj, add line you want, File, Save as Project Template") so I would suggest just trying it. However why not ask "do project templates work the same for VS2010 and VS2012?" as its own question, and if someone tells you that (I don't actually know myself) you can then decide about using old answers, and also make the internet better in the process – Kate Gregory Feb 1 '13 at 17:58
  • @KateGregory: Thanks for the tip. I'll definitely look into project templates, and I'll also look at other question patterns regarding changes between versions. – Peter Majeed Feb 1 '13 at 18:01
  • ok actually maybe File Template, but the rest stands – Kate Gregory Feb 1 '13 at 18:01
  • FWIW, I found that the answer to my real question is that there are multiple JavaScript files in the ItemTemplate directory, used in different contexts, and "use strict" would have to be placed in all of them for it to be used in every context. I edited the question and left an additional comment. – Peter Majeed Feb 1 '13 at 19:54
  • 1
    possible duplicate of What to do if an out of date question+answers already exists? – jscs Feb 1 '13 at 20:01

Make a new question, and specifically mention that you are aware of the solution for the older software version, and that you are seeking an answer that works with your new version. I usually find it's helpful for Googlers to also include the Version # in the question title.

Once you get an answer, post an answer or a comment on the original outdated question saying something like "If you are using version xx+, the solution would be to ..." (if you're posting a comment, just include the link, but if you're posting an answer, include the full answer in addition to the link)

Providing one of the posts contains a link to the other, both questions will have the other question show up in the "Linked" question list on the right side of the question, so users can easily find the solution that works for their version of the software.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .