Wednesday, December 10, 2008

Maximum number of errors has been exceeded, twice!

Maximum number of errors has been exceeded, twice!

What visual studio really means is that the maximum number of errors per project has been exceeded.

Tuesday, December 9, 2008

Windows Server 123 days uptime


This was the uptime of the Windows Server that hosts our TFS and a database server, it survived several reconfigurations of sharepoint and IIS during the 123 days, but I had to restart it yesterday. I hoped that a restart would fix a problem with sharepoint I was having, but it didn't help =(, it feels like I pointlesly slaughtered it for nothing, it's not everyday that I see such a stable windows installation.

Monday, December 8, 2008

Deleting work items from TFS 2008

I think that Microsoft has a very careless approach to managing work items in team studio, let alone making a new work item type is in any way streamlined (I will write about this in my next entry) but just deleting a work item is a task in itself, which was only introduced in Team Foundation Server Power Tools through the console, and was not available in 2005.

Here are the links that describe how to delete a work item:

Install  the Visual Studio Team System 2008 Team Foundation Server Power Tools: 

http://msdn.microsoft.com/en-us/tfs2008/bb980963.aspx

 

Video: “How Do I: Destroy Work Items and Work Item Types?”

http://msdn.microsoft.com/en-gb/teamsystem/cc700982.aspx

 

Basically: from the command prompt launch:

C:\Program Files\Microsoft Team Foundation Server 2008 Power Tools\TFPT.exe destroywi  /server: /workitemid:

 

And even after that the work item is not completely destroyed:

http://stevennagy.spaces.live.com/Blog/cns!B2EFDBF0964586B3!238.entry


Overall this gives me the feeling that management of work items in team studio is incomplete, especially in contrast to build management, testing, source control and even the high level of integration of the documentation into the development lifecycle. I just don’t understand why Microsoft can’t be bothered to implement management of work items in a decent manner.

Sunday, December 7, 2008

TFS 2008 and Gmail

How to send email alerts from TFS through Gmail.

After I have set-up the Team Foundation Server I needed to set-up the email alerts, especially alerts for when new work items get assigned. We are using Google apps in the company, so I just set-up another account inside our Google domain for alerts and went to configure the TFS. For me, this turned out to be the most challenging part of the Team Foundation Server set-up.

This blog entry helped me a lot:

http://geekswithblogs.net/DavidBarrett/archive/2008/06/13/team-foundation-server-tfs-2008-and-authenticated-smtp---a.aspx


To send email alerts through Gmail you will need to install the following components:

Visual Studio Team System Web Access 2008 Power Tool

Stunnel

And you will also need to set-up an SMTP virtual server on the machine.


Setting-up TFS:

After installing the web access power tool go to

C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services\Web.config

And set it to look like this:

xml version="1.0" encoding="utf-8" ?>

<configuration>

   <appSettings>

    <add key="ConnectionString" value="Application Name=TeamFoundation;Persist Security Info=False;Initial Catalog=TfsIntegration;Data Source=SERVERNAME\TEAMSTUDIO;Integrated Security=SSPI"/> 

    <add key="eventingEnabled" value="true" />

    <add key="DetailedExceptions" value="true" />

    <add key="emailNotificationFromAddress" value="TFS@YourGmailDomain.com" />

    <add key="smtpServer" value="localhost" />

     

  appSettings>

     <runtime>

     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <probing privatePath="bin\Plugins;bin\Plugins\zh-chs;bin\Plugins\zh-cht;bin\Plugins\de;bin\Plugins\es;bin\Plugins\fr;bin\Plugins\it;bin\Plugins\ja;bin\Plugins\ko"/>

    assemblyBinding>

  runtime>

   <system.web>

    

   <httpHandlers>

       <add verb="*" path="methodology.asmx" type="Microsoft.TeamFoundation.Client.MethodologyDownloadHandler" />

       <add verb="*" path="methodologyUpload.asmx" type="Microsoft.TeamFoundation.Client.MethodologyUploadHandler" />

   httpHandlers>

   system.web>

 configuration>

 

The actual SMTP configuration is found at:

C:\Program Files\Microsoft Visual Studio 2008 Team System Web Access\Web\web.config

You need to set it up to look something like this:

(the file is long, so I will only include the parts you need to edit)

     

    <emailSettings sendingEmailEnabled="true"  />

    

  <system.net>

    <mailSettings>

           <smtp deliveryMethod="network" from=" TFS@YourGmailDomain.com ">

         

       

               

              <network  host="localhost" port="25" enableSsl="false" defaultCredentials="true"/>

           smtp>

    mailSettings>

  system.net>

 

