locked
Namespace recognition problem RRS feed

  • Question

  • User-989545717 posted

    I posted this on the General forum last week and no-one has attemted to address my problem (carried over from a post on another forum the week before, who referred it here).  I am convinced it must be some sort of configuration issue but where?  I know we have a problem in that we are now using VS 2012 Ultimate but continue to use TFS 2008 due to some issue with one of our major systems we support.  However, I can't believe that TFS could be involved in unrecognized namespaces.  (is there somewhere else I should post this?)

    I am trying to get used to all the new VS 2012 changes and ran into a problem with asp.net namespace scope problem using nested namespaces.  I have not been able to locate anything specific to this problem.  Basically, I created a very simple training application to demonstrate Ntier multi-layer programming using a VS 2012 ASP.NET Empty Web Application.  In it I had the student create an "App_Code" folder with two sub-folders "BLL" and "DAL".  The "DAL" folder contains a single C# class file with a namespace of "Ntiertrng.App_Code.DAL" and the the "BLL" folder contains a single C# class file with a namespace of "Ntiertrng.App_Code.BLL" and a using reference to the "DAL" class's namespace that works just fine.  However, at the project level the DEFAULT.ASPX.CS folder (namespace "Ntiertrng") I had him create a "using Ntiertrng.App_Code.BLL" statement which fails to be recognized, as the ".App_Code" portion of the namespace cannot be found and thus cannot access the "BLL" class methods.

    What is it that I am forgetting?  why is the nested ".App_Code" portion of the namespace not found?  Even if I change the folder name and the namspace and using (thinking that App_Code could be a reserved word), I still get the same response no matter what it is called.


    Wednesday, April 17, 2013 10:24 AM

Answers

  • User-166373564 posted

    Hi ronkunce

    I can hardly troubleshoot according to the information above, perhaps some guides are necessary for you to create an N-Tier Data Application,

    One way to separate the various tiers in an n-tier application is to create discrete projects for each tier that you want to include in your application. Typed datasets contain a DataSet Project property that determines which projects the generated dataset and TableAdapter code should go into. You could follow our document to create an N-Tier Data Application, perhaps it will give some tips for you,

    For reference - Walkthrough: Creating an N-Tier Data Application

    hope it helpful to you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 23, 2013 5:38 AM