Saturday, January 30, 2010

We have a lot of exciting things going on at Deliveron Consulting Services. I wanted to post a few of the updates.

Get Social with Deliveron

Deliveron Consulting Services on FaceBook  Become a Facebook fan of Deliveron: http://www.facebook.com/pages/Deliveron-Consulting-Services/92712059791

  Follow Deliveron on Twitter: http://www.twitter.com/deliveron

 Linked In  Join the LinkedIn Deliveron Consulting Services Network group.

 

Deliveron Website Updates

We have implemented a few website updates.  These include:

View the first edition of the Deliveron Monthly Newsletter.  Sign up on the website to receive future newsletters and announcements.

 

Upcoming Events

2/3 – Omaha SQL/BI User Group - Solution Consultant Moe Elatta from Deliveron will be presenting on SQL Server Reporting Services 2008 scale-out configuration and new charting enhancements. Register here...

2/18 - MSDN Webinar - Enhancing the Business Process Automation Capabilities of SharePoint Register here...

2/25 - Lunch and Learn - SharePoint Features You Need Register here...

Saturday, January 30, 2010 12:23:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Tuesday, January 05, 2010

To me there has always been a feeling a of excitement to be able to build an application and then deliver it to someone that wants it.  When I first started programming over 20 years ago with GW-BASIC on my Tandy 1000 EX, it was limiting that what I built could only be run within GW-BASIC since it was an interpreted language environment and not compiled.  When I bought Quick Basic 4.5, I could finally compile my applications into an EXE and run them outside of the interpreter.  Then I felt like I hit the big time when I was able to build my first setup package in Visual Basic 4.  I remember I built a Hello World caliber application and created a setup package that took 3 or 4 floppy disks.  I didn’t think it could get any better than this :)  Over the years the the excitement about delivering applications became more from the what was built and not how it would be delivered.  Visual Studio has always included functional, no frills setup projects.  3rd Party vendors have created easier to use and more power tools for creating deployment projects such as InstallShield.   Developers who didn’t purchase a 3rd Party tool were limited to using the OOB (out of the box) setup projects within Visual Studio.  While this is functional, the developer has to know where and how to do things and the usability is not very intuitive.  It requires many steps to creating a MSI that I have blogged about in Deployments with TFS Part 2: How to create an automated deployment MSI.   In Visual Studio 2010 there is finally an easy to solution without purchasing an additional production.

Last week I saw this post from Somasegar on Building setup and deployment packages in VS 2010.   Microsoft has partnered with Flexera, makers of InstallShield to create InstallShield Limited Edition for Visual Studio 2010.  This brings the InstallShield graphical interface to Visual Studio.  In addition to providing a highly intuitive interface for building setup packages, this product allows setup packages to be built from with TFS Team Builds.  This has been a major pain point for automated deployments and SCM (Software Configuration Management) processes.  I downloaded and installed InstallShield 2010 LE and here is a walkthrough of the tool.

Download and Installation

Read Somasegar’s blog post on how to download and install it.  (see link above)

 

InstallShield 2010 LE Setup project

Once it is installed and you create a InstallShield Setup project, the Project Assignment view is the default view.  As you can see, the graphic is a guide that explains the parts of the MSI and the steps to create the package.  At the bottom of the screen are the steps to the installation project.  In addition to the steps at the bottom of the guide, there are also intuitive steps to the right that keep all of the package settings cleanly organized.  

image

This first step is to fill out the basic information about the application that is going to be deployed.

image

In the second step, required operating systems and prerequisite applications can be specified and enforced when installing the application.  Custom prerequisites can be defined by choosing “Create a custom software condition” under “More Options”.

image

The installation Architecture section step is disabled in the Limited Edition.  In the other editions different features can be defined for users to choose what sections they want installed.

image

The next step is the Application Files.  Here the application’s files can be added to the installation.   The “Add Project Outputs” is the primary button for adding the application files.  I found this dialog window to be a lot easier to use than the Visual Studio setup project.

image

The Application Shortcuts step is where desktop and start menu shortcuts can be defined.

image

If the application requires any registry entries, they can be defined in the Application Registry step.

