简体   繁体   中英

why I got this in my web.config

I got these dlls in gac then why I got them in web.config as well,

<compilation debug="true">
  <assemblies>
    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=removedForPrivacyMyself"/>
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=removedForPrivacyMyself"/>
    <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=removedForPrivacyMyself"/>
    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=removedForPrivacyMyself"/>
  </assemblies>
</compilation>

My application seem to work fine when i remove this section

These are just stored in the config file by default. It also means that you do not need to provide a

using System.Web.Extensions;

etc. in every source file.

During compilation, the compiler will use the <assemblies> section to figure out which assemblies to add into the compilation process. If you do put usings everywhere then indeed this section adds nothing.

Your web application project properly using those assemblies in the reference definition. You can remove them, but remember if you going to use one of those assemblies your web application won't work.

Usually the visual studio add them automatically your web.config

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM