[Mono-bugs] [Bug 80998][Nor] New - AppCodeCompiler.CollectFiles error

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 2 00:33:34 EST 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mmorano at mikeandwan.us.


--- shadow/80998	2007-03-02 00:33:34.000000000 -0500
+++ shadow/80998.tmp.31241	2007-03-02 00:33:34.000000000 -0500
@@ -0,0 +1,58 @@
+Bug#: 80998
+Product: Mono: Class Libraries
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com                            
+ReportedBy: mmorano at mikeandwan.us               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: AppCodeCompiler.CollectFiles error
+Description of Problem:
+I noticed when my app was starting (and failing on the first page access)
+the site was not able to reference items in the App_Code directory.  The
+way my App_Code directory is setup, is that there are only subdirectories
+and no actual source files in the main App_Code directory, due to how I
+chose to organize my files.
+Anyways, the application was not properly using and compiling the content
+in App_Code.  I traced this to the private AppCodeCompiler.CollectFiles
+methiod.  This is called recursively and maintains a bool value depending
+if files are found to compile.  Well, in my case, there were no files in
+the root, but there were some in the subdirectories, of App_Code. 
+Unfortunately, this was lost as the result is not propogated as needed. 
+The only time the function returns true is when there is a file in the root
+App_Code directory to be compiled.  However, the method should be updated
+to set haveCode = true when directories have code to process as well.
+Steps to reproduce the problem:
+1. Create App_Code dir with a subdir named Test
+2. Add a single C# file to the App_Code/Test directory
+3. Run the application, App_Code is not successfully compiled.
+Actual Results:
+Class Test unavailable because it was not compiled in App_Code as it should
+have been.
+Expected Results:
+App_Code is properly compiled.
+How often does this happen? 
+Additional Information:
+Quick workaround for now could be to create a placeholder class in the root
+of App_Code to trigger the compilation until properly fixed.

More information about the mono-bugs mailing list