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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:12:21+00:00 2026-05-25T23:12:21+00:00

I currently use a web deployment project to update an existing web site through

  • 0

I currently use a web deployment project to update an existing web site through various MSBuild tasks

Taking site offline:

<Target Name="BeforeBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <CreateItem Include="..\website\App_Code\override\App_Offline.htm">
    <Output TaskParameter="Include" ItemName="AppOffline" />
  </CreateItem>
  <Copy SourceFiles="@(AppOffline)" DestinationFiles="@(AppOffline->'\\servername\f$\web\example.com\wwwroot\%(RecursiveDir)%(Filename)%(Extension)')" />
  <RemoveDir Directories="\\servername\f$\web\example.com\wwwroot\bin\" />
</Target>

Update files:

<Target Name="AfterBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <CreateItem Include=".\Release\**\*">
    <Output TaskParameter="Include" ItemName="ReleaseFiles" />
  </CreateItem>
  <Copy SourceFiles="@(ReleaseFiles)" ContinueOnError="true" SkipUnchangedFiles="true" DestinationFiles="@(ReleaseFiles->'\\servername\f$\web\example.com\wwwroot\%(RecursiveDir)%(Filename)%(Extension)')" />
  <Delete Files="\\servername\f$\web\example.com\wwwroot\App_Offline.htm" />
</Target>

However, what I also want to do is backup the existing site before overwriting anything, into a timestamped zip (or 7zip) file, e.g. if done on 3rd October 2011 at 10:35 file would be named \\servername\f$\web\example.com\backup201110031035.7z containing the contents of the wwwroot folder (before taking the site offline and deleting the bin directory)

  • 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-25T23:12:22+00:00Added an answer on May 25, 2026 at 11:12 pm

    The MSBuild Community Tasks provide support for both, zipping and getting the (formatted) current time through the Zip and Time tasks respectively.

    Once the MSBuild community tasks are installed and imported to your project, you can create a backup zip file by adding the following to the beginning of your BeforeBuild target.

    <ItemGroup>
      <FilesToZip Include="\\servername\f$\web\example.com\wwwroot\**\*.*" />
    </ItemGroup>
    <Time Format="yyyyMMddhhmm">
      <Output TaskParameter="FormattedTime" PropertyName="Timestamp" />
    </Time>
    <Zip
      Files="@(FilesToZip)"
      ZipFileName="\\servername\f$\web\example.com\backup$(Timestamp).zip"
      WorkingDirectory="\\servername\f$\web\example.com\wwwroot" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently use SQL Server to store products in a large catalog web site.
I'm used to use web deployment projects. Currently I am developing a new web
We already have an existing MSI Installer (web deployment project - .vdproj) that we
I currently use my local web server to allow costumers to preview some applications
We currently use LoadRunner for performance testing our web apps, but we also have
In the web-application I'm developing I currently use a naive solution when connecting to
Currently I have a web application where a user can use dropdown lists to
I'm currently working on building a java web app. I've been looking to use
What tecnology should i use? Currently i am thinking of creating a web application
I am using mod_perl for my web application. Currently, I plan to use a

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.