We are developing a new ASP.NET web application in Visual studio 2008. Last week we’ve decided to use HttpHandlers instead of some web pages. And as we used to do in Visual Studio 2005 web sites created an App_code folder after that we created new classes under that folder.
Then we noticed that there is intellisense problem with these files. Also we noticed that there is a namespace problem with these classes.
When you add new class to app_code folder VS2008 names the class like this: RootNameSpace.App_Code.Class1. But object browser doesn’t include any definition about App_Code namespace and sub classes.
Then I decided to check the properties of the classes. Right clicked a class under the App_code folder. And select its properties.
When we looked at the properties. We saw build action for class is set to “Content”. Problems are fixed after i changed that property to “Compile”
After i searched the google for source of the problem. Problem is the app_code folder is for the web sites. There is no use of that folder for the web applications. Also app_code folder is not included in the “Add ASP.NET Folder” context menu of the solution explorer when you want to add App_code folder to your web application project.
Happy coding…