ASP.NET controls are not recognized

I just installed a version of Visual Studio 2010, and it looks like something is wrong with the standard ASP.NET server controls.

When I create a basic server control, such as a TextBox, the editor underlines it in green and says (I also do not get intellisense for ASP.NET controls):

The 'TextBox' element is not a known element. This can happen if there is a compilation.
An error has occurred on the website or the Web.config file is missing.

The website is building fine and the Web.config file is missing:

<?xml version="1.0"?> <configuration> <system.web> <compilation debug="false" targetFramework="4.0" /> </system.web> </configuration> 

The controls work fine in the code, and they work correctly when I launch the site.

Is there a configuration problem?

+4
source share
2 answers

This person who tested the Visual Web Developer team suggested:

Close VS, delete schema cache and reopen VS. You can find circuits under something like:

 C:\Users\Pavel\AppData\Roaming\Microsoft\VisualStudio\10.0\ReflectedSchemas 

It is safe to delete all files in this folder.

+13
source

Extension of the question, since your solution does not work for me.

I saw this on my SharePoint 2010 application pages that did not specify masterpageurl in the Page tag.

Solution: after setting MasterPageURL = "~ masterurl / default.master" in the Page tag in the constructor, he fixed all my ASP tags.

0
source

Source: https://habr.com/ru/post/1312653/


All Articles