I want to use Web.Debug.config and Web.Release.config each.
But it does not work in Visual Studio 2010 And it works on actual server after deployment.
Web.Release.config
<appSettings>
<add key="GOOGLE_MERCHANT_ID" value="LIVE_GOOGLE_MERCHANT_ID" xdt:Transform="Insert" xdt:Locator="Match(key)" />
</appSettings>
Web.Debug.config
<appSettings>
<add key="GOOGLE_MERCHANT_ID" value="DEBUG_GOOGLE_MERCHANT_ID" xdt:Transform="Insert" xdt:Locator="Match(key)" />
</appSettings>
I have like above config files and I try to echo on screen the config value.
string t = WebConfigurationManager.AppSettings["GOOGLE_MERCHANT_ID"]; Response.Write(t);
On Visual studio,

set as Release mode, and F5 (also I tried Build Solution(F6)) but it doesn’t print anything.
So I try to Deployment package and install on server and run then it prints the right value.
How I do for that in Visual studio? I want to make sure everything OK before deploy package.
Please advise me~
Thank you!
[Edit]
Now I get it, thank you for everyone who gave me nice answer!
May I ask one more question please?
then what’s this for?

If I change to Release or Debug then what effect to my project?
See this post https://stackoverflow.com/a/5734829/611288
As Jimmy says, the web.config transforms are only applied during the Web Publish Pipleline
Jimmy also supplies the following link for a hack: http://sedodream.com/2010/10/21/ASPNETWebProjectsWebdebugconfigWebreleaseconfig.aspx
Alternatively, create a test deploy that deploys locally and test the config settings there.