eWorld.UI - Matt Hawley

Ramblings of Matt

New Utility: WebDeploy

March 5, 2004 00:01 by matthaw

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.



Categories: Unleash It
Actions: E-mail | Permalink | Comments (17) | Comment RSSRSS comment feed

Comments

March 5. 2004 01:25

You do realize Whidbey will have this functionality, right?



Pretty dang sweet though.

Jeff Gonzalez

March 5. 2004 01:26

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

http://

March 5. 2004 01:32

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.

Jeff Gonzalez

March 5. 2004 01:35

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.

Jeff Gonzalez

March 5. 2004 01:49

Not only will Whidbey have this functionality but it's just a GUI over XCOPY... It's much easier to include XCOPY in a build script...

http://

March 5. 2004 01:50

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

http://

March 5. 2004 02:18

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

March 5. 2004 02:21

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 Smile

Matt Hawley

March 5. 2004 02:34

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!

Jeff Gonzalez

March 5. 2004 03:19

Matt,



This looks like a great little app, and I am eager to use it once you support FTP. I just tried AND+FTP (from http://www.dotnetftp.com">http://www.dotnetftp.com)... it's pretty decent, but not very robust (doesn't log exceptions, difficult to continue if there was a connection problem, and can't customize extensions).



Ideal feature list:

1) FTP support

2) Synchronization -- only copy changed files

3) Excluded files list

4) Saved Profiles and configurations (debug, release)

5) Ability to rename files (production.config -> web.config)

6) Optionally rebuild before deploy

7) I'm sure I'll think of others later.



Thanks,



AJ

http://

March 8. 2004 07:08

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



Stay tuned for the updates!

Matt Hawley

July 2. 2004 19:45

Can we run it from the command line?

http://

July 2. 2004 19:51

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.

Matt Hawley

July 15. 2004 20:32

Nasty comment spam  Frown



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.

Aaron Junod

July 15. 2004 21:05

Aaron,



Yeah, I got rid of that. The only problem is that there is no way of doing your suggestion, in an automated way. The only way of doing this is to view the "Files to be Copied" dialog which you can check which files should/shouldn't be copied, as well as change the name. This has been a request for quite some time, and frankly, I've not come up with a good idea of handling it. I'm not quite sure if this tool will be able to handle it, however if you have a suggestion, please let me know.

Matt Hawley

July 22. 2004 18:44

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 Smile

Soeren Sprogoe

Comments are closed

Copyright © 2000 - 2024 , Excentrics World