I have written some nunit tests and within my test folder and even at the root project dir I have tried link an app.config file to my test code but it never picks up and says cannot have a null value I.e the string I would like pull into my code is not picked up Can you help?
Pretty standard stuff really as you can see.
In app config,
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<ApplicationSettings>
<add key="name" value="Configuration Example Project"/>
</ApplicationSettings>
</configuration>
And within my code,
string data1 = ConfigurationManager.AppSettings["name"];
Btw I do have system.configuration added
So far I have tried moving the app.config file in root dir,test dir, changed name to project name, none of them worked.
As this is the most up to date question on the subject would just like to say have tried all answers from the community but to no avail