How to turn IntelliSense on in Visual Studio 2010?

前端 未结 6 1975
野性不改
野性不改 2021-01-06 02:01

I am trying to enable the intellisense for aspx file types. I checked auto list members in the texteditor options. Either checking hide advanced members or not makes no diff

相关标签:
6条回答
  • 2021-01-06 02:23

    Out of the box, IntelliSense should be enabled for ASP.NET, including .aspx files. If it stopped working you have a couple of options, listed below. Try the first or second, and only if nothing else works, try the last option.

    1. You can try this from the Visual Studio menu: Edit > IntelliSense > Refresh Local Cache

    2. Delete the files in this folder: %AppData%\Roaming\Microsoft\VisualStudio\10.0\ReflectedSchemas and restart Visual Studio

    3. If nothing else works, you type this in the Visual Studio Command Prompt (this is in your Start menu) and hit enter: devenv /resetuserdata

    This last option is documented here on MSDN, with the following disclaimer:

    Disclaimer: you will lose all your environment settings and customizations if you use this switch. It is for this reason that this switch is not officially supported and Microsoft does not advertise this switch to the public (you won't see this switch if you type devenv.exe /? in the command prompt). You should only use this switch as the last resort if you are experiencing an environment problem, and make sure you back up your environment settings by exporting them before using this switch.

    0 讨论(0)
  • 2021-01-06 02:27

    ReSharper

    None of these things worked for me.

    This started when i entered license information to ReSharper.

    The fix was to look in Visual studio menu: Resharper > options Then select IntelliSense > General -> use IntelliSense features of: Visual Studio.

    It seems that ReSharper turns the Visual Studio intellisense off and visual studio wont accept ReSharper intellisense.

    0 讨论(0)
  • 2021-01-06 02:43

    Couple of other things to note:

    -- I've experienced this issue before because I loaded the settings files from an x64 machine to an x86 machine (full export). There are some paths in "Tools > Text Editor > Javascript > Intellisense > References" that simply don't exist on the x86 machine.

    ***Note: There is a "Reference Group" drop down in that settings editor that I have never actually succeeded in permanently setting. It reverts every time I go back to the settings (or open the environement?).

    -- By default, the VS web app templates come with a ~/Scripts/_references.js file with these lines:

    /// <reference path="jquery-1.8.2.js" />
    /// <reference path="jquery-ui-1.8.24.js" />
    /// <reference path="jquery.validate.js" />
    /// <reference path="jquery.validate.unobtrusive.js" />
    /// <reference path="knockout-2.2.0.debug.js" />
    /// <reference path="modernizr-2.6.2.js" />
    

    ...adding that has helped me before and it has not helped.

    -- If you do reset all your settings, choose Web Developer when you start-up for the first time (this may be my own paranoia as I did not re-test after getting jQuery intellisense to work ... however, I still didn't have jQuery intellisense after choosing Web Developer (Code Only))

    -- Restart VS after making each change ;-)

    0 讨论(0)
  • 2021-01-06 02:47

    I remember a collegue having this issue a few months ago. If i remeber correctly, deleting your C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\10.0 folder solves this issue.

    Not a 100% sure though

    0 讨论(0)
  • 2021-01-06 02:49

    I just had this happen to me and it took me four hours to figure it out, but I'm going to share the solution in the event that anyone else does something like this. It's actually pretty stupid, but just in case anyone else does this, I wanted to share it.

    If you use a master page that makes use of user controls (which mine does) and you try to "speed it up" by putting html/head/body tags in separate controls, you'll lose the ASP.net intellisense. Something like this (very simple, crude example):

    <html>
    <head>
    Some CSS/Javascript here
    <HBT:Head_And_Body_Tags id="Head_And_Body_Tags" runat="server" />
    <asp:ContentPlaceHolder id="Page_Content" runat="server"></asp:ContentPlaceHolder>
    <HBT:Footer_And_Close_Body_Tags id="Footer_and_Close_Body_Tags" runat="server" />
    

    The lack of head and html closing tags in this example will create build errors, which in turn will create HTML validation errors. For some bizarre reason, HTML Intellisense still works, but ASP.net Intellisense won't.

    In my case, it was a failed caching experiment. Wasn't overly smart on my part, and I'll admit that...but at least hopefully someone can learn from my mistake (or I can if I do it again, although I highly doubt I will).

    0 讨论(0)
  • 2021-01-06 02:49

    The simple way is that copying a good settings of Visual Studio from a good application to the damaged application. The IntelliSense of Visual Studio will be recoved.

    0 讨论(0)
提交回复
热议问题