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 3482002
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:30:34+00:00 2026-05-18T10:30:34+00:00

I’m struggling to get web.config transformations working with automated builds. We have a reasonably

  • 0

I’m struggling to get web.config transformations working with automated builds.

We have a reasonably large solution, containing one ASP.NET web application and eight class libraries. We have three developers working on the project and, up to now, each has “published” the solution to a local folder then used file copy to deploy to a test server. I’m trying to put an automated build/deploy solution in place using TFS 2010.

I created a build definition and added a call to msdeploy.exe in the build process template, to get the application deployed to the test server. So far, so good!

I then tried to implement web.config transforms and I just can’t get them to work. If I build and publish locally on my PC, the “publish” folder has the correct, transformed web.config file.

Using team build, the transformation just does not happen, and I just have the base web.config file.

I tried adding a post-build step in the web application’s project file, as others have suggested, similar to:

<target name="AfterBuild">
<TransformXml Source="Web.generic.config"
             Transform="$(ProjectConfigTransformFileName)"
             Destination="Web.Config" />
</target>

but this fails beacuse the source web.config file has an “applicationSettings” section. I get the error

Could not find schema information for the element ‘applicationSettings’.

I’ve seen suggstions around adding arguments to the MSBuild task in the build definition like

/t:TransformWebConfig /p:Configuration=Debug

But this falls over when the class library projects are built, presumably because they don’t have a web.config file.

Any ideas? Like others, I thought this would “just work”, but apparently not. This is the last part I need to get working and it’s driving me mad. I’m not an msbuild expert, so plain and simple please!

Thanks in advance.

Doug

  • 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-05-18T10:30:35+00:00Added an answer on May 18, 2026 at 10:30 am

    I just went through this. Our build was a bit more complicated in that we have 8 class libraries and 9 web applications in one solution. But the flow is the same.

    First off get rid of your after build target. You won’t need that.

    You need to use the MSDeployPublish service. This will require that it be installed and configured properly on the destination server. Check the following links for info on this part:

    Note that the server in question MUST be configured properly with the correct user rights. The following sites helped me get that properly set up.

    http://william.jerla.me/post/2010/03/20/Configuring-MSDeploy-in-IIS-7.aspx
    http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html
    How can I get TFS2010 to run MSDEPLOY for me through MSBUILD?

    The next part requires that your build definition have the correct MSBuild parameters set up to do the publish. Those parameters are entered in the Process > 3.Advanced > MS Build Arguments line of the build definition. Here’s a hint:

    (don't change the following for any reason)
    /p:DeployOnBuild=True 
    /p:DeployTarget=MsDeployPublish 
    /p:CreatePackageOnPublish=False 
    /p:MSDeployPublishMethod=WMSVC 
    /p:SkipExtraFilesOnServer=True
    /p:AllowUntrustedCertificate=True 
    
    (These control where it's going)
    
    /p:MSDeployServiceUrl="https://testserver.domain:8172/msdeploy.axd" 
    /p:UserName=testserver\buildaccount 
    /p:Password=buildacctpassword 
    /p:DeployIisAppPath="MyApp - TESTING" 
    

    Obviously the user will have to be configured in IIS on the target server to be allowed access to that axd (see previous links). And the IisAppPath is the name of the website on the target server.

    You won’t have to do anything special for the config transformations as the build itself will take care of that for you. Just have the correct setting in the line at Process > 1. Required > Items to Build > Configurations To Build.

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

Sidebar

Related Questions

No related questions found

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.