VS2005 Class Designer Weirdness

Discussion in 'ASP .Net' started by alex, Nov 27, 2005.

  1. alex

    alex Guest

    Moving existing asp.net 1.1 app to 2.0 and using VS2005 I have noticed:

    1) Class View window display ONLY name spaces and classes located in
    the new folder App_Code.

    2) Using "Add New Item" on App_Code folder presents limited number of
    items -> no Web Page, no User Control, giving a hint that these items
    shouldn't go in this folder. Instead should go under the web root and
    other sub-folders.
    I haven't run a conversion wizard on my 1.1 web app and do not know
    where it puts all web page. Can someone provide info on this?

    3) Right click on the web project -> View Class Diagram doesn't work,
    saying "Some of the selected types cannot be added..". Meaning Class
    Diagram works ONLY on App_Code folder as well.

    My point that it is somewhat inconsistent behavior with Class View and
    Class Diagram Windows -> I cannot get a full Class View of my web app
    including web page classes unless all files are in App_Code. In the
    same time I cannot add web pages and user controls into App_Code with
    provided menu (only manually dragging them there form the root).

    I am missing something?
    Thanks
     
    alex, Nov 27, 2005
    #1
    1. Advertisements

  2. alex

    Scott Allen Guest

    Only types that live in App_Code are generally available to the rest
    of the application - anything in that directory gets built into an
    assembly that is referenced by all the other assemblies in the web
    app. App_Code was primarily designed to hold source code (.cs, .vb)
    files, though there is some extensibility there.

    Because of the new compilation model in 2.0, the type in web forms and
    code-behind files aren't always available outside of their own
    definition.
     
    Scott Allen, Nov 27, 2005
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.