This will make TFS to connect to an SMTP server on localhost, now you need to set-up the virtual SMTP server.

Setting-up the SMTP server:

Go to ISS manager ->

Default SMTP Virtual Server -> Properties ->  Delivery -> Outbound Security

And choose “Basic authentication”

Username: TFS@ YourGmailDomain.com

Password: YourPassword

Do not enable TLS encryption


Then go to

Default SMTP Virtual Server -> Properties ->  Delivery -> Advanced

Fully-qualified domain name:

ServerName.LocalDomainName.local

Smart host:

[localhost]

 

 

Then under Default SMTP Virtual Server -> Domains add a new remote domain

“*.com”

In its properties set:

Enable “Allow incoming mail to be relayed to this domain” 

Forward all mail to smart host

[127.0.0.1]

Outbound Security

Choose “Basic authentication”

Username: TFS@ YourGmailDomain.com

Password: YourPassword

Do not enable TLS encryption

As you have noticed the SMTP server is still set to localhost, this is where Stunnel comes in to connect you to the Gmail server.

Set-up Stunnel

You need to set-up Stunnel as a windows service (described in http://www.stunnel.org/faq/run.html#ToC7)

The stunnel.conf file should look something like this:

; Sample stunnel configuration file by Michal Trojnara 2002-2006

; Some options used here may not be adequate for your particular configuration

 

; Certificate/key is needed in server mode and optional in client mode

; The default certificate is provided only for testing and should not

; be used in a production environment

;cert = stunnel.pem

;key = stunnel.pem

 

; Some performance tunings

socket = l:TCP_NODELAY=1

socket = r:TCP_NODELAY=1

 

; Workaround for Eudora bug

;options = DONT_INSERT_EMPTY_FRAGMENTS

 

; Authentication stuff

;verify = 2

; Don't forget to c_rehash CApath

;CApath = certs

; It's often easier to use CAfile

;CAfile = certs.pem

; Don't forget to c_rehash CRLpath

;CRLpath = crls

; Alternatively you can use CRLfile

;CRLfile = crls.pem

 

; Some debugging stuff useful for troubleshooting

;debug = 7

;output = stunnel.log

 

; Use it for client mode

;client = yes

 

; Service-level configuration

;service = Stunnel-Client

 

;[pop3s]

;accept  = 995

;connect = 110

 

;[imaps]

;accept  = 993

;connect = 143

 

client = yes

debug = debug

[pop3s]

accept = 127.0.0.1:1109

connect = pop.gmail.com:995

 

[smtps]

accept = 127.0.0.1:40

connect = smtp.gmail.com:465

;

;[ssmtp]

;protocol=smtp

;accept  = localhost:30

;connect = smtp.gmail.com:25

 

;[https]

;accept  = 443

;connect = 80

;TIMEOUTclose = 0

 

; vim:ft=dosini

 

I did this a couple of months ago, so I might have left out something, if you find that something does not work, please mention it in the comments. This set-up has been working without any glitches scince I have set it up, but I was really disappointed with the fact that it is impossible to connect the TFS directly to a secured SMTP server, and I could not event directly forward mail to the Gmail servers from the virtual SMTP server.

 

 

Fixing TF209009

A couple of days ago I had to set-up a build computer to do weekly builds. I couldn’t be bothered to go the dedicated build server so I just remoted to it. After setting up the build agent and the build definitions I tried to do a test build but all I got is the following error:

“TF209009: The account NT AUTHORITY\NETWORK SERVICE is not authorized to communicate with Team Foundation Serverhttp://server:8080/. Verify that the account is a member of the Build Services security group for the appropriate team project on the Team Foundation Server and that the account's password has not expired

 Googling TF209009 only produced 9 results, and none of them had a solution, so I decided to write this post.

 The problem is that the build agent runs as a windows service, and probably because I remoted to the machine the service would be run as “NT AUTHORITY\NETWORK SERVICE” which of course is not authorized to access the server, and is not a licensed user in TFS (more info).

To fix this you need to go to the windows services and change the “Visual Studio Team Foundation Build” service to log on as the domain user that is authorized to access the server and is in all the correct user groups in the TFS. 

Wednesday, July 30, 2008

wtf does it want?

this is a 230mb installer that downloaded an additional 60mbs during the installation all for:

Thursday, July 24, 2008

Hello World!

The first creature that God has created, only said "Hello World" and died.