Do binding redirects in app.config for class libraries do anything?

前端 未结 5 479
深忆病人
深忆病人 2021-02-01 12:55

The VS solutions I often work with consist of a single executable project (console app, web app) and many class library projects that are all r

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 13:12

    I have multiple applications with similar setup - Web application referencing multiple library projects each having their own nuget packages etc., Based on my personal experience the assembly bindings in the library projects are not considered during run time.

    The bindings specified web or app config in the root application (web/console) is that only matters. All my library projects are setup with "Copy to Output Directory" setting as "Do not copy" for the app.config file - that way my output folder is not cluttered with dll and their config files.

    Here is the link which says how the assembly is loaded and where is it being searched and the sequence of it. No where in the article they talk about individual project config files.

    Hope that helps.

提交回复
热议问题