0
votes

My code in VS2015 ultimate is:

BrowserWindow browser = BrowserWindow.Launch(ConfigurationManager.AppSettings["URL"]);

While using this code I'm getting error in the code and when I mouse hovered it I got this 'object' does not contain a definition for "AppSettings" and no extension method 'AppSettings' accepting a first argument of type object could be found(are you missing a using directive or an assembly reference?).

But I have provided using System.Configuration;. And this code was working perfectly in VS2012 ultimate. Can anyone provide me a solution for this issue?

1
Sorry it is vs2015 Enterprise not ultimateParama Sivam
If you build your coded ui test, do you find any clues to what is wrong in the output window? Perhaps a warning? Do you get the same results if you reference System.Configuration directly in your code like so: BrowserWindow.Launch(System.Configuration.ConfigurationManager.AppSettings["URL"]);PixelPlex
I got the solution, I used this code "BrowserWindow.Launch(System.Configuration.ConfigurationManager.AppSettings["URL"]);" and also I added System.configuration to the References. It workedParama Sivam
I'm happy you found a solution to your problem. You should add your solution as an answer to your own question and mark it as a correct answer, so other people see this question is solved.PixelPlex

1 Answers

0
votes

I got the solution, I used this code

BrowserWindow.Launch(System.Configuration.ConfigurationManager.AppSettings["URL"]);

Also, I added System.configuration to the References. It then worked.