Solved

Cannot add App_code .cs file to the solution

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now