[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Visual Studio 2010 Express not finding classes in namespace via Intellisense or class view

Posted on 2011-02-15
6
Medium Priority
?
1,193 Views
Last Modified: 2013-11-27
I had a project I wanted to resurrect from years past and get moving again. I had various class files already developed in VS Express 2008 already written. I created a new .NET Web Application Project using 4.0. I copied my files into a new App_Code folder and then added them to the project via the solution explorer and didn't think anything of it. After spending some time building my site framework, I started in on the code behind of one of the pages and when I went to reference a class file, it wouldn't appear in the Intellisense. I confirmed it was the same namespace as the page I was working on and tried again, still nothing.  I checked class view and all the classes I had imported were missing, but they all had the same namespace as well.  Finally, to check my own sanity, I created a new class in the project but now even that doesn't show up in class view or Intellisense.  

These are all just straight up code *.cs files, nothing is compiled, no DLL reference and every file uses the same namespace. Am I missing a step (prayer beads? mystic? voodoo chant?) to get these properly imported and functional in my project? Should I not use the App_Code folder? I'm dead in the water!

My Solution Explorer
0
Comment
Question by:codemonkey21
[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
6 Comments
 
LVL 12

Expert Comment

by:Praveen Kumar
ID: 34896290
Did you checked the Namespace names in your copied classes and your project? They both should be same in order to get by default. Otherwise use namespace.classname
0
 
LVL 10

Expert Comment

by:John Claes
ID: 34896417
Remember, that Web Site Project can contain App_Code folder and Web Application Project can't! Because all project is for code.
0
 
LVL 10

Expert Comment

by:John Claes
ID: 34896481
I created a new .NET Web Application Project using 4.0

Remember, that Web Site Project can contain App_Code folder and Web Application Project can't!
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 3

Accepted Solution

by:
chandra_darbha earned 2000 total points
ID: 34897109
Though I am not sure how this can happen, just check if the file properties have the right Build Action.

 Screenshot
This can be a reason why you don't get intellisense (if the Build Action is not Compile for some reason)

Thanks,
Chandra
0
 
LVL 10

Expert Comment

by:John Claes
ID: 34897154
App_Code is not used inside Web applications. This documented by Microsft.

You can try to use the "App_LocalResources" folder


app_code is only used in Web Sites.
0
 

Author Closing Comment

by:codemonkey21
ID: 34902577
Setting the build property from Content to Compile worked. Changing the folder hosting the classes (App_Code) was irrelevant, I tested both with and without an App_Code folder.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

649 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