No more Intellisense for ASP tags visual studio 20

2019-05-01 01:06发布

问题:

I'm not getting intellisense for asp tags anymore in websites or web applications. There is a check mark for the following:

  • Tools->Options->Text Editor->C#->General->Auto list members

    Tools->Options->Text Editor->C#->General->Parameter information

    Tools->Options->Text Editor->C#->Intellisense->Show completion list after a character is typed

My dev environment is server 2008 R2 64 bit, VS 2010 Ultimate (ver 10.1.30319.1 RTMRel), I don't have resharper installed, but I do have AnkhSVN installed.

How do I get intellisense back?

UPDATE: Here is my webconfig:

<configuration>
  <connectionStrings>
    <add name="MerchandiseEntitiesContainer" connectionString="metadata=res://*/Merchandise.Entities.csdl|res://*/Merchandise.Entities.ssdl|res://*/Merchandise.Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\sqlexpress;Initial Catalog=OldOslernet;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
      <httpRuntime executionTimeout="1800"
              maxRequestLength="1048576"
              useFullyQualifiedRedirectUrl="false" />
    </system.web>
  <appSettings>
    <add key="upLoadPath" value="images/products/"/>
  </appSettings>
</configuration>

Also, here is a pic of the editor: http://img688.imageshack.us/img688/958/extension.png

回答1:

Delete Schema Files

Delete all files in the following folder: C:\Users[UserName]\AppData\Roaming\Microsoft\VisualStudio\10.0\ReflectedSchemas. It is safe to delete anything in this folder as Visual Studio will regenerate them as needed.

Unblock Referenced Assemblies

There could be a problem with one of the referenced assemblies in your project being blocked on your machine. Right-click on each DLL in Windows Explorer, select Properties, and click the "Unblock" button (if the DLL is being blocked.)

Reset Visual Studio Settings

If all else fails, you can try to reset your settings in Visual Studio 2010 (MSDN Link.) You'll have to tweak your settings all over again but it is worth trying.



回答2:

This is what worked for me for aspx/ascx files:

Right click on the file in Solution Explorer Select Open With Select Web Form Editor (Default) Click Set as Default



回答3:

  • Check file extension - editor bindings in preferences.
  • Check the system.web\pages\controls config section in your web configuration file.
  • Check the system.web\compilation\assemblies section too.