Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8129211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:13:12+00:00 2026-06-06T08:13:12+00:00

I want to use Web.Debug.config and Web.Release.config each. But it does not work in

  • 0

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,

enter image description here

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?

enter image description here

If I change to Release or Debug then what effect to my project?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:13:14+00:00Added an answer on June 6, 2026 at 8:13 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to try to use Web API make a rest call but I
I have developed a web application in Visual Studio 2008 and want to publish
I’m a fan of the new VS 2010 Web.config transformations. I use this feature
I have an underlying ruby game-engine code and I want to use the web
I want to use dwscript for web programming ( generating dynamic content). I was
i want use some data from a website with web service. i have a
I want to use an AES 256-bit web service with a Windows Mobile 6.1
I want to use session object in my web app.I want to store some
I want to use bar chart in web application. I have searched many libraries
I want to use Services(WCF/RIA /Web) to take data from Entity Data Model class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.