Solved

Cannot add App_code .cs file to the solution

Posted on 2011-03-08
4
788 Views
Last Modified: 2013-12-17
I have a Shared code file database.cs in App_code folder. The solution was built on .NET 2.0 framework. Everything was working fine, untill few minutes ago, I copied the files, created a new folder and opened the folder as a new Web Site. When I was prompted to upgrade from .NET 2.0 to .NET 4.0, I said Yes.

Now for some reason, database.cs file in App_code folder is not getting included in the solution. When I include the namespace defined inside it abc.xyz.data, while debugging, I get an error  Error 7      The type or namespace name 'NeboWeb' could not be found (are you missing a using directive or an assembly reference?)

Seems like .cs files stored in App_code file is not recognized in other files of the solution.

This thing is not just happening in the new project I created by copying the old working Website folder (straight from inetpub), but even the original folder, which I didn't even touched is not working either.

Any idea, why is this happening !
0
Comment
Question by:pratz09
  • 2
4 Comments
 
LVL 5

Expert Comment

by:mayankagarwal
ID: 35070676
the app_code folder should be at the root. Please check the same
0
 

Author Comment

by:pratz09
ID: 35071153
It is at the root level. Thanks,
0
 
LVL 5

Accepted Solution

by:
jijeesh earned 500 total points
ID: 35071339
0
 

Author Closing Comment

by:pratz09
ID: 35071532
Build action: compile property was off. Turned it on and it works now. Thanks.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question