开发者

Getting the errors for code in unopened .aspx pages

Is there a way to check for errors in unopened *.ASPX pages. For example, if you change the name of a function Visual Studio will catch the error on the page and list it in the "Error List" only if the page is opened and being validated?

I guess the question could be is there a validation option opposed to the compil开发者_JS百科e option to check for errors?

(Yes, i know code should go into the pre-compiled code-behind pages.)

How do i find out about the following without running the page through the webserver or opening the page to be validated in VS?

<script runat="server">
     Public Sub MyFunciton() 
         Undefined_FUNCTION()
     End Sub
 </script>


If you include a web deployment project in your solution and set it up to pre-compile your site, it will pick up these types of errors as it will compile the markup pages along with the code behind, whereas at the moment, you are only compiling your code behind and designer files


David Ebbo pointed me to this:

From a VS console window, go to the root of your site and run: aspnet_compiler -v foo -p . That should show you more errors than the Visual Studio compiler output.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