I have a problem to read app.config file as following.
This is my app.config file.
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <supportedRuntime version="v2.0.50727"/> </startup> <runtime> <enforceFIPSPolicy enabled="false"/> </runtime> <appSettings> <add key="mySetting" value="hello"/> </appSettings> </configuration>and I try to read my config in user code module with following code.
void ITestModule.Run() { Report.Info("My Setting=" + System.Configuration.ConfigurationManager.AppSettings["mySetting"]); }But it doesn't work, the report message just show "My Setting=" with blank value.
Do I miss anything on this?
I have used Ranorex 4.0 and setting the target framework to .NET 4.0 in project properties.
Regards,
Peerapat