Removing all assemblies from <compilation><assemblies> in ASP.NET 4 web.config

Posted by Merritt on Stack Overflow See other posts from Stack Overflow or by Merritt
Published on 2010-06-03T15:12:37Z Indexed on 2010/06/03 15:14 UTC
Read the original article Hit count: 482

Filed under:

I removed all the 'add' elements in the compilation/assemblies element.

So initially in my application's root web.config file:

<compilation debug="true" targetFramework="4.0">
  <assemblies>
    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
  </assemblies>
</compilation>

Now it looks like:

<compilation debug="true" targetFramework="4.0">
  <assemblies>
  </assemblies>
</compilation>

And my application still works. The project file still has all the references I removed, but this section appears to be unused during compilation (inside visual studio).

What is going on?

© Stack Overflow or respective owner

Related posts about ASP.NET