You are currently browsing the category archive for the ‘Uncategorized’ category.

After playing around with Windows Live for a while I have decided to make Windows Live the centre of my digital world. To that end I have finally moved my blog across.   Redirects are in place and the new address is http://madtechnology.spaces.live.com.

Advertisements

I have been using the WSP Builder tool from CodePlex for a while to help me produce WSP files.       Today I suddenly got the following error:

WSPBuilder

Version: 0.9.8.0206

Created by Carsten Keutmann

GPL License 2007

Microsoft SharePoint Services Timer is not running on CORDEVS01

Preflight requirements failed.

After spending about 30 minutes checking that the Service was running at that everything was ok.    So in desperation I whipped out reflector to see what that check was doing.  It was doing the following.

ServiceController controller = new ServiceController("SPTimerV3");

if (controller.Status == ServiceControllerStatus.Running)

{

controller.Stop(); controller.WaitForStatus(ServiceControllerStatus.Stopped, timeout);

}

Suddenly the light came on upstairs…   I hadn’t started Visual Studio with Administration privileges.       I jumped out of VS and restarted with Administration privileges and guess what it worked.

So that I don’t forget to do it again I have enabled run the program as an administrator.

image

A while back I rebuilt my laptop to use Windows 2008 Server.   The main reason that I did it was so I could develop SharePoint applications on it rather than having to use a VM.    At the time, I forgot to partition my hard drive so I could take advantage of BitLocker.   Anyway, not to long ago the time can when I realised that I need to re-enable BitLocker.   I thought that I was going to have to rebuild it.   However, I spent 5 minutes searching the web and came across the BitLocker Drive Preparation Tool  this tool does the following for you:

The BitLocker Drive Preparation Tool automates the following processes to make the computer ready for BitLocker:

•Creating the second volume that BitLocker requires

•Migrating the boot files to the new volume

•Making the volume an active volume

Once you have run the installation program a new utility called the BitLocker Drive Preparation Tool appears on you menus and once you have run it, rebooted a couple of times it allows you to enable BitLocker.

One the great things that I love about working for Readify is the ability to work from home.    The project that I’m working on at the moment gives me this opportunity.    At the moment what is making in even more special is that I’m hearing the sound of water.

As some of you might be aware Australia has been in drought for many years and water is becoming an precious resource.    To help keep our garden alive, about 15 weeks ago I purchased a water tank.  After waiting for 10 weeks for it to arrive and then another 2 weeks for it to be installed.  Anyway, last weekend it was finally installed.  So now as I sit here looking at the window I can hear the rain gentle running into the water tank.  There is nothing better than cutting a bit of code in VS2008 and hearing the tranquil sounds of water.

For those that are interested here is a photo of my tank:

IMAGE_0621

Darren put the challenge so I thought I would take it up.  I’m an ENTJ.   The interesting thing that I have noticed is that I have done these personality tests at various stages throughout my life and I have found that they do change with your life experiences. 

Anyway, ENTJ is Extraverted, Intuitive, Thinking, Judging

However, I don’t necessarily subscribe to the trademark of the type “I’m really sorry you have to die.” 

This is just a quick note to myself as a keep forgetting it.  After you have added in the WiXUtilExtension.dll to your project if you want to enable intellisense ensure that the first line of you wix contains the following namespaces:

xmlns=”http://schemas.microsoft.com/wix/2006/wi” xmlns:util=”http://schemas.microsoft.com/wix/UtilExtension”>

