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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:40:45+00:00 2026-05-23T06:40:45+00:00

We have 4 different environments at the moment (Lab, Test, Stage, LIVE) and we

  • 0

We have 4 different environments at the moment (Lab, Test, Stage, LIVE) and we have implemented automatic deployment using Nant/CC.Net. I am investigating and doing some research as to what can be done more efficiently with new MSDeploy tool.

What I want to achieve is to create a package with a Configuration folder inside which we will have all the different configuration files for all the possible environments (basically adding all config transform files)

What I want to achieve is automatic deployment in our enterprise environment where development team hasn’t got any access to the server where it is going to be deployed. We just need to hand over the deployment package with predefined instruction to how to install the package.

What’s the best approach you can think of. WE ARE NOT USING TFS and don’t want the automatic build process to be dependent on any process as such except MSDeploy or something which is easy to replace. Thinking of using MSBuild too.

  • 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-23T06:40:46+00:00Added an answer on May 23, 2026 at 6:40 am

    You can achieve it using below solution. In between, I got the guidance from ONE OF THE BEST BOOK I HAVE READ IN LONG LONG TIME. Book is “Inside the Microsoft Build Engine” written by Sayed Ibrahim Hashimi and William Bartholomew. Book goes through the detail in excellent way.

    Create a msbuild proj file as shown below

    <?xml version="1.0" encoding="utf-8"?>
    
    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="TransformAll">
    
      <UsingTask TaskName="TransformXml"  AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll"/>
    
      <PropertyGroup>
        <DestDirectory>C:\Temp\DeployPackage\TRANSFORM_CONFIGS\</DestDirectory>
      </PropertyGroup>
    
      <ItemGroup>
        <TransformFiles Include="$(FilesToTransform)"/>
      </ItemGroup>
    
      <Target Name="TransformAll" DependsOnTargets="ValidateSettings">
        <MakeDir Directories="$(DestDirectory)"/>
        <TransformXml Source="..\web.config"
                      Transform="%(TransformFiles.Identity)"
                      Destination="@(TransformFiles->'$(DestDirectory)%(Filename).transformed.config')" />
      </Target>
    
      <Target Name="ValidateSettings">
        <Error Text="FilesToTransform cannot be empty"
               Condition=" '$(FilesToTransform)'=='' "/>
        <Error Text="Couldn't find transform file at [%(TransformFiles.Fullpath)]"
               Condition =" !Exists('%(TransformFiles.Fullpath)') "/>
      </Target>
    
    </Project>
    

    After adding the above proj file and adding your environment specific files in a folder, simply run the below through msbuild accessible command line

    msbuild transform.proj /t:TransformAll /p:FilesToTransform="Lab.config;Test.config;Live.config"
    

    Hope this helps. Don’t forget to buy/refer “Inside teh Microsoft Build Engine” book.

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

Sidebar

Related Questions

I have a web service that needs different settings for different environments (debug, test,
I have a website that is deployed between 3 different environments - Dev, Stage,
I have different projects written in .NET 3.5 and some unit test projects to
I have different environments for my application (Dev -> Test -> Prod), and I'm
We have a series of web services that live in different environments (dev/qa/staging/production) that
we have two different environments (test and production), each with it's own database connection.
I have ASP.NET applications deployed on a number of different environments (AppHarbor, Azure, DiscountASP.NET,
I'm using git for a personal project at the moment and have run into
We are using Maven(3.0.3) as build tool and we need to have different version
I work in two different environments for developing an android application, and I have

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.