Visual Studio 2012 autocomplete in HTML files not working

Can someone else confirm that autocomplete HTML tags is not working in Visual Studio 2012? You know, type <a> and VS2010 automatically inserts </a> . That doesn't seem to work in VS2012 at all - I tried this on 3 different machines (Windows 7, Windows 8 and Windows Server 2008), two of them had previously installed VS2010 but one was completely clean (fresh VS2012 install on Windows 8 Professional).

If someone can confirm, do you maybe have a solution for it? This is such a pain, it renders VS2012 broken for me.

I opened a Connect case here if you wish to vote on it: http://connect.microsoft.com/VisualStudio/feedback/details/758970/auto-insert-closing-tag-in-html-files-razor-plain-html5-web-forms-does-not-work-in-vs2012-rtm and another one by someone else: http://connect.microsoft.com/VisualStudio/feedback/details/759416/auto-insert-close-tag-fails


Works for me.

Can you check in your VS options that Text Editor > HTML > Formatting > Auto insert close tag is on.

If it is, check specific settings of the a tag by clicking the Tag Specific Options button and selecting the Client HTML Tags > a option.


I worked with MS's Visual Studio 2012 team to figure out what was going on and it happens to be a locale related issue. It is actually a confirmed bug.

See this blog article for more information:

http://blogs.msdn.com/b/webdev/archive/2012/09/26/workaround-for-html-closing-tag-problem.aspx


I encountered the same disturbing action on the part of Visual Studio 2008; only it wasn't the editor.

The problem was simply an existing closing p tag quite a bit further down in the HTML source. Whenever I opened a new p tag, the HTML editor "saw" the existing closing tag and so did not generate one.

I found the problem by using the W3C Markup Validation Service (http://validator.w3.org/).

Hope that helps.

链接地址: http://www.djcxy.com/p/85084.html

上一篇: 在Visual Studio中停止调试无法关闭浏览器

下一篇: Visual Studio 2012自动完成HTML文件无法正常工作