Wednesday, December 31, 2008

XP And new years resolutions

At the verge on a new year people tend to have new years resolutions and things like that mine is blog more :p amongst others. So here we go.

I recently started reading Ron Jeffries Extreme Programming Adventures in C# (http://www.amazon.com/Extreme-Programming-Adventures-DV-Microsoft-Professional/dp/0735619492). Since quite a little more then a year I Agile Development Methodologies caught my eye. Recently I am starting to dig deeper in TDD and XP. In this series of posts I will let you follow me on my journey.

Monday, December 01, 2008

Team Foundation Server 2008 SP1 with SQL 2008

I installed TFS 2008 with sql server 2008 and when I opened Team Explorer the Reports node in the team project was marked with a red cross and thus inaccessible.

Simply upgrade your Visual Team System 2008 WITH team explorer installed to SP1

Saturday, October 04, 2008

Microsoft Project Server 2007

I finished installing microsoft Project Server 2007. I came across 2 issues.
The first one was the 2 Services (Microsoft Office Project Eventing Service and the Queue service) not starting this happens when the machine is not connected to the internet and tries to get some certificates from:
http://crl.microsoft.com/pki/crl/products/CodeSignPCA.crl
http://crl.microsoft.com/pki/crl/products/CodeSignPCA2.crl

When you try to start them manually you get "Service did not respond in a timely fashion" and in the Eventlog you have: "Unexpected exception occured".

This can be solved by using this woirkaround:
"
Manually add the CRLs from the above Urls to the server manually (assumes
you've downloaded them locally first):
certutil -addstore CA CodeSignPCA.crl
certutil -addstore CA CodeSignPCA2.crl

Resolution Workaround (don't try this unless you've exhausted everything
else):

We haven't tried this yet, but it is our hunch that if you cannot allow the
server access to the internet that it may be possible to fool .Net into using
locally hosted .crl files. This could only work if the restrictions that
prevent the service account and server reaching the internet still permit a
loop-back request to itself (calling web pages from the local server).

The way to do this is to add this to your HOSTS file on the servers:
127.0.0.1 crl.microsoft.com

"

or make sure you are connected to the internet for the easy solution :p


the other one was that jobs got stuck in the queue in "Waiting to be processed status". This I solved by running the service under the same credentials as the SSPService account.

that all for now folks :)

Monday, April 14, 2008

Continous Integration and the Database

Spend some few days setting up a continous integration for a database project. Found some stuff on the internet but they got it all wrong :)

I am using Team Foundation Server 2008.

The only thing you need to do is modify the TFSBuild.proj

Modify the following sections. This enabled the automatic generation of a sql script that will be copied in the Drop Folder.
Find the SoltionToBuild tag and add the properties as shown below:




<SolutionToBuild Include="$(BuildProjectFolderPath)/../../CIDB/CIDB.sln">
<Targets></Targets>
<Properties>DefaultDataPath=C:\BuildDrop\;TargetDataBase=TestDb</Properties>
</SolutionToBuild>

Add the default configuration to the ConfigurationToBuild ItemGroup as shown below (make sure to match it to your settings in the Configuration Manager)
<ItemGroup>
<!-- CONFIGURATIONS
The list of configurations to build. To add/delete configurations, edit this value. For example,
to add a new configuration, add the following lines:

<ConfigurationToBuild Include="Debugx86">
<FlavorToBuild>Debug</FlavorToBuild>
<PlatformToBuild>x86</PlatformToBuild>
</ConfigurationToBuild>

The Include attribute value should be unique for each ConfigurationToBuild node.
-->
<ConfigurationToBuild Include="ReleaseAny CPU">
<FlavorToBuild>Release</FlavorToBuild>
<PlatformToBuild>Any CPU</PlatformToBuild>
</ConfigurationToBuild>

<!--Include the configuration to build this generates a .sql file in the drop folder-->
<ConfigurationToBuild Include="DefaultAnyCPU">
<FlavorToBuild>Default</FlavorToBuild>
<PlatformToBuild>Any CPU</PlatformToBuild>
</ConfigurationToBuild>
</ItemGroup>

Next add the following section to the end of the TFSBuild.proj file. the %3B is the escape character for ';' in MSBuild




<PropertyGroup>


<TargetConnection>Data Source=.%3BIntegrated Security=True%3BPooling=False</TargetConnection>
<DefaultDataPath>C:\BuildDrop\</DefaultDataPath>
<TargetDataBase>DevDb</TargetDataBase>
</PropertyGroup>


<Target Name="AfterDropBuild">
<MSBuild Projects="$(SolutionRoot)\CIDB\CIDB\CIDB.dbproj"
Properties="Configuration=Default;
OutDir=$(SolutionRoot)\..\binaries\Default\;
AlwaysCreateNewDatabase=false;
TargetConnectionString=$(TargetConnection);
DefaultDataPath=$(DefaultDataPath);
TargetDataBase=$(TargetDataBase)"

Targets="ReBuild;Deploy" /> <!—Need to specify the Rebuild target otherwise fails -->
</Target>

Update:

If you modify your source folder setting in the workspace - defaults to $(SourceDir)- make sure that you override your SolutionRoot property

by adding the following

...

</ProjectExtensions>
<PropertyGroup>

<SolutionRoot>C:\Workspace_Build02 </SolutionRoot>

....




Thats all there is to it :)



Coming up automatically generate an upgrade script to deploy to production systems... I installed the Database Team Edition on the build agent but I am not quite sure if its necessary I will investigate this... I dont know if its default part of ms build

Wednesday, February 13, 2008

Long time since I made a blogpost. But finally got my TFS server running at home and it works like a charm

This guide proved to be very usefull:
http://bloggingabout.net/blogs/mglaser/archive/2007/01/31/hosting-team-foundation-server-on-a-fully-qualified-domain-name-fqdn.aspx