简体   繁体   中英

The app.config file is not loaded using Shuttle.Core.Host

I have created a wrapper assembly for the Shuttle ESB that loads all the service bus configuration (queues, routing, modules etc.) from a database and not an app.config file.

I am exposing this solution as a Nuget package so that other solution teams in our organisation can create endpoints enabling them to implement only their message handlers. Note that we have standardized hosting for our endpoints by using the Shuttle.Core.Host.exe solution.

The Shuttle.Core.Host scans for IHost implementation and picks it up from my wrapper/nuget package and tries to load the app.config of that assembly type and not the solution teams project's (that references the nuget package) app.config files.

Is their anyway that I can explicitly specify which app.config must be loaded for the Shuttle.Core.Host?

The current implementation works exactly as you have stated and, unfortunately, there is no way to specify a configuration file.

I suggest you log an issue on the GitHub repository in this regard.

Perhaps a /configurationFile=somefile.config parameter would do this trick.

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