appSettings and ConfigurationManager.AppSettings issue

后端 未结 8 1551
情书的邮戳
情书的邮戳 2021-02-12 22:36

I have searched the site, and while I found some very useful information, I couldn\'t figure out what is going on with my code. I have the following web.config:



        
8条回答
  •  南方客
    南方客 (楼主)
    2021-02-12 23:39

    i have two project in my solution first i add app.config file in class library project which all instances is call from console application i added these entries in config file in class lib project

     
     
     
    
    

    it was throwing null exception when i get these in a class in class library project but when i delete app.config from class Library project and added in Console project it works.Cheers

    Note: Class lib project reference is added in console

提交回复
热议问题