views:

32

answers:

3

Hello,

I have inherited a code base that does not compile properly. The project is a Visual Studio 2005 web site. I want to move it to a web application. The first thing I am trying to do is move the "App_Code" directory over. The pages in the application rely on some class objects that are defined in the "App_Code" directory.

Visual Studio 2005 does not directly give you the ability to add a "App_Code" directory. Because of this, I manually created one. I then placed the class definitions in this directory. I then compiled the web application.

Next I attempted to migrate the Default.aspx page. This page derives from a class called GenericPage defined in the App_Code directory. However, I cannot seem to reference this class. The definition does not use any namespaces. Where does this code get stored? How do I reference it?

Thank you!

A: 

Maybe this tutorial is helpful: Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio 2005

I'm reading at various places that the App_Code folder should not be used in Web Application Projects. See also this SO question: App_Code folder issues

The solution given in that last link is:

Create a new folder called code or something and put them in there.

Cloud
A: 

You might have to try grabbing it by using the global namespace.

Example:

var somePage = new global::DefaultNamespaceForProject.PageICantFind();
Joseph