The element 'compilation' has invalid child element 'compilers'.

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9iZXJ0?=, Nov 15, 2005.

  1. I have a number of web projects converted from 1.1 to 2.0 in VS2005.

    I am methodically seeing the error below:

    The element 'compilation' has invalid child element 'compilers'. List of
    possible elements expected: 'assemblies, buildProviders, codeSubDirectories,
    expressionBuilders'.

    Here's what the web config looks like. The error doesn't cause any issues
    and according to the MSDN documentation this is valid. So why is VS2005
    giving me this bogus error?

    <configuration>
    <system.web>
    <httpRuntime maxRequestLength="8192"/>
    <!-- DYNAMIC DEBUG COMPILATION
    Set compilation debug="true" to insert debugging symbols (.pdb
    information)
    into the compiled page. Because this creates a larger file that
    executes
    more slowly, you should set this value to true only when debugging
    and to
    false at all other times. For more information, refer to the
    documentation about
    debugging ASP.NET files.
    -->
    <compilation defaultLanguage="vb" debug="true" batch="false">
    <compilers>
    <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
    System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
    extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
    /imports:Microsoft.VisualBasic,System,System.Collections,System.Configuration,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlControls,System.Web.UI.WebControls"/></compilers>
    <assemblies>

    etc, etc,
    =?Utf-8?B?Um9iZXJ0?=, Nov 15, 2005
    #1
    1. Advertising

  2. In 2.0, the <compilers> section is found in machine.config,
    so you don't need to place it in web.config.

    Check out machine.config.comments in the .Net Framework\config dir.

    The syntax has changed.
    It's now in the <system.codedom> section.

    See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx




    Juan T. Llibre, ASP.NET MVP
    ASP.NET FAQ : http://asp.net.do/faq/
    ASPNETFAQ.COM : http://www.aspnetfaq.com/
    Foros de ASP.NET en Español : http://asp.net.do/foros/
    ======================================
    "Robert" <> wrote in message
    news:...
    >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
    >
    > I am methodically seeing the error below:
    >
    > The element 'compilation' has invalid child element 'compilers'. List of
    > possible elements expected: 'assemblies, buildProviders, codeSubDirectories,
    > expressionBuilders'.
    >
    > Here's what the web config looks like. The error doesn't cause any issues
    > and according to the MSDN documentation this is valid. So why is VS2005
    > giving me this bogus error?
    >
    > <configuration>
    > <system.web>
    > <httpRuntime maxRequestLength="8192"/>
    > <!-- DYNAMIC DEBUG COMPILATION
    > Set compilation debug="true" to insert debugging symbols (.pdb
    > information)
    > into the compiled page. Because this creates a larger file that
    > executes
    > more slowly, you should set this value to true only when debugging
    > and to
    > false at all other times. For more information, refer to the
    > documentation about
    > debugging ASP.NET files.
    > -->
    > <compilation defaultLanguage="vb" debug="true" batch="false">
    > <compilers>
    > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
    > System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
    > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
    > /imports:Microsoft.VisualBasic,System,System.Collections,System.Configuration,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlControls,System.Web.UI.WebControls"/></compilers>
    > <assemblies>
    >
    > etc, etc,
    >
    >
    Juan T. Llibre, Nov 15, 2005
    #2
    1. Advertising

  3. Re: The element 'compilation' has invalid child element 'compilers

    Thanks for the response.

    I removed it entirely from web.config as it is apparently unnecessary.

    Guess I wish the migration wizard could of either 1) removed it for me or 2)
    flagged it as a todo with an explanation.

    Thx.
    R-

    "Juan T. Llibre" wrote:

    > In 2.0, the <compilers> section is found in machine.config,
    > so you don't need to place it in web.config.
    >
    > Check out machine.config.comments in the .Net Framework\config dir.
    >
    > The syntax has changed.
    > It's now in the <system.codedom> section.
    >
    > See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
    >
    >
    >
    >
    > Juan T. Llibre, ASP.NET MVP
    > ASP.NET FAQ : http://asp.net.do/faq/
    > ASPNETFAQ.COM : http://www.aspnetfaq.com/
    > Foros de ASP.NET en Español : http://asp.net.do/foros/
    > ======================================
    > "Robert" <> wrote in message
    > news:...
    > >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
    > >
    > > I am methodically seeing the error below:
    > >
    > > The element 'compilation' has invalid child element 'compilers'. List of
    > > possible elements expected: 'assemblies, buildProviders, codeSubDirectories,
    > > expressionBuilders'.
    > >
    > > Here's what the web config looks like. The error doesn't cause any issues
    > > and according to the MSDN documentation this is valid. So why is VS2005
    > > giving me this bogus error?
    > >
    > > <configuration>
    > > <system.web>
    > > <httpRuntime maxRequestLength="8192"/>
    > > <!-- DYNAMIC DEBUG COMPILATION
    > > Set compilation debug="true" to insert debugging symbols (.pdb
    > > information)
    > > into the compiled page. Because this creates a larger file that
    > > executes
    > > more slowly, you should set this value to true only when debugging
    > > and to
    > > false at all other times. For more information, refer to the
    > > documentation about
    > > debugging ASP.NET files.
    > > -->
    > > <compilation defaultLanguage="vb" debug="true" batch="false">
    > > <compilers>
    > > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
    > > System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
    > > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
    > > /imports:Microsoft.VisualBasic,System,System.Collections,System.Configuration,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlControls,System.Web.UI.WebControls"/></compilers>
    > > <assemblies>
    > >
    > > etc, etc,
    > >
    > >

    >
    >
    >
    =?Utf-8?B?Um9iZXJ0?=, Nov 15, 2005
    #3
  4. Re: The element 'compilation' has invalid child element 'compilers

    Hi Robert,

    Yes, what a pity that the migration wizard was not able to automatically
    correct this, maybe it is due to the <system.codedom> is outside the
    <system.web> that beyond the migration checking. Anyway, the error message
    make some sense, also thanks for Juan's informative suggestion.

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)





    --------------------
    | Thread-Topic: The element 'compilation' has invalid child element
    'compilers
    | thread-index: AcXpe7dhGIAffoz4SzOtjdSjQDOyUA==
    | X-WBNR-Posting-Host: 67.180.214.235
    | From: =?Utf-8?B?Um9iZXJ0?= <>
    | References: <>
    <>
    | Subject: Re: The element 'compilation' has invalid child element
    'compilers
    | Date: Mon, 14 Nov 2005 16:30:01 -0800
    | Lines: 72
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 8bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet:358118
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Thanks for the response.
    |
    | I removed it entirely from web.config as it is apparently unnecessary.
    |
    | Guess I wish the migration wizard could of either 1) removed it for me or
    2)
    | flagged it as a todo with an explanation.
    |
    | Thx.
    | R-
    |
    | "Juan T. Llibre" wrote:
    |
    | > In 2.0, the <compilers> section is found in machine.config,
    | > so you don't need to place it in web.config.
    | >
    | > Check out machine.config.comments in the .Net Framework\config dir.
    | >
    | > The syntax has changed.
    | > It's now in the <system.codedom> section.
    | >
    | > See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
    | >
    | >
    | >
    | >
    | > Juan T. Llibre, ASP.NET MVP
    | > ASP.NET FAQ : http://asp.net.do/faq/
    | > ASPNETFAQ.COM : http://www.aspnetfaq.com/
    | > Foros de ASP.NET en Español : http://asp.net.do/foros/
    | > ======================================
    | > "Robert" <> wrote in message
    | > news:...
    | > >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
    | > >
    | > > I am methodically seeing the error below:
    | > >
    | > > The element 'compilation' has invalid child element 'compilers'.
    List of
    | > > possible elements expected: 'assemblies, buildProviders,
    codeSubDirectories,
    | > > expressionBuilders'.
    | > >
    | > > Here's what the web config looks like. The error doesn't cause any
    issues
    | > > and according to the MSDN documentation this is valid. So why is
    VS2005
    | > > giving me this bogus error?
    | > >
    | > > <configuration>
    | > > <system.web>
    | > > <httpRuntime maxRequestLength="8192"/>
    | > > <!-- DYNAMIC DEBUG COMPILATION
    | > > Set compilation debug="true" to insert debugging symbols
    (.pdb
    | > > information)
    | > > into the compiled page. Because this creates a larger file
    that
    | > > executes
    | > > more slowly, you should set this value to true only when
    debugging
    | > > and to
    | > > false at all other times. For more information, refer to the
    | > > documentation about
    | > > debugging ASP.NET files.
    | > > -->
    | > > <compilation defaultLanguage="vb" debug="true" batch="false">
    | > > <compilers>
    | > > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
    | > > System, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B77A5C561934E089"
    | > > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
    | > >
    /imports:Microsoft.VisualBasic,System,System.Collections,System.Configuratio
    n,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlCont
    rols,System.Web.UI.WebControls"/></compilers>
    | > > <assemblies>
    | > >
    | > > etc, etc,
    | > >
    | > >
    | >
    | >
    | >
    |
    Steven Cheng[MSFT], Nov 15, 2005
    #4
    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.

Share This Page