steventnorris
steventnorris

Reputation: 5896

Visual Studio 2010 Intellisense

When using Visual Studio 2010, I open an aspx and cs file to edit. (I have not created a project. I am simply opening one aspx file and one cs file from my web directory to edit.) The intellisense will not detect System.Web or a large variety of others. In fact, only basic resources seem available. Is there a way to correct this?

Upvotes: 0

Views: 354

Answers (2)

Diego
Diego

Reputation: 36176

the Intellisense pretty much based on the content of the "using" clauses you have in the beginning of your file. It runs based on what you have already typed against a list o possible functions contained on the "used" assemblies.

For example, if you want intelisense to have access to the Convert function you need to use the System assembly. Without it, intelisense wont know the function exists

Upvotes: 0

Andrew Barber
Andrew Barber

Reputation: 40160

As you are not in a project, you lack much of the context that would permit full intellisense support. VS has no idea what assemblies are included, and does not have imports from the web.config.

Remember that Intellisense tries to only present you with code completions that actually apply in the current build configuration. Without assemblies referenced, it can't guess that you have anything at all in, say, System.Web.

Upvotes: 3

Related Questions