Windows 服务多语言化时读取配置文件失败的问题。

时间:2016-03-28 18:22:07   收藏:0   阅读:350

在Installer中,按一般读取配置文件的方法(ConfigurationManager.AppSettings["CultureName"])读取不到内容.

可以这样读取:

var config = ConfigurationManager.OpenExeConfiguration(Assembly.GetAssembly(typeof(ProjectInstaller)).Location);
string cultureName = config.AppSettings.Settings["CultureName"].Value;

原文:http://www.cnblogs.com/sdner/p/5329751.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!