简体   繁体   English

未使用Shuttle.Core.Host加载app.config文件

[英]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. 我为Shuttle ESB创建了一个包装程序集,该程序集从数据库而不是app.config文件中加载所有服务总线配置(队列,路由,模块等)。

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. 我将这个解决方案作为Nuget软件包公开,以便我们组织中的其他解决方案团队可以创建终结点,使他们仅可以实现其消息处理程序。 Note that we have standardized hosting for our endpoints by using the Shuttle.Core.Host.exe solution. 请注意,我们已经使用Shuttle.Core.Host.exe解决方案对端点进行了标准化的托管。

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. Shuttle.Core.Host会扫描IHost实现,并从我的包装器/ nuget程序包中提取它,并尝试加载该程序集类型的app.config,而不是加载解决方案团队项目(引用nuget程序包)的app.config文件。

Is their anyway that I can explicitly specify which app.config must be loaded for the Shuttle.Core.Host? 无论如何,我可以明确指定必须为Shuttle.Core.Host加载哪个app.config吗?

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. 我建议您在这方面在GitHub存储库上记录问题。

Perhaps a /configurationFile=somefile.config parameter would do this trick. 也许/configurationFile=somefile.config参数可以解决这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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