Hi,
Use the below technique to do the same.
public static string GetConnectionString()
{
#if (DEBUG)
return testConnectionString;
#else
return productionConnectionString;
#endif
}
To change the mode follow the below step.
1. Right click on root project.
2. Select properties
3. Select configuration
4. Change all the configuration to Release
5. Click Apply, Click Ok
Re-Run the application.
Hope this will help you.