image

The last step is the Installation Interview.  This step asks a series of questions that drive what dialogs the user running the installation will see.  Custom dialogs are not supported in the InstallShield Limited Edition.   Custom dialogs are supported in the Visual Studio setup projects.  For the automated deployment MSIs, I create a dialog that allows the user to specify the environment.

image

Custom Actions are non-standard activities that can be performed at different points of the installation process.  The Limited Edition supports VBScript, JScript, and Exe custom actions.  However, as shown in the following image, there are only a couple points in the process where custom actions can be defined.  The Premier and Professional editions also support InstallScript, a powerful scripting tool to create more advanced customizations to the installation process.

image

After I built the MSI, I ran package to install it.  Users will see this message box that the installation was created with a beta version of InstallShield. 

 image

InstallShield 2010 LE for Visual Studio 2008

The InstallShield 2010 LE Installation also installs a version that works within Visual Studio 2008.  This interface looks the same in Visual Studio 2008 as it does in Visual Studio 2010.

image

 

Building MSIs with Team Build 2010

This is the feature I am most looking forward to in InstallShield 2010 LE.  Standard Visual Studio 2008 setup projects can not be built within Team Build without some tricks.  Unfortunately TFS Source Control and Team Build integration is not available in this beta version.  I verified this with Flexera.  They are currently working on it.  As soon as an updated version is available with this enabled I will do a follow up post detailing the TFS Source Control and Team Build experience.  I’m interested to see the following in action:

  • Triggering a build and having the MSI compile with the updated assemblies.
  • Curious to see if the InstallShield Setup project build can detect new dependencies added.  My tests will include adding a reference to the primary output application.  Then do a new build to see if the MSI will automatically include it.  It might be expecting too much but this would be very beneficial.

 

Overall

  • The Project Assistant is a very simple to use series of steps to create a complete setup project.  As users feel more comfortable with the too, they will probably jump to the specific screens they are looking for in the navigation pane on the right.  Both are highly intuitive and significant improvements over the the standard Visual Studio setup projects.
  • Most things that are supported in the standard Visual Studio setup project can be accomplished with InstallShield 2010 Limited Edition.  For most installation packages, these limitations will not be problem.  However, I will not be able to create automated deployment MSIs because of the limitations of no custom dialogs and not being able to create custom properties.
  • Being able to rebuild the MSIs during each Team Build is a huge benefit.  Once this feature is available, I think it will become my favorite feature.
  • I believe Microsoft and Flexera will both win with this product.  Microsoft’s Visual Studio 2010 will include an improved tool for creating installation packages without having to reinvent the wheel.  Flexera has built an amazing and easy to use product that will work for the majority of scenarios, but many will want to upgrade to the Express, Professional, or Premier editions to get the full power of InstallShield.
  • The final product should be great, but this beta version is not ready to be used for more than evaluation purposes.  Between the beta message box that is displayed when the user installs it and the fact that the TFS Source Control and Team Build integration features are not available yet, I recommend waiting until the final version is released.

Mike

Tuesday, January 05, 2010 12:28:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Saturday, December 12, 2009

There is a lot of information about the major updates of TFS 2010 and Team Build 2010 including changing from MSBuild to Workflow and Gated Check-Ins to name a couple.  In using TFS and Team Build 2010 beta 2, there are a lot little features and improvements that help make these two products complete and polished.  Here are a few of the features and I keep discovering new ones each time I use it.

 

New Build Definition will default name and solution to build

if you have a solution open in Visual Studio 2010 when you create a new build definition, the build name will default to the solution name.

image

 

An open solution will also automatically be populated as the Project to Build

image

 

The build retention policy is not set to “Keep All” by default.

Finally, the default retention policy for the builds is not set to “Keep All” anymore.  Primarily all results will default to keep the last 10 builds.  In Visual Studio 2008, I always recommended that this should be changed.

image

 

TFS Build notifies you about successful and failed builds

The Team Foundation Build Notification tool used to be part of the power tools.  Now it is included with the standard installation and alerts you to the success or failure of the build.   This supports continuous integration and gated check-in builds.  The notification dialog window also has an option for unshelving failed gated check-ins.

