Microsoft 开发人员网络 > 论坛主页 > Managed Extensibility Framework > Several contributors to unity configuration in app.config ?
提出问题提出问题
 

问题Several contributors to unity configuration in app.config ?

  • 2009年5月27日 9:51Jaunedeau 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hi,

      I have an application with several layers. Each application contribute some <typeAlias> and some <type> to the <unity> node in app.config.

      I want to split the big app.config file and have one (or several) for each layer because :
    -This file is getting too huge and is getting hard to maintain
    -Having mapping defined for other interfaces of layers impli that I must have the implementation assembly of those layers, which is bad for reuse and unit testing.

      How can I merge all the isolated app.config files defining mappings for each layer so my final app can Resolve<>() every mapping in the end ? Is there a better way than running a custom tool that would do the merge at build time ?

    Regards,
    John.