Welcome to Team System Rocks Sign in | Join | Help
in
Home Blogs Forums Photos Tutorials Files Roller
Notion Solutions Main Site

Best Practice TFS2008 Web Site project structure

Last post 04-22-2008, 5:18 PM by JackalDark. 6 replies.
Sort Posts: Previous
  •  11-01-2007, 3:54 PM

    Best Practice TFS2008 Web Site project structure

    What would represent a best practice for a TFS (2008) version-controlled Web Site (not web application) folder structure?

    The website is in production.  We are doing bi-weekly releases to production through the typical Staging-QA-Production cycle and want to automate builds and deployment to QA. 

    It appears we need to use a Web Deployment Project to automate the copy to the Staging environment.  Is the Deployment Project needed or can this be implemented directly with TFS?

    Should we use Iterations?  If so, how should the folders be structured for a web site project?

    Thanks.

  •  04-11-2008, 5:20 PM

    Re: Best Practice TFS2008 Web Site project structure

    I would also like some light to be shed on this topic.

    I'm trying to find a Best Practice/Tutorial on how to Deploy a Asp.Net website project to UAT and Production environments easily.

    I was able to get Team System up and running to a point where I can check in my asp.net site code and then complete a build where the Compiled code is in a folder, now all I need is how should I or Can I copy these compiled files to a virtual Directory of the website in question.

    Is this Possible through Team foundation server etc.?
  •  04-14-2008, 8:12 PM

    Re: Best Practice TFS2008 Web Site project structure

    I've never worked with "Web Sites"  and personally feel that a "Best Practice" is to not use them and Convert your site to a Web Application.  Regardless - I would guess that Team Build treats them similarly.

    For Web Applications (which it sounds like JackalDark is asking about) Team build should produce a "_PublishedWebsites" folder which should be the site you are producing.

    There are a number of options - I have seen some posts about using the "Web Deployment Projects" on the MSDN Forums which should provide some guidance.

    What I am doing at my current client is writing Powershell Scripts to copy the _PublishedWebsite folder to the appropriate production folder.  What I do is have a "Config" folder tree for each Environment (my client has multiple QA environments and multiple Production Environments for their US, Canada, and UK businesses).  Each environment will have the "web.config" and other config's used by Enterprise Library.

    Under the "Deploy" Folder I have a "_deployApplication" Powershell script that calls accepts a parameter for things like the "EnvironmentName" (to select the appropriate Config directory" and the server name where the files will be copied.

    I then have another Powershell script for each environment that calls the "_deployApplication.ps1" script with the appropriate parameter. 

    Since these scripts are powershell, there's hardly any automation task that can't be included, such as starting and stopping IIS if desired. 

    Other approaches for deployment I've heard other people using is to have the actual Deployment as MSBuild tasks and having seperate build types for each environment.

    I personally prefer Powershell for my client as I hope to turn over the deployment functionality to a "Production Control" group that won't have knowledge of TFS and MSBuild.  Another advantage of this approach - I just build off of "Tip" of version control and the builds site on the "File Drop" Location and the appropriate deploys to the various Environments can be run at any time in the future (as opposed to having to re-build - most likely from labels - which would be necessary if the deploy was MSBuild tasks as part of the build"

  •  04-15-2008, 1:13 PM

    Re: Best Practice TFS2008 Web Site project structure

    Thanks for the reply!

    Yes I believe I'm asking about deploying a web application. Although I am still a junior developer and I'm trying to learn Team System in my spare time for my own projects.

    I see what you are saying in how it would be better to not have to re build the project when deploying although I've never seen a power shell script before. How do you trigger a Deployment with a script of this nature? Do you run it from the box directly?

    I was hoping that TFS would be able to take care of copying the web app over to my production folder so that I just need to select the right build type and then it would include the copying of the completed files after it built.

    I was perusing around trying to figure it out and I made 2 build types, one for UAT and one for Production, is it possible for me to add something to the build project for these build types to be able to copy the files over after the build completes successfully?

    I think this is the route I'd like to take for now as I reckon it would let me deploy to each of my environments from my local workstation directly, which would be awesome.

    Thanks!
  •  04-15-2008, 4:00 PM

    Re: Best Practice TFS2008 Web Site project structure

    Okay I found an article that explains what I'm looking for here and I've tried it and it seems to work as it copies the built files to my specified directory.

    I have a Virtual Dir setup for a website in IIS7  but now I'm getting an Internal 500 error and in the Event Viewer it says Could not load all ISAPI filters for site..

    Anyone have any clue?
  •  04-15-2008, 4:01 PM

    Re: Best Practice TFS2008 Web Site project structure

    Sorry it's here, blast we can't edit posts..
  •  04-22-2008, 5:18 PM

    Re: Best Practice TFS2008 Web Site project structure

    I removed all the ISAPI filters and everything works fine now. don't know why it had added the old isapi filters.

    Anyway I am now able to do what I wanted :)
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems