Visual Studio Show errors until I open the * .aspx.cs page?

The Visual Studio Error List displays 50 errors for controls and variables that do not exist. I double-click on the error, I need it, and after about 1 second everything goes away!

There are no real errors, as my site compiles without errors or even warnings.

I know I saw this before, but I forgot how to fix it. Does anyone know why this is happening? Thanks in advance!

+3
source share
3 answers

I also often see this on websites. I always did this before the compiler, which was supposed to “catch up”, although I am sure that there is a more complex answer to the question of why this happens. This is annoying.

+3
source

I have seen this before, but I'm not sure what the actual reason is. I saw this most often using an ASP.NET website project, rather than an ASP.NET project for web applications, but I don’t know exactly what the reason is.

However, in my opinion, you should still use the web application style project, as it will precompile the most important parts of your application before deployment.

0
source

:
*.aspx.cs 1 .

0

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


All Articles