Solved

Cannot add App_code .cs file to the solution

Posted on 2011-03-08
4
786 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 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