Solved

Cannot add App_code .cs file to the solution

Posted on 2011-03-08
4
791 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 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