This dialog displays for a successful Gated Check-in build

GatedCheckinResults

 

This dialog is display when a Gated Check-In fails.  Notice the Unshelve Changes option to retrieve the changeset that was be attempted to be checked-in.

FailedGatedCheckin

Build Parameters are now strongly typed and visible

In Team Build 2008, parameters could be passed in to a build when it was being queued.   However the format was command line argument style passed into a textbox similar to this:

/p:IsThisCool=”false”

In Team Build 2010, the build parameters are displayed as strongly typed properties.   This will allow for type checking and eliminate the misspelling of parameters.

image

 

Enjoy all of the great new features in Team Build 2010 including these smaller but helpful features!

Mike

Saturday, December 12, 2009 6:10:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Friday, November 27, 2009

Earlier this week at the Omaha Team System User Group someone asked about how to add new statuses to a work item in TFS.   I mentioned I had the steps documented that I would send him.  After reviewing the steps I thought it would be useful if I posted this for everyone. 

Download and Install the TFS Power Tools

Unless you prefer editing XML and running command line utilities to GUI editing, the first thing you should do is download the latest edition of TFS Power Tools.  The Power Tools are a must have Team Foundation Server add-on that Microsoft has used to add functionality since the release of TFS Power Tools.  There has been several updates with October 2008 being the latest release.

Download Visual Studio Team System 2008 Team Foundation Server Power Tools - October 2008 Release

Work Item Template Process Editor

After the TFS Power Tools are installed,  Process Editor is now available under the Tools menu item.

image

 

Opening a Work Item Template for One Team Project

To edit a Work Item Template (WIT) there are a couple options.  To modify the template for one project, you can open the WIT directly from the project, edit it, and save it back to that project by choosing the “Open WIT from Server” option.
When you choose “Open WIT from Server”, it will display a dialog with all of the team projects and the templates.  In this example, the Bug WIT from the SampleScrum template is chosen.

image

 

Opening a Work Item Template for Multiple Team Projects

To edit a WIT for multiple team projects, you will want to export the template to a file, edit the changes and then import that change into each of the team projects.
To Export the WIT, choose Export WIT.   This displays the dialog to select the WIT.

image

Save the WIT to a location on your local machine.

image

It will prompt you if you would like to include the Global List definition.  You can choose No.
Next open the saved WIT by choosing “Open WIT from File” and selecting the saved file (Bug.xml). 

 

Editing the Work Item Template

The Work Item Template Editor has three tabs.  In this example we don’t change any of the fields or the layout of the work item, so we can ignore these tabs.

image

To add statuses to the Work Item, we will modify the Workflow tab.  Adding a status is more than just adding the option to a list.  The statuses of a work item are part of the workflow.  Basically each status is only available when it is enabled in the workflow.  For example, you might have a “Fixed” status and a “In Test” status.  In the workflow, you can define it so that “In Test” won’t be available to select until it has been marked “Fixed” first.

Here is an example of the workflow tab

image

The different Statuses in Red and the arrows show the flow of one status to the next.   Once it is decided when the new statuses will appear and what statuses will be available after the new status, we can add the statuses and connect them to the other statuses.

Add a Status by selecting the State item in the Toolbox  (if the Toolbox is not visible, choose View -> Toolbox from the menu.

image

Drag the State item to the canvas in an area where it will be easier to connect it to the other States.  If the workflow becomes cluttered, you can right click on it and choose “Reset Layout”

image

When you have added the status to the canvas it will look similar to this

image 

Give the status a name by typing over the State1 text

image

Now, connect this to the previous status.  For this example the bug will go from “In Progress” to “Fixed” to “Ready For Test”.  Do this by clicking on the Transaction Link from the Toolbox, this will change your cursor to the link cursor.  Click and hold on the starting Status and drag the line to the target Status.  This will add the line between the two and create a Transition box.

image

For the new status to be valid, you must give the Transition a Reason.  This is just a textual explanation why it would move to this status from the previous.  Expand the Transition box so it shows the Reasons, Actions, and Fields.  Right click on the box and choose “Open Details”.  A Workflow Transition dialog box will display.  Choose the Reasons tab and modify the Value to display the text you would like.

image

Add a second Transaction Link from the new status (Fixed) to the Target status (Ready for Retest) and give it a reason.
Once this is added, you can validate your workflow by right clicking on the canvas and choosing “Validate All”.

image

If there are any errors in the validation they will be displayed in the Error List.

image

If there are no errors the Output tab will look similar to this

image

Click the save button in the toolbar to save the WIT.   If you have opened the WIT from the server then this saves it back to the Team Project and is available.  If this was a File then you must import it into the appropriate Team Project(s).
To Import the Work Item Template, choose “Import WIT” from the menu.  This dialog will display.  Select the file that was edited (Bug.xml) and then select the team project and click OK.

image

Repeat to add to the other Team Projects.

 

Applying Change to Process Template


Now that the work item is modified, if you want this change to be in new projects created you must update the source and re-upload the templates.
Copy the bug.xml and bug.wit to the source template folder on the TFS Server.  The Default location is
C:\Program Files\Conchango\Scrum for Team System\ProcessTemplate\AgileSoftwareDevelopmentwithScrum\WorkItemTracking\TypeDefinitions

image

To upload the template, right click on the TFS root node in the Team Explorer and choose “Process Template Manager”.

image

A dialog will display that contains a list of the installed templates.  Click on the Upload and browse to:
C:\Program Files\Conchango\Scrum for Team System\ProcessTemplate\AgileSoftwareDevelopmentwithScrum
Open the ProcessTemplate.xml file.

It will next prompt you if you want to overwrite. Choose Yes and it will upload the changes. If you do not wish to overwrite it, then you must change the name by opening the same ProcessTemplate.xml with the Process Editor.

image

 

That completes the steps to modify the Work Item Templates, apply the changes to one or multiple team projects, and also back to the template for future projects created with the the process template.

Mike

Friday, November 27, 2009 10:56:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Thursday, November 26, 2009

Here are the updated slides for my Getting Agile with TFS 2010 presentation.  I gave this presentation for two lunch and learns at ANT and then earlier this week at the Omaha Team System User Group meeting.  I had a great time giving this presentation multiple times.   Thanks everyone that attended these talks. 

Getting Agile with TFS 2010 Presentation Slides

Mike

 

Thursday, November 26, 2009 11:54:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Tuesday, November 03, 2009

I am going to giving two Getting Agile with Team Foundation Server 2010 talks in November, both in Omaha, NE.  On Thursday November 12th, I will be giving the talk for a lunch and learn at Advanced Network Technologies.  You can register for the event here.  On November 24th, I will be giving the talk at the Omaha Team System User Group Meeting.  Here is more information about the event and registration instructions.

This is the same talk as the one I gave at the Heartland Developer Conference in October but I will be using Beta 2 for these two.  Here’s some more details on the presentation and myself.  I look forward to seeing everyone there.

Presentation: Getting Agile with TFS 2010

This presentation will demonstrate a complete two week scrum iteration from the planning meeting to development, testing, and bug fixing to deployment utilizing the features found in Team Foundation Server 2010. New features include gated check-ins for Continuous Integration (CI), Test-Driven Development (TDD), Product Backlog enhancements including hierarchical views and support for multiple teams to work from a single backlog. The presentation also demonstrates the enhancements to the TFS Portal and Web Access to support Agile planning and displaying graphs such as burn-down charts. Each walk through includes a live demonstration of the feature in Visual Studio 2010.

Speaker: Mike Douglas, Deliveron Consulting Services

Mike Douglas is a Solution Consultant at Deliveron Consulting Services where he provides end-to-end solutions and TFS installation, configuration, and custom development for clients.  He has over 11 years experience building enterprise level applications on a variety of .NET technologies including WCF, Web Services, ASP.NET, Disconnected Smart Clients and Data Synchronization, BizTalk, and Team Foundation Server.  Mike enjoys trying to keep up with the constant change and evolution of .NET.  Mike is an experienced presenter having spoken at several Omaha .NET User Group meetings on CSLA.NET, Subsonic, and TFS.  He also spoke at the 2008 ESRI International User Conference on a GIS integration project he helped lead. Mike actively maintains the open source project, Team Deploy, on CodePlex for deploying MSIs using Team Foundation Server.  Mike also enjoys sharing his experiences in Code Generation, CSLA.NET, and TFS on his blog at www.CodeSmartNotHard.com.

Tuesday, November 03, 2009 3:42:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Tuesday, October 20, 2009

Visual Studio 2010 and TFS 2010 beta 2 were just released on Monday and there is already an incredible amount of information available.   It is hard to keep up with all of the information.   I created a list of some of the links to posts and downloads I have found and others have tweeted about.  I’m sure I missed some.  Let me know if there are any links I missed that you want me to add to the list.

Downloads

Download Visual Studio 2010 Beta 2
http://msdn.microsoft.com/en-us/default.aspx

Visual Studio 2010 and .NET Framework 4 Training Kit - October Preview
http://www.microsoft.com/downloads/details.aspx?familyid=752CB725-969B-4732-A383-ED5740F02E93&displaylang=en

Team Foundation Installation Guide for Visual Studio Team System 2010 (Updated)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=2d531219-2c39-4c69-88ef-f5ae6ac18c9f

Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=cf13ea45-d17b-4edc-8e6c-6c5b208ec54d

 

Multimedia

10-4 Episode 33: Downloading and Installing Visual Studio 2010 Beta 2
http://channel9.msdn.com/shows/10-4/10-4-Episode-33-Downloading-and-Installing-Visual-Studio-2010-Beta-2/

Radio TFS - The Ultimate Announcement Show
http://www.radiotfs.com/2009/10/19/TheUltimateAnnouncementShow.aspx

 

Visual Studio Blog Posts

Somasegar - Announcing Visual Studio 2010 and .NET FX 4 Beta 2
http://blogs.msdn.com/somasegar/archive/2009/10/19/announcing-visual-studio-2010-and-net-fx-4-beta-2.aspx

Scott Guthrie - VS 2010 and .NET 4.0 Beta 2
http://weblogs.asp.net/scottgu/archive/2009/10/19/vs-2010-and-net-4-0-beta-2.aspx

Shai Raiten - Historical Debugger Is Now –> IntelliTrace And Much More
http://blogs.microsoft.co.il/blogs/shair/archive/2009/10/20/historical-debugger-is-now-gt-intellitrace-and-much-more.aspx

Jeff Bramwell - Visual Studio 2010 – Beta 2 Released
http://devmatter.blogspot.com/2009/10/visual-studio-2010-beta-2-released.html

Duke Kamstra - What’s new for Data Dude in Visual Studio 2010?
http://blogs.msdn.com/vstsdb/archive/2009/10/19/what-s-new-for-data-dude-in-visual-studio-2010.aspx

Emil Protalinski - Visual Studio 2010 simplified to four SKUs, Beta 2 arrives
http://arstechnica.com/microsoft/news/2009/10/visual-studio-2010-simplified-to-four-skus-beta-2-arrives.ars

Jeff Beehler - “Going live” with Visual Studio 2010 Beta 2
http://blogs.msdn.com/jeffbe/archive/2009/10/19/going-live-with-visual-studio-2010-beta-2.aspx

 

TFS Blog Posts

Buck Hodges - TFS 2010 server licensing: It's included in MSDN subscriptions
http://blogs.msdn.com/buckh/archive/2009/10/20/tfs-2010-server-licensing-it-s-included-in-msdn-subscriptions.aspx

Allen Clark - Enabling New Application Lifecycle Management Features for Visual Studio 2010 Beta 2 in Upgraded Team Projects
http://blogs.msdn.com/allclark/archive/2009/10/13/enabling-new-application-lifecycle-management-features-for-visual-studio-2010-beta-2-in-upgraded-team-projects.aspx

Martin Hinshelwood - Installing Visual Studio 2010 Team Foundation Server on Windows Vista in 3 minutes
http://blog.hinshelwood.com/archive/2009/10/20/installing-visual-studio-2010-team-foundation-server-on-windows-vista.aspx

Martin Hinshelwood - Configuring Visual Studio 2010 Team Foundation Server on Vista in 12 minutes
http://blog.hinshelwood.com/archive/2009/10/20/configuring-visual-studio-2010-team-foundation-server-on-vista-in.aspx

Compatibility Matrix for 2010 Beta 2 Team Foundation Server to Team Explorer 2008 and 2005
http://blogs.msdn.com/teams_wit_tools/archive/2009/10/19/compatibility-matrix-for-2010-beta-2-team-foundation-server-to-team-explorer-2008-and-2005.aspx

Tuesday, October 20, 2009 4:42:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 

Here are the slides from my An Iteration in the Life of an Agile Team with Team System 2010 talk at the 2009 Heartland Developer Conference.  Thanks for everyone that attended.  I had a great time giving the talk and at the rest of the conference.

http://www.codesmartnothard.com/content/binary/agile_vsts2010.zip

If you didn’t get a chance to attend my talk, I am going to be giving the presentation again (This time with beta 2!) at the next Omaha Team System User Group meeting on November 24th.  Check out the Omaha Team System User Group website for more details.

Thanks!

Mike

Tuesday, October 20, 2009 3:15:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Saturday, September 26, 2009

In Part 1: The Deployment Process Should Enforce Good Configuration Management Practices, I gave some background on my experiences and how the configuration management process has evolved and some rules and benefits to the automated deployment MSIs.

In Part 2: How to create an automated deployment MSI, I walked through the steps to create an automated deployment MSI in Visual Studio satisfying the rules from Part 1.

In Part 3, I am going to walk through the steps to install Team Deploy.  Then walk through creating a team build, configure Team Deploy, and deploy a MSI with it. 

There is also a great Screencast by Ian Ceicys walking through the entire process of installing TFS, WIX, Team Deploy and deploying a MSI.  I highly recommend watching this.

Installing PS Tools

  • Team Deploy uses the free PSExec and PSKill utilities by Sysinternals (owned by Microsoft).  PSExec allows you to remotely run any command and PSKill can kill any process on a local or remote machine.
  • Download PSTools at http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx and install to a local folder.  I also recommend renaming psexec and pskill to something like psexec2.exe.  Some anti-virus software sees these files as a risk.

 

Installing Team Deploy

  • Browse to the Team Deploy website on CodePlex at http://TeamDeploy.CodePlex.com
  • Click on the Downloads and download the TeamDeploy.MSI.
  • Run the MSI to install Team Deploy to c:\Program Files\MSBuild\TeamDeploy
  • The windows service account that runs Team Build on the build server will need to be a local administrator on all target machines.

 

Creating a Team Deploy TFS Build

  • In Team Explorer, create a new build in your Team Project by right clicking on Builds and choosing “New Build Definition”

New Build Definition

 

  • Give it a name such as “Build and Deploy”
  • Create a workspace (Cloak other folders in your project that don’t need to be part of the build. This helps the speed up your build because otherwise the server will try to get all source files in the project)
  • Leave Project File name as is but click on the “Create” button to create a new TFSBuild.proj file.
  • Next choose the solution you want to build, then the configuration type. I recommend leaving the default.
  • Choose any options that you want to enable for running tests and/or code analysis. I would recommend leaving these unchecked for now and once you verify everything is working then go back and enable the options you want.
  • In TFS 2008, you can choose retention policies. This will help prevent builds from filling up your server disk space quickly. I usually choose Keep 7 latest.
  • the next options are for the Build Defaults. Choose the appropriate build agent. If unsure, just leave the default. Then choose the share where you want to copy the staging files.
  • The last option is “Trigger”. The "build and deploy" build should be separate from the continuous integration build. I recommend leaving the default “Check-ins do not trigger a new build”.

 

Build Trigger

 

  • Finally click “OK” to create the build type.

Creating the build definition will create the TFSBuild.proj that contains the basic options that were selected in the wizard. The following steps will customize the TFSBuild.proj file created. This file is a Xml file based on MSBuild.
  • To modify the TFSBuild.proj file, located the file under Source Control -> $/YourTeamProject/TeamBuildTypes/Build and Deploy (You can also navigate directly to this file by right clicking on the build definition and choosing "View Configuration Folder".)
  • Check out and open the TFSBuild.proj file to configure it to use Team Deploy
  • Find the comment <!—Do not edit this -> and add the following line underneath the one that is already there. It should look something like the screenshot below

<Import Project="$(MSBuildExtensionsPath)\TeamDeploy\TeamDeploy.Tasks.targets" />

AddTeamDeployProject.jpg

 

Scroll to the bottom of the TFSBuild.proj file to the <PropertyGroup>. Overwrite the Property group with the following (Adjust the paths for your specific environment):

<PropertyGroup>
    <KillAppPathFilename>c:\Program Files\PSTools\pskill2.exe</KillAppPathFilename>
    <RemoteExecutePathFilename>c:\Program Files\PStools\psexec2.exe</RemoteExecutePathFilename>
  </PropertyGroup>

  <!-- Deploy MSI  -->
  <Target Name="AfterEndToEndIteration">
    <CallTarget Condition="'$(IsDesktopBuild)'!='true'" Targets="DeployMSITargetVirtuals" />
  </Target>

  <Target Name="DeployMSITargetVirtuals">
    <Deploy DeployScript="$(SolutionRoot)\..\..\Push Scripts\SampleDeploy.xml"
            KillAppPathFilename="$(KillAppPathFilename)"
            RemoteExecutePathFilename="$(RemoteExecutePathFilename)"
            TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
            BuildUri="$(BuildUri)" />
  </Target>

The copied Xml in the TFSBuild.proj should look something like this

FinishedTFSBuild.jpg

  • Save and check-in the TFSBuild.proj file


The Deploy task uses a Xml Deploy Script that contains the information of what Msi(s) to deploy, additional tasks such as starting and stopping the service, and specifies the target machines. The following steps walks you through editing this file.

DeployScript.jpg

 

There are a few things to note here.

  • Team Deploy can
    • Kill 0 to many processes
    • Deploy/Uninstall 0 to many MSIs
    • Deploy MSIs to 0 to many Target Machines
  • Modify the xml appropriately for your environment. The GUID for the uninstalls are the MSI product codes. If the MSI is done correctly it will uninstall previous versions using the upgrade code, however they are usually unable to remove the same version of the MSI, this is why we have the separate step of uninstall.
  • The ExtraArgs element contains the SETUPENV variable that is used by the MSI’s custom action to copy the correct environment’s config file to the project’s. The custom action is a simple VBScript that copies the config file (not included with Team Deploy). See Part 2 for more details on creating the config files folder structure.

 

Once the TFSBuild.proj is checked in and the Deploy script is saved (or also checked in), then you can right click on the build and do a queue new build.   The MSI will be deployed to your target machine(s).

See the Troubleshooting / FAQ section of Team Deploy or contact me if you have any questions or problems.

Saturday, September 26, 2009 12:16:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Wednesday, August 26, 2009

Team Deploy is a free set of custom Team Build tasks for deploying MSIs to client PCs and servers.  Team Deploy 2.1 has been released and includes a number of fixes and a couple new features.

A special thanks to Jeremy Novak for creating the new CleanupPsExec task and multiple other fixes.  Here is the list of the changes:

  • Moved Guidance and Installation from Word document to wiki site (and created a Troubleshooting section)
  • Added -accepteula to all pstools calls so it won’t display the EULA dialog the first time it runs
  • Added new CleanupPsExec task and test to clean up the PSTools service if it becomes stuck.
  • Fixed spelling error in RemoteExecute task
  • Added support to uninstalling 32bit apps on Windows 2008 64bit servers
  • Changed property declarations to be auto-implemented
  • Updated task required properties to have the Required attribute
  • Created Team Deploy Installation Screencast
  • Other misc fixes.

Team Deploy 2.1 can be found on CodePlex at http://teamdeploy.codeplex.com/.

-Mike

Wednesday, August 26, 2009 1:49:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: