New Utility: WebDeploy

Updated: Please View this post for the latest version.

I've finally put the finishing touches on my pet project over the last few weeks, and have released it to the public.  WebDeploy, is a small windows application that allows a developer to easily transfer files from one location to another based on extensions.  The tool has become a major workhorse in my daily work routine of deploying web applications, in which I only want to copy over images, webforms, or assemblies.

WebDeploy's main user interface.

As the above image shows, you define your source and destination folders by either typing the location or using the folder selection.  The source and destination textboxes (and folder selection) allows you to choose any available directory, either on your hard drive or on a file share (you can use UNC paths). An easily available checked listbox to the right allows you to select extensions you wish to deploy at the current time.  Further configuration of the application allows you to add/remove extensions, and also set your default selected extensions.  When you're ready to deploy your files, you can:

1) Click the "Deploy" button
2) Click "Tools" -> "Deploy" in the file menu
3) Hit F5

The configuration dialog for WebDeploy

The configuration dialog allows you customize WebDeploy to your needs.  In it, you can add any number of extensions you wish to copy at some point or another.  The left checked listbox allows you to choose your default selected extensions whenever the application loads.  You also have the option to copy empty directories, auto-fill your last used directories (when the application starts), and backup destination files prior to deploying.  The backup feature is really nice if you're copying a large amount of items, and you made a mistake.  Just by clicking the "Deploy" button again, the files are restored to their original items.

File Transfer Exceptions dialog for WebDeploy

The last dialog that is available, is an exceptions dialog.  If for some reason any file cannot be copied due to a thread being aborted, the file is in accessible because its currently in use, or you don't have permission, the information is logged.  The exceptions dialog will allow you view a listing of files and their exceptions for the last deployment during the current session.

I'm providing this application as freeware to anyone who wishes to use it, however source code is not available.  I'm planning on advancing the application to allow deployment via FTP in future versions, so those of you (me included) that don't have local access to your webserver will not be out in the cold.  I would also like to hear what else you wish to have included for WebDeploy.  I want this application to grow as a normal staple of every developers tool box...it's already grown to be a major tool in mine.

If you wish to download WebDeploy, click here.  You will need the .NET Framework 1.1.4322 to run WebDeploy.

13 Comments

  • You do realize Whidbey will have this functionality, right?



    Pretty dang sweet though.

  • Very nice application. Something like this should have been built into Visual Studio. One feature that might be useful is the ability to save the deployment source and destination paths in case you need to deploy multiple applications often.



    Thanks for the application

  • Couple of other thoughts....



    Hook into NAnt, and allow the developer to choose which configuration (Debug, Development, Production, Release, Staging, etc...) and actually build it for them. Also VB.NET web projects have the feature of web.config override.



    Maybe you could do something like create deployment profiles, so that a user could choose to override web.config with a file called production.config. This would copy the production.config to the new server and rename it to web.config. We use this to maintain different config files in our vb.net web projects. Unfortunately C# web projects do not have this same ability.

  • Last comment i promise =)



    VS.NET does have this inherent functionality, you can use the Copy Project menuitem/toolbar menu (located on the solution explorer) to deploy web projects across file shares.

  • Now I'm not saying it's not a neat tool, I am sure a lot of programmers will have use for this.

  • Jeff G: Copy Web project has some issues (apologies to anyone who worked on it). It doesn't allow for true XCopy deployment. It still tried to create a FP web for the project on the target server even if you select "file share". If you don't have admin permissions on the server, it gives you an error but still copies the files which is nice. But I always worry that it's going to futz up the web application settings some time.



    Updated: Next feature request: The ability to select whether or not the target file should be overwritten based on it's last modified date. What I'd like to see is a checkbox that says "check last modified date". If it's checked, WebDeploy would check the File.GetLastWriteDate of the target file. If the GetLastWriteDate value of the file is older than the source file, then the file is overwritten otherwise it is not.



    A lot of times I have three or four changed ASPX files I need to deploy up to our server. Rather than having to go through each directory by hand and copy them up there, I think the ability to only copy the files that have been changed since the last copy would be pretty handy.

  • Scott: I totally agree with you.. I'll definately look into that feature, however most of the time, just copying all the files isn't a problem.



    I've already got some more ideas floating around in my head, so we'll see where this takes... I think for v0.6, I want to get FTP working :)

  • Scott, the only error I have ever gotten with Copy project is because IIS on the client and server are different versions. I have not had to work in a hosted environment though, so you could be correct.



    I posted on the other topic about build processes, which I really feel are superior to what we are currently discussing. Great work on the tool though Matt!

  • I think v0.6 will be released tomorrow with new stuff!



    Stay tuned for the updates!

  • Can we run it from the command line?

  • Yes, this was implemented long ago. The GUI is WebDeploy-GUI.exe and the console (which will launch the GUI if -u isn't specified) is WebDeploy.exe.

  • Nasty comment spam :(



    One thing that I dont see in it is the ability to do that I would like to see would be conditionally copying .config files. For example, we have 3 sets of config files depending on which environment we are deploying to, so I wrote a util much like this (minus the ui) that would use a config file to copy projects, and pick which config file to copy into web.config. I maybe the only one that could use that, but it seems like others would be similar setups.

  • Sweet, sweet little utility. Just what I was looking for!



    How about an option not to copy those _vti* Frontpage Server Extensions directories?



    That would make it a killer util for me :-)

Comments have been disabled for this content.