App_Code problem
-
I was using a project for months, no problem. Something changed 3 days ago in my project. Now it won't compile/run. It complains that every class in App_Code folder doesn't exist. They worked fine before. The files exist. The folder exists. I rename the Utilities.vb file and create a new one. Still says class undefined. I started a new Web App. Right-click on project->Add->Folder->App_Code (since the menu item App_Code isn't an option) Add a class to App_Code. I notice the Build Action is Compile. :omg: Switch back to 1st project. None of the classes are set to Compile. Okay, change that, Run. Now, it Builds the project, but the web server complains the classes are AMBIGUOUS. :sigh: Make up your bloody mind. Compiler Error Message: BC30175: class 'Utilities' and class 'Utilities', declared in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2d7f8030\4e18611d\App_Code.idisyg3r.3.vb', conflict in namespace '<Default>'. Source Error: Line 9: Imports CrystalDecisions.CrystalReports.Engine Line 10: Line 11: Public Class Utilities Line 12: Public Shared Function GetAuthenticationTypes() As IDictionary Line 13: Dim mySortedList As IDictionary = New SortedList() After 3 days of beating my head in, I realize my renamed class which is Excluded from the project, but still in the folder, is causing this. I delete it. Why on Earth would Studio interpret a class Excluded from the project just cause it's in the folder? And how did all my classes get set to Content, not Compile?
Cheetah. Ferret. Gonads. What more can I say? - Pete O'Hanlon
-
I was using a project for months, no problem. Something changed 3 days ago in my project. Now it won't compile/run. It complains that every class in App_Code folder doesn't exist. They worked fine before. The files exist. The folder exists. I rename the Utilities.vb file and create a new one. Still says class undefined. I started a new Web App. Right-click on project->Add->Folder->App_Code (since the menu item App_Code isn't an option) Add a class to App_Code. I notice the Build Action is Compile. :omg: Switch back to 1st project. None of the classes are set to Compile. Okay, change that, Run. Now, it Builds the project, but the web server complains the classes are AMBIGUOUS. :sigh: Make up your bloody mind. Compiler Error Message: BC30175: class 'Utilities' and class 'Utilities', declared in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2d7f8030\4e18611d\App_Code.idisyg3r.3.vb', conflict in namespace '<Default>'. Source Error: Line 9: Imports CrystalDecisions.CrystalReports.Engine Line 10: Line 11: Public Class Utilities Line 12: Public Shared Function GetAuthenticationTypes() As IDictionary Line 13: Dim mySortedList As IDictionary = New SortedList() After 3 days of beating my head in, I realize my renamed class which is Excluded from the project, but still in the folder, is causing this. I delete it. Why on Earth would Studio interpret a class Excluded from the project just cause it's in the folder? And how did all my classes get set to Content, not Compile?
Cheetah. Ferret. Gonads. What more can I say? - Pete O'Hanlon
i'm not positive about this, but it would appear that the IDE doesn't compile your web application, the asp.net compiler does; and it likes to compile everything in the web directory, whether it is part of your project or not
Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com