Visual Studio 2012 autocomplete in HTML files not working - visual-studio

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.

Related

Visual Studio 2013 breaking Web Site

I have a really weird problem, be interested in some pointers
We have a website that we have coded from Visual Studio 2003 -> Visual Studio 2010. We are now looking at moving to 2013.
The website is in IIS, when I navigate to it using IE it works. When VS2013 is -open-, not running, but has the project open we get a weird effect where the contents of the website gets duplicated by 3, its as if there are 3 iframes on the page, all with a copy of the same web site.
I close VS2013 and it goes back to normal
So, just to be clear, we don't even have to run the web site from within VS2013, just the project being open is enough to cause the weird effect
We use subversion as as far as I can tell no files have been modified when VS2013 is open
Any suggestions?
Thanks
It's Browser Link that's doing it! If you switch off Browser Link it works.
The source shows some extra script entries before the final tag but other than that the whole source is duplicated.
We don't need Browser Link and I don't have reflection capabilities on Asp.Net source so as to why that's for some one else to determine, I noticed a few people complaining when I searched on it so it may be something that just gets fixed in a future version

Visual Studio 2010 - sometimes markup language doesn't have collapsibility. How to correct?

I have pages in VS2010 (C#) which when I open the markup language (aspx), once in awhile the text can't be collapsed.
I frequently collapse by tags when I need to add new sections of markup.
Has anyone else experienced this? Does anyone know a solution?
Closing and reopening the page doesn't always work.
Switching to design mode and back doesn't seem to always work either.
[I am using the most recent service pack].
Just a VS2010 quirk? It does it to me sometimes too, and we're definitely not the only ones - Automatic outlining (collapsible sections) does not start for .ASPX files in Visual Studio 2010 SP1

Visual Studio 2010 SP1 crashes when opening web page

As the title says, my Visual Studio 2010 SP1, running on Windows 7 x64, is crashing whenever I try to open a .html, .aspx, .cshtml, etc. file. I noticed this problem some weeks ago. Since then, when I open one of these kinds of files, it opens, freezes for a few seconds and then crashes. I tried using the repair function provided with the installer, but it didn't work. The only solution right now is to reinstall the os, but I don't feel like doing such thing.
Has anyone else encountered this kind of problem? Thank you!
I've been having this problem when using the default Web Form Editor and still haven't found a solution that works. I haven't a clue what's causing it, and the only plugin I have is Resharper.
I solved it temporarily by right-clicking the ASPX file, clicking Open with and choosing HTML Editor as the Default editor. Seems to be a problem with the Web Form Editor for a certain kind of files.

VS.net 2008 issue with asp.net pages

I am having problem in using the source view of an asp.net page in VS.net 2008 IDE. I am not using Design view at all. IDE hangs a bit every now and then, when I use intellisense in it, and I scroll the page.
Please throw some light on it.
Such issues doesnt come up while editing the HTML page, and while editing same asp.net page with the HTML editor which can be configured using Tools -> Options menu option.
Read this Post
This might help to make your visual studio a bit faster in general. I am not very sure about the exact reason for the behavior you mentioned of your Visual Studio.
I suspect that it has something to do with Graphical Interfaces like Toolbox etc.
Thanks
I've had problems like that with Visual Studio before. The intensity of the problems seem to multiply exponentially as the size of the file I work with gets larger.
Here's what I'd reccomend:
Check and make sure Visual Studio is fully updated (Help > Check For Updates) ; there have been some patches released and they will help you immensly!
If your code has any breakpoints, disable them all and start afresh later (Debug > Disable All Breakpoints)
If that fails, here are some more optimizations you can try.
In my case, I think longer file is the culprit. I think partial page concept should be applicable to asp.net page too.

Visual Studio 2008 freezing when editing aspx/master pages

Visual Studio freezes up continually when I'm editing master pages or aspx files. Here's what I've tried that have not helped:
restarting VS
only working with few files open at a time
Disabled all addins (resharper etc.)
deleted .suo and .user files
changed default editor
from Web Form Editor and Master Page
Editor to HTML Editor
installed SP1
I don't have tons of files - 3 Master pages and maybe 30 aspx files. It is a asp.net mvc project. All I have to do to get VS to freeze is type a little text or even just paste. The freezing lasts a good 5-10 seconds. My machine has 4GB of RAM and fast disks.
Could it have anything to do with asp.net mvc? Would the amount and size of other projects in the solution affect the editor?
I Solved this problem by uninstalling 'Microsoft Visual Studio Web Authoring Component' from my machine. It can be uninstalled from 'Add/Remove Programs' option in Control Panel. What a nightmare!
Now everything works just like its supposed to. I'm surprised Microsoft couldn't figure out what the problem and solution is. How much do they spend on R&D and Q/A again?????
Hope this helps others.
I had a similar issue and found an article about the problem, rather than reinstall Office to check, I simply renamed the setup.exe to setup.exe.old and that resolved it.
I finally figured out what the problem was with mine. I had a protocol relative script reference in my masterpage that was reeking havick on my editor. Hopefully a bug microsoft will fix soon.
Here is what I had:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
type="text/javascript"></script>
What I had to do to fix it:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
type="text/javascript"></script>
Hope that helps someone
I'm not sure about that, but I guess that if you're having a lot of (probably huge) projects in the solution, this would definitely slow down VS for it parses the code to give you an up-to-date intellisence menu ...
Master pages are a little slow anyway, especially that VS is not that fast on rendering the HTML elements, not to mention Master pages.
It can also happen if you have markup problems.
For instance, if you have a Label control and add something like Text="<%# TranslateLabel("lblSearch") %>" the page will freeze even in source mode when attempting to save it. The correct sintax should be Text='<%# TranslateLabel("lblSearch") %>'. I know it is not your problem, but maybe it's useful for somebody else...
With VS2005 I found the problem to be with a link to a javascript file (that was in a master page) that I entered as
<script src="../../js/file.js" type="text/javascript" />
when I change this to just <script src="/js/file.js" ... >
the problem went away.
NOTE while this "bad link" was in the master page, VS2005 hung even when I did not have the masterpage as an open document. Basically as soon as I tried to edit anything (or even build the app) VS hung. I had to close VS, change the offending file in note pad and open VS again. Then all was good.
The very odd thing was I added this link to the file last night and VS was still behaving ok, it was not until this morning after a restart that the file caused the problem.
I Hope this helps someone
Derek
I have been having this problem off and on for a few weeks. I finally resolved it today. The source (nice pun) of the problem was source control. I am currently using Visual Source Safe 2005 (I know, I'm dumping it soon), but I think it could be an issue with any source control package.
I first suspected VSS when I was able to edit ASPX pages in the design view without issue using a machine that was not connected to VSS. If I removed source control from the project, everything worked fine.
I then discovered that somehow my VSS connection settings got changed from using a folder connection to a web connection. I'm not sure how this could have happened since I am the only one that uses VSS and I certainly didn't change it. Anyway, I reset it back and everything began to work normally again.
rename worked for me i.e. changed setup.exe to setiup.exe.old
C:\Program Files (x86)\Common Files\microsoft shared\
OFFICE12\Office Setup Controller\Setup.exe
wish i'd found this article first - it has taken me many man hours
thx -j
I got the sampe problem with Visual Studio 2008 SP1. And yeah it was a masterpage as well.
The solution what I found is to restart Visual Studio 2008 and use the source mode of ASPX file :)
I guess the problem here is a masterpage.
I had the same problem when I removed Office 2007 to install Office 2010 beta. I have installed Office 2010 64 bits on Windows 7
I used Robert MacLean's solution, and it works for me, I just renamed the file.
I am not sure if this is going to help anybody but after trying all the answers here to no avail I deleted a huge block of commented code on my ASPX page and the behavior went away. I am not really sure why a large commented block of code would cause VS to freeze up after every edit action but that seems to be what happened.
I had a similar problem where Visual Studio would just hang indefinitely when opening a master page file. I solved it by opening the master page file in notepad +, removing the html, then putting it back in from visual studio.
Hope this helps someone!
Interesting, the uninstall of the "Visual Studio Web Authoring" program and the renaming of the Office setup.exe seem to both be related. I watched setup.exe as I uninstalled Web Authoring and the uninstall had the side effect of removing setup.exe and all the other contents of the directory. Also, when I had my setup.exe renamed to something else (e.g. 'setup.exe.renamed') then I had errors trying to uninstall Web Authoring. Those errors went away when I renamed setup.exe.renamed back to setup.exe. Anyway, just saving someone else a double effort here.
I have solved this problem by installing this hotfix:
http://blogs.msdn.com/b/webdev/archive/2008/02/09/downloadable-hotfix-performance-and-editor-fixes-for-microsoft-visual-studio-2008-and-visual-web-developer-express-2008.aspx
Try deleting ReflectedSchemas folder (C:\Documents and Settings[username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas). This folder grows quickly (mine was 2.6 GB after 4 years of programming) and by growing can slow down the VS considerably. Such as 10-20 seconds of non-responsive UI after closing an aspx or ascx file. I has not waiting them to open, I was waiting to close. Apparently the opening was easy, the closing part was the hard job!
Uninstalling 'Visual Studio Web Authoring tool' solved this problem.

Resources