Visual Studio 2010 - Warnings only shown for active file
i hope you can help me with my problem in Visual Studio 2010.
Normally in Visual Studio 2008, when i compile a project warnings for all files are shown. But not so in Visual Studio 2010. When i compile a project warnings are shown not until a file is active and then only warnings for the active file are shown in er开发者_C百科ror list.
And I have recently found out something new: the problem only seems to be in ASP.NET Pages (.master, .aspx), but not in Behind-Code-Files (.master.cs, .aspx.cs). Is there a problem with warnings in relation with ASP.NET Pages (except the behind-code-files)?
Thanks in advance.
Best Regards, HeManNew
Visual Studio 2008 and 2010 actually behave the same when listing errors and warnings for pages.
A page's errors and warnings appear in the Error List when its editor is open (regardless of whether it's the active window) or when the errors (not warnings or messages) prevent the application from compiling. But because markup pages are not compiled, only server-side errors prevent the application from compiling.
So, in sum, Visual Studio is behaving correctly. To see the errors and warnings particular to a markup page, you need to open it first. Compiling has nothing to do with markup errors.
I know described behavior since VS2005 (I have no experience with earlier versions).
The .aspx
is compiled at runtime (or when it is opened in VS 2010). So errors (and warnings) are found when page is run. You can even edit .aspx
and new version is used when page is reloaded (the load time is considerably longer).
I don't know any way to say to iis to compile all aspx.
But maybe we experience a different behavior because I see warnings for all opened .aspx
files, not only for the active one.
精彩评论