.Net 2.0, UserControl in a subfolder won't compile

Discussion in 'ASP .Net' started by =?Utf-8?B?aW5zdHJ1bw==?=, May 15, 2006.

  1. Hi all,

    Have an issue in VS 2005 that I can't seem to sort out. I have a couple of
    UserContols that I would like to have in a Controls subfolder off my
    application root. The problem is that when the files are in that folder, I
    get several build errors, all along the lines of "The type or namespace name
    '____' does not exist in the namespace '__________.___________' (are you
    missing an assembly reference?", anywhere that I try to load them.

    The thing is, if I have the files located under my application root, they
    build and work just fine. Any suggestions? Thanks!
     
    =?Utf-8?B?aW5zdHJ1bw==?=, May 15, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?aW5zdHJ1bw==?=

    PeterKellner Guest

    by default, the only code that will get compiled is what is in the root and
    in the app_code subdirectory. If you want to add other files, you need to
    add to web.config:

    <compilation>
    <codeSubDirectories>
    <add directoryName="CSFolderForUserControls" />
    </cod....
    </compil...

    Hope that helps

    Peter Kellner
    http://peterkellner.net



    "instruo" <> wrote in message
    news:...
    > Hi all,
    >
    > Have an issue in VS 2005 that I can't seem to sort out. I have a couple
    > of
    > UserContols that I would like to have in a Controls subfolder off my
    > application root. The problem is that when the files are in that folder,
    > I
    > get several build errors, all along the lines of "The type or namespace
    > name
    > '____' does not exist in the namespace '__________.___________' (are you
    > missing an assembly reference?", anywhere that I try to load them.
    >
    > The thing is, if I have the files located under my application root, they
    > build and work just fine. Any suggestions? Thanks!
     
    PeterKellner, May 16, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lars Pedersen

    Usercontrol in webforms subfolder

    Lars Pedersen, Jul 6, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    412
    Lars Pedersen
    Jul 6, 2003
  2. m_evergreen
    Replies:
    1
    Views:
    405
    Curt_C [MVP]
    Apr 22, 2004
  3. Jeff
    Replies:
    1
    Views:
    361
    Brock Allen
    Aug 1, 2005
  4. =?Utf-8?B?d2FsdGVy?=

    How to compile a subfolder into a DLL?

    =?Utf-8?B?d2FsdGVy?=, Mar 8, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    493
    Juan T. Llibre
    Mar 9, 2006
  5. Nagaraj
    Replies:
    1
    Views:
    924
    Lionel B
    Mar 1, 2007
Loading...

Share This Page