How to find path of active app.config file?

后端 未结 8 2028
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 04:43

I\'m trying to finish this exception handler:

if (ConfigurationManager.ConnectionStrings[\"ConnectionString\"]==null)
{
    string pathOfActiveConfigFile = .         


        
8条回答
  •  不思量自难忘°
    2020-12-02 05:35

    Make sure you click the properties on the file and set it to "copy always" or it will not be in the Debug\ folder with your happy lil dll's to configure where it needs to be and add more cowbell

提交回复
热议问题