Object reference not set to an instance of an object. - App.config

后端 未结 5 2009
南笙
南笙 2021-01-03 01:05

I receiving the error and in the local window I am seeing for both conSettings and connectionString value of null. I am right to say ConfigurationManager is null and I need

5条回答
  •  时光取名叫无心
    2021-01-03 01:53

    This happened to me in class library with a console app set to run for debugging.

    It is necessary to add the connection to the app.config in the console app, as it will not find it in your library if you're starting it from an outside process.

提交回复
热议问题