Now that TFS Integrator has been released here are the upgrade instructions.    The quickest way to upgrade to TFS Integrator is to do the following:

 

  1. Grab this zip file.  In it are 2 files.   TFSIntegrator.exe and Readify.TeamFoundation.Common.dll
  2. Stop your TFSIntegrator Service.
  3. Backup you existing TFSInstallation, especially the ContinuousIntegration.xml and DependencyReplication.xml
  4. Extract the files and copy them over the top of your existing installation. (Gota love XCopy deployment)
  5. Once the files have been copied across you can restart the service.
  6. Grab your ContinousIntegration.xml file and check it into the root of the TeamBuildTypes folder of every team project hat you have setup for ContinuousIntegration.

    For example if you have the following config file

    <ContinuousIntegration xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.readify.net/tfsintegrator/continuousintegration/20060712″>
    <TeamProject TeamProject=”SystemA”>
    <Build ChangedPath=”$/SystemA” BuildType=”SystemAContinuous” Sleep=”60″ BuildMachine=”BUILDSERVER”/>
    </TeamProject>
    <TeamProject TeamProject=”SystemB”>
    <Build ChangedPath=”$/SystemB” BuildType=”SampleTeamProjectBContinuous” Sleep=”60″ BuildMachine=”BUILDSERVER”/>
    </TeamProject>
    </ContinuousIntegration>

    You will need to check in ContinuousIntegration.xml into  $/SystemA/TeamBuildTypes and $/SystemB/TeamBuildTypes.

  7. Grab your dependencyreplication.xml file and check it into every $/<TeamProject>/TeamBuildType/<TeamBuild> from which you wish to replicate files.

    For example if you have the following configuration file:

    <?xml version=”1.0″ encoding=”utf-16″?>
    <DependencyReplication xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.readify.net/tfsintegrator/dependencyreplication/20060725″>
    <TeamProject TeamProject=”SystemB” RootFolder=”$/SystemB”>
    <Dependency TeamProject=”SystemA” BuildType=”SystemAContinuous” >
    <File Source=”Release/Output1.dll” Destination=”$/SystemB/SystemB/Dependencies/Output1.dll” />
    <File Source=”Release/Output2.dll” Destination=”$/SystemB/SystemB/Dependencies/Output2.dll” />
    </Dependency>
    </TeamProject>
    <TeamProject TeamProject=”SystemC” RootFolder=”$/SystemC”>
    <Dependency TeamProject=”SystemB” BuildType=”SystemBContinuous” >
    <File Source=”Release/OutputB1.dll” Destination=”$/SystemC/SystemC/Dependencies/Output1.dll” />
    <File Source=”Release/OutputB2.dll” Destination=”$/SystemC/SystemC/Dependencies/Output2.dll” />
    </Dependency>
    </TeamProject>
    </DependencyReplication>

    You will need to check in the DependencyReplication.xml into $/SystemA/TeamBuildTypes/SystemAContinuous and to $/SystemB/TeamBuildTypes/SystemBContinuous

  8. Once you have verified that TFSIntegrator is still working as expected you can go back and tidy up the configuration files. 

    Using the example above $/SystemA/TeamBuildTypes/continuousintegration.xml could be refactored to look like:

    <ContinuousIntegration xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.readify.net/tfsintegrator/continuousintegration/20060712″>
    <TeamProject TeamProject=”SystemA”>
    <Build ChangedPath=”$/SystemA” BuildType=”SystemAContinuous” Sleep=”60″ BuildMachine=”BUILDSERVER”/>
    </TeamProject>
    </ContinuousIntegration>

    And $/SystemA/TeamBuildTypes/SystemAContinuous/dependencyreplication.xml could be refactored to look like:

    <?xml version=”1.0″ encoding=”utf-16″?>
    <DependencyReplication xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.readify.net/tfsintegrator/dependencyreplication/20060725″>
    <TeamProject TeamProject=”SystemB” RootFolder=”$/SystemB”>
    <Dependency TeamProject=”SystemA” BuildType=”SystemAContinuous” >
    <File Source=”Release/Output1.dll” Destination=”$/SystemB/SystemB/Dependencies/Output1.dll” />
    <File Source=”Release/Output2.dll” Destination=”$/SystemB/SystemB/Dependencies/Output2.dll” />
    </Dependency>
    </TeamProject>
    </DependencyReplication>

  9. And that is it your are all done!

This is the final series in the posts on the new version of TFS Integrator.  This takes you through the steps of installing TFS Integrator for the first time.

Account Setup

  1. First thing that you need to do is create an account for TFS Integrator, this could be the account that you run your team builds under if you already have one or a new one.
  2. You need to confirm that the account is a member of the Team Foundation Administrators group (Right Click in on your TFS Sever in Team Explorer and select Team Foundation Server Settings -> Group Membership) 
  3. You then need to add the account to the administrators group.  This is so it has the necessary privilages to create a WCF end point.  (I know this is not the best and will post the actual required permisions and how to give an account access to a WCF end point at a later stage)
  4. You then need to give the account Logon As a Service Right.  To do this go to Administration Tools-> Local Security Policy.   This will bring up the Local Security Policy MMC snap in.   Once it is loaded select Local Polices from the left hand tree view and User Rights Assignment.    
  5. Double click the “Logon As A Service” Policy and add the account that you are using.
     
  6. Now you have completed the account setup phase

Installation of TFS Integrator 1.1

  1. Download TFS Integrator from here.
  2. Double click on the msi and following the bouncing ball.
  3. At the following screen you will need to enter some information:
    Service Account:  Is the account that you wish the TFSIntegrator Service to run as
    Service Password:  Is the password for the service account
    TFS Server: Is your TFS Server that you wish TFS Integrator to register itself with
    Base Address: This is the starting address for TFS Integrator end ponts.  The computer name here will need to be name of the computer that you are installing TFSIntegrator on. 
  4. Continue to the end of the installation.  
  5. To check that the installation is successfully open up the Services mmc snap in and check and make sure that TFS Integrator is running.

Setting Up Continuous Integration and DependencyReplication

The last step that you need to do is setup your configuration files for ContinousIntegration.   For this we are going to use the following source control tree.

$/SystemA
        TeamBuildTypes
                SystemAContinuous
        SystemA       

$/SystemB
        TeamBuildTypes
                SystemBContinuous
        SystemB
                Dependencies

If we want to setup ContinousIntegration for SystemA.  We would put the following configuration file in $/SystemA/TeamBuildTypes/ContinuousIntegration.xml

<ContinuousIntegration xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.readify.net/tfsintegrator/continuousintegration/20060712″>
  <TeamProject TeamProject=”SystemA”>
         <Build ChangedPath=”$/SystemA” BuildType=”SystemAContinuous” Sleep=”60″ BuildMachine=”BUILDSERVER”/>
  </TeamProject>
</ContinuousIntegration>

If we want to setup ContinousIntegration for SystemB.  We would put the following configuration file in $/SystemB/TeamBuildTypes/ContinuousIntegration.xml

<ContinuousIntegration xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.readify.net/tfsintegrator/continuousintegration/20060712″>
  <TeamProject TeamProject=”SystemB”>
         <Build ChangedPath=”$/SystemB” BuildType=”SystemBContinuous” Sleep=”60″ BuildMachine=”BUILDSERVER”/>
  </TeamProject>
</ContinuousIntegration>

To setup dependency replication so that the outputs of the SystemAContinuous are replicated to $/SystemB/SystemB/Dependencies you would put the following configuration file in $/SystemA/TeamBuildTypes/SystemAContinuous/DependencyReplication.xml

<?xml version=”1.0″ encoding=”utf-16″?>
<DependencyReplication xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://schemas.readify.net/tfsintegrator/dependencyreplication/20060725″>
  <TeamProject TeamProject=”SystemB” RootFolder=”$/SystemB”>
     <Dependency TeamProject=”SystemA” BuildType=”SystemAContinuous” >
       <File Source=”Release/Output1.dll” Destination=”$/SystemB/SystemB/Dependencies/Output1.dll” />
       <File Source=”Release/Output2.dll” Destination=”$/SystemB/SystemB/Dependencies/Output2.dll” />
     </Dependency>
   </TeamProject>
</DependencyReplication>

And that is it.  You have now installed and configured TFS Integrator.          

I have been working on a new version of TFSIntegrator that will be released very shortly.   As part of the new release I wanted to include a new improved version of the setup project.   One of the goals that I wanted to include was the ability to install the service during the installation process.  With Wix V3.0 this is pretty easy.  There is a ServiceInstall and ServiceControl elements that you can use.   There are a couple of things to remember:

  1. The ServiceInstall element needs to be in the same component that install the file for the service. 
  2. The file that is used, is the one with the KeyPath attribute set to yes.

An example component is as follows:

<Component Id="InstallService" Guid="{A217EE94-F719-47c4-BEE0-28FDF944CD5C}">
     <File Id="EXECUTABLE1" Name="TfsIntegrator.exe" Source="Files\TfsIntegrator.exe" 
KeyPath="yes"/> <ServiceInstall Id="ABC" Name="TfsIntegrator" DisplayName="TfsIntegrator" Type="ownProcess" Start="auto" ErrorControl="normal" Description="TfsIntegrator" Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]" /> <ServiceControl Id="StartTfsIntegrator" Name="TfsIntegrator" Start="install" Wait="no" /> <ServiceControl Id="StopTfsIntegrator" Name="TfsIntegrator" Stop="both" Wait="yes" Remove="uninstall" /> </Component>

When using Wix you not sure of where a file will be located on the disk.   If this is the case then you need to use DirectorySearch and FileSearch to search for the file.   DirectorySearch  is quite simple you specify the directory that you wish to search and the file that you are trying to find.    A couple of things to point out

  1. Depth on the DirectorySearch element specifies how many sub directories deep you wish to search for the file.  If you only want to search in a specific directory specify a depth of 0. 
  2. MinVersion or MaxVersion can be used to limit the search to a specific file version.

The following is an example that I used to find the location aspnet_regiis for .NET Version 2.   Note:  I also did a RegistrySearch to find out where the .NETFramework was installed. 

 

<Property Id="FRAMEWORKBASEPATH">
<RegistrySearch Id="FindFrameworkDir" 
Root="HKLM"
Key="SOFTWARE\Microsoft\.NETFramework"
Name="InstallRoot" Type="raw" > </RegistrySearch> </Property> <Property Id="ASPNETREGIIS" > <DirectorySearch Path="[FRAMEWORKBASEPATH]"
Depth="4" Id="FindAspNetRegIis"> <FileSearch Name="aspnet_regiis.exe" MinVersion="2.0.5" /> </DirectorySearch> </Property>

About

I am a MCTS in Team Foundation Server based in Canberra, Australia. My passion is to improve developer productivity using tools like TFS.

I'm currently employed as a Senior Consultant at Readify

Tools I have Developed

  • TFS Integrator
  • TFS Deployer
  • TFS Listener

del.icio.us