System.Configuration.ConfigurationManager.ConnectionStrings retrieves old value at runtime

梦想的初衷 提交于 2020-05-30 11:41:19

问题


In my dotnetcore winforms application I am able to get the connection string correctly from app.config when running in the IDE

  var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

For run time, I thought I would just replace the connection string in the MyApp.Win.config file. However the connection string is being pulled from MyApp.Win.dll.config

The docs are here.

来源:https://stackoverflow.com/questions/61845150/system-configuration-configurationmanager-connectionstrings-retrieves-old-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!