VS 2008 Web Deployment Project Support Released

This past Friday we released the final RTW (release to web) support for VS 2008 Web Deployment projects.  You can learn more about it and download it for free here

Web Deployment projects can be used with either the "ASP.NET Web Site" or "ASP.NET Web Application Project" options built-into VS 2008, and provide a few additional build, packaging and deployment options for you to use.  You can read an old tutorial post of mine here to learn more about they work.

The VS 2008 Web Deployment Project version supports all of the existing features provided by the VS 2005 web deployment download.  It also adds additional support for:

  • Easily migrating VS 2005 Web Deployment Projects to VS 2008 Web Deployment Projects
  • Replacing output only if web deployment builds succeed
  • IIS7 Support

This RTW (release to web) version fixes bugs and adds some small features that people requested in the December CTP version we released last month.  Please make sure to run setup and uninstall any older version of the VS 2008 Web Deployment Project support you have installed before installing this final version.  VS 2008 Web Deployment Projects can be installed side-by-side with VS 2005 Web Deployment Projects - so there is no need to uninstall the VS 2005 version if you are still using it with older projects.

More Deployment Features

In my last link-listing post I pointed at the new Web Deployment Tool being released by the IIS team.  This tool works with both IIS6 and IIS7 and enables automated copy deployment, file synchronization, and migrating of applications onto web servers.  If you are looking for a great way to automate the deployment of your ASP.NET applications onto remote servers then this tool is definitely one to check out. 

You can use VS 2008 Web Deployment Projects as a post-build step within your build environment to fix up last minute deployment settings - and then use the IIS Web Deployment tool to copy them remotely onto server machines.  Alternatively you can also use the IIS Web Deployment Tool to copy vanilla "ASP.NET Web Site" or "ASP.NET Web Application" projects to remote machines (no VS 2008 Web Deployment Project required).

To learn more about the new IIS Web Deployment tool, read the walkthroughs at the bottom of this page (in particular the "Introduction to MS Deploy" one).  I will also be doing a blog post in the future that talks more about how to use it to automate your web server deployments.

Hope this helps,

Scott

27 Comments

  • Great news Scott! Thanks for the update!

  • Good news, I was waiting that. Thanks for news.

    Also is there any update for the visual studio hotfix?

  • Great! I always looking for you.

  • How does your day look like? I mean how do you manage everything, from blogging to managing the developer division of Microsoft, to interviewing some place, replying to people on forums, helping in resolving issues? Where do you find the time to do all that... Everyday when I go home, I wish that I had 8 more hours to finish my work and wrap up everything.

    Maybe you should one day blog about "A day in the life of Scott Guthrie" :-)

  • Hey Scott I blogged about this three days ago and am currently #4 on Google...

  • Great tool. How does it work with automatic builds in TFS? We are having now a "Web Site" checked-in, but because the lack of a project file, it is never picked up by the automatic build. Will this project be picked up? And build the site?
    We are using WIX to create the msi files (also automated) and it would be great if we just could package all files created in the bin folder of the deployment project than the very complicated way we are doing now.

    Thanks, Ronald

  • Great!!! Thats sounds interesting. Thanks for the updates.

  • Hi Vikram,

    >>>>>> One question though. Now with asp.net we have three model we can work with, Asp.net web project(which comes by default with VS 2005 and 2008), Asp.net web application project(similar to asp.net 1.1) and MVC. which one would you suggest and in which scenario

    ASP.NET Web Sites and Web Application Projects are basically options for how you lay out your projects and compile them together. They don't actually change the model for how you code them. You can use the ASP.NET WebForms control models with both equally well.

    ASP.NET MVC gives you an alternative to using WebForms for structuring your UI. You can use it with both Web Site and Web Application Projects. The default is to use MVC with Web Application Projecs (since this makes unit testing a little easier), but it will work with web-site projects as well.

    Hope this helps,

    Scott

  • Hi Murat,

    >>>>>> Also is there any update for the visual studio hotfix?

    We just passed off a hotfix to setup to build for public consumption for the HTML editor performance issue. We hope to have it available for public download next week.

    Hope this helps,

    Scott

  • Hi Praveen,

    >>>>>>> How does your day look like? I mean how do you manage everything, from blogging to managing the developer division of Microsoft, to interviewing some place, replying to people on forums, helping in resolving issues? Where do you find the time to do all that... Everyday when I go home, I wish that I had 8 more hours to finish my work and wrap up everything.

    Somedays it is easier todo than others. ;-)

    >>>>>>> Maybe you should one day blog about "A day in the life of Scott Guthrie" :-)

    I will put that on my list to blog sometime. :-)

    Thanks,

    Scott

  • Hi Yvan,

    >>>>>>> How does TFS Build compares to WDP?

    WDP projects use a standard MSBuild file to contain all settings - which means you can kick them off as part of a TFS build (or any other automated build process). So you should be able to use it just fine.

    Hope this helps,

    Scott

  • Hi Ronald,

    >>>>>>> Great tool. How does it work with automatic builds in TFS? We are having now a "Web Site" checked-in, but because the lack of a project file, it is never picked up by the automatic build. Will this project be picked up? And build the site?

    WDP projects use a MSBuild file to manage project settings. So you can drive them from automated TFS builds. An alternative approach to use would be to convert your web-site based project to be a web application project (which are built-into VS 2008 and VS 2005 SP1). These integrate very well with TFS builds. I have a step-by-step guide on how to-do this here: http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx It was written for VS 2005, but works pretty much the same for VS 2008.

    >>>>>>>> We are using WIX to create the msi files (also automated) and it would be great if we just could package all files created in the bin folder of the deployment project than the very complicated way we are doing now.

    Either a web deployment project or a web application project might work best to help streamline this.

    Hope this helps,

    Scott

  • Hi Scott,

    Is there anyway to get it to output a more verbose log ? I built a very quick test deployment project and while the log says every part succeeded, and i can find all my files and config chnages in the correct directory the final status is FAIL.

    (quick edited output)

    if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\"
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /Website -p -u -f .\TempBuildDir\
    Running aspnet_merge.exe.
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\aspnet_merge.exe .\TempBuildDir -o -a -r -copyattrs
    Successfully merged '.\TempBuildDir'.
    if exist "\Live\" rd /s /q "\Live\"
    if not exist "\Live\" md "\Live\"
    if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\"
    Updating web.config: RootPath = \Live\, ValidateSections = False, UseExternalConfigSource = False
    Update of web.config Succeeded.
    ========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========

    The succeeded build is my website .. the failed one must the web deployment project

    I'm mystified ! :)

    Stephen

  • >>>> Where do you find the time to do all that...
    I think he has a some kind of time machine ;)

  • Hi Scott,

    I found a bug in VS 2008, where can I report it?

    I copy method A() and then rename it to B (by replacing text, not refactoring). VS 2008 will show a smart tag at B()'s signature and it has 2 options, "Rename 'A' to 'B'" and "Rename with preview...". I already renamed it so asking for me to rename is redundant.

    Regards,

    t800t8

  • In which scenario would I deploy a website as msi package?
    What benefits does it has over using Publish.. in visual studio?

    Is this also used at websites which need frequent updates?
    Because it looks very nice, but I can't get my head around the extra work it takes to deploy a msi instead of just clicking Publish..

  • This sounds really cool, Scott. Do you know when the November 2007 DevConnections attendees will be receiving their free copies of VS2008? I can't wait to get started. Thanks.

  • Surprisingly for a second release, this tool has some issues:

    1. Opening the project file will make it a Miscellaneous File in the Solution Explorer, very unexpected to see that folder + file appear and disappear. Saving it will put the focus back on the project in your Solution Explorer, but then when you click back in the editor, the focus will jump to the miscellaneous file. PS: the .wdproj file type has no icon of its own.

    2. Also, sometimes (I can't tell you when, doesn't happen today, happened yesterday) on saving the project file it will say in the status bar:
    "searching: ..." where ... seem to be a lot of namespaces (exactly the way Object Browser does when you do a search). During this time, VS is locked, I can't do anything.

    3. When you change something in the property pages and click OK, it's not actually saved. So when you then want to open the project file, you get (unexpectedly) prompted to save the file prior to opening it.

    4. You can have the property pages open, but the dialog is not modal, highlighting any file in the solution explorer will make the dialog lose all information ("There are no property pages for the selection").

    5. When you have the project file open, hit ctrl-s, it will save and focus will move to the project in the Solution Explorer. Hit ctrl-s again, nothing will seem to change but the last saved date of the file is actually changed. Now put the cursor back into the editor and hit ctrl-s. Because in the previous step the last saved date was updated, the editor will give a warning that the file has been changed. This is related to point 1 and can cause some confusion.

    I post here, because posting on Microsoft Connect will usually result in "closed, by design". Can you please forward this to the team so they can have a look? It seems it's a very functional tool (MSBuild is actually), but it didn't receive the attention to detail and usability that I would normally expect in Visual Studio.

    Thank you!

  • In WDP2005 everything worked fine , but when we moved to VS2008/WDP2008 (latest ver) it all breaks.:-(

    I get this error

    Error 1 The precompilation target directory (C:\www\DeploymentProject\Programmers Heaven.csproj_deploy\TempBuildDir\) cannot be in the same tree as the source application directory (C:\www\). ASPNETCOMPILER 1 1 Programmers Heaven.csproj_deploy

    How I can i keep the deployment project inside my Development web-folder? Or move the precompilation directory ? This all worked fine in vS2005/WDP2005. I was targeting a external c:\deploy directory.

    A precompilation settings property in the WDP property page would be useful to have.

  • I am one of the people who asked for aspnet_merge.exe to be made available separately, for use within the Visual Studio Express editions. At first sight, I was pleased to read that it had been made available in the SDK. Unfortunately, that’s a huge 1171 MB download that will take ten a half hours to download. That’s not practical for most of us to obtain aspnet_merge.exe, which is probably only 1 MB at the most. Therefore I’d like to reiterate the request for aspnet_merge.exe to be provided as a standalone download.

    I’ve posted this comment on the Visual Web Developer team blog. Others have also commented on that blog that they would like to see aspnet_merge.exe available as a standalone download. There hasn’t been any indication so far of whether my request will be fulfilled or not.

  • Hi Jon,

    >>>>>>I tried adding a Web Deployment Project to a WCF application that targets the x64 architecture, and the Web Deployment Project pukes on build because of processor targeting mismatch. The Configuration Manager doesn't let me choose x64 for the Web Deployment Project, and no other project is configured to target x86.

    I asked the team about this and got this response:

    From the surface, if Jon is using WDP from 64 bit command prompt this bug will occur as MSBuild target file is not there in the x64 bit location… In that case the simplest solution is to do one of the following:
    1. In WDP project file change to
    2. OR copy the same above target file from ProgramFiles32 path to ProgramFiles 64 bit location…

    Feel free to send me email (scottgu@microsoft.com) if you need more help with this.

    Thanks,

    Scott

  • Hi Stephen Pope,
    If you are still facing issues with your WDP solution please send me an email at Vishal.Joshi@micrsoft.com and we can try to look into it... Honestly, I am also mystified :-) but we will figure it out...!!
    -Vishal

  • Hi Andy,
    You said >>>>> How I can i keep the deployment project inside my Development web-folder? Or move the precompilation directory ? This all worked fine in vS2005/WDP2005. I was targeting a external c:\deploy directory.

    Ideally this feature should work same as in WDP 2005, have you uninstalled the Dec 2007 CTP and reinstalled the RTW version? If you are still experiencing problems then send me an email at Vishal.Joshi@Microsoft.com and we can try to get to the bottom of this...

    -Vishal

  • Hi Mike,
    I missed your comment when I was going through the rest, just noticed it now... I would love to touch base with you and get your feedback first hand and also probably try to reproduce the issues real time... My email id is Vishal.Joshi@Microsoft.com; if you drop me a line, I will even be happy to give you a call and discuss...
    Thanks in advance
    -Vishal

  • It would be nice if we could right click the Deploy project and have a publish option that could push out the value to any location... Any way to do this?

  • For those comfortable with running msbuild from the commandline or batch files, I've found the following "trick" very useful as it allows you to run batch files direct from Visual Studio:

    Create a batch file called runcmd.bat with the following in it:

    @echo off
    cmd /c %1

    Save this to the root of your c: drive. Then in visual studio 05/08, right-click a batch file in your project, select "Open With", type in "c:\runcmd.bat", friendly name "Command Prompt" and make sure you click "Set As Default".

    Now whenever you double-click a batch file it will run as expected. Very useful for running batch files with different msbuild commandline options.


  • Hi,
    I'm using WDP to publish a version of my company's site which we skin to re-use in a different guise.
    The problem lies here - using the WebConfigReplacementFiles option, I replace the attribute in the web.config to use a different theme for the second file, but WDP appears to apply the WebConfigReplacementFiles AFTER publishing.
    This causes each page to have theme='oldTheme' in it's header, meaning the replaced web.config value is not referenced.

    Any ideas on how to do the replacement before the compile?

    Thanks,
    Max

Comments have been disabled for this content.