Search This Blog

Thursday, December 28, 2006

Get Build Changes (ChangeSetData, Changeset, Change)

To improve our custom build report that I have talked about before (Custom Build Logger) I wanted to add information regarding the users that are involved in this build and the changes that they made to source control.
Here's an example how to go over build changes:

using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.VersionControl.Client;
using Microsoft.TeamFoundation.Build.Proxy;

TeamFoundationServer tfs = new TeamFoundationServer(server);
VersionControlServer vcs = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
BuildStore bs = (BuildStore)tfs.GetService(typeof(BuildStore));
ChangeSetData[] changeSetsData = bs.GetChangeSetsForBuild(bs.GetBuildUri(project, buildNumber));
foreach (ChangeSetData changeSetData in changeSetsData)
//Here you can do something with the ChangeSetData properties
//Get the ChangeSetData Changeset
Changeset changeSet = vcs.GetChangeset(changeSetData.ChangeSetId);
//Go over the Changeset changes
foreach (Change change in changeSet.Changes)
//Here you can do something with the Change

Monday, December 25, 2006

File was rejected by digital signature policy (VS 2005 SP1 Installation)

I'm installing Visual Studio 2005 SP1 on our servers and I got this error while running the installation. It seems to be a memory issue while trying to verify the package. Here's a KB that that was suppose to help solving the problem: Here's a detailed guide:
1) Open Administrative Tools -> Local Security Policy.
2) Click the "Software Restriction Policies" item on the left tree. If you see on the right side of the window a message that says: "No Software Restriction Policies Defined" then you need to right click the "Software Restriction Policies" item on the left side of the window and select "Create New Policies". Look at the screen shot below:

3) After doing this (or you did not have to), double click the "Enforcement" item in the right side of the window. In the new opened window select the "All users except local administrators" radio button. and apply the changes. Take a look at the picture below:

4) After doing all those still I had the same error. I searched and found another post ( regarding big patches installation and followed these steps:

Set the DWORD value PolicyScope to 1 in the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers key. Run "net stop msiserver" (without quotes). Install the EXE or MSP (if you extracted the MSP from the EXE).

Don't forget to set it back to the old value.

This helped me solve the issue and after few hours of struggling I finished installing the patch. I don't know if you need to do everything I mentioned. Maybe you can apply the last one only and it will work.

Thursday, December 14, 2006

As I mentioned before, yesterday, I spoke at the Team System event is Israel. I have joined SRL to a lecture on Configuration Management and Build Enhancements. It was a pleasure sharing the knowledge. Here I am:

Tuesday, December 12, 2006

Drag and Drop Files Order

Check out this interesting question on Yedda

Yedda - People.Sharing.Knowledge.WinAmp 5.32: playlist

I love Winamp and I've been using it since version 2 I think, but there's one problem with it that I keep getting: when I drag files from Windows Explorer to the Winamp playlist, the order of the files changes. When will they fix it?

Topics: , ,

Asked by hubble on December 11, 2006

View the entire discussion on YeddaYedda - People.Sharing.Knowledge.

Check out this interesting answer on Yedda

Yedda - People.Sharing.Knowledge.WinAmp 5.32: playlist

Actually, it's a windows and not WinAmp issue. If you'll do this with Windows Media Player you'll get the same result. I even wrote an application once that had the same behaviour. The reason it happens is that when you start dragging windows consider the file that the mouse cursor is pointing on as the first one in the list. If you will point to the first file in the list you will get the list as it should be but probably (and naturally...) you are pointing to the middle of the list and the files are added not as you wished.

Hope I helped.

Topics: , ,

Answered by dudushmaya on December 11, 2006

View the entire discussion on YeddaYedda - People.Sharing.Knowledge.

Monday, December 11, 2006

Microsoft Team System Event in Israel

I'm going to speak this Wednesday at the Annual Microsoft Team System Event in Israel. I will talk about how we see Team System in our organization and present some of the enhancements we did.
Team System Rocks!!! Spread the word...

Wednesday, December 06, 2006

Custom Build Logger (ILogger)

Developers were complaining that the build log (Build.log) is too complicated to read and they only want so see the log when the build fails and why.

The first thing I though doing was to write a log reader. Wrong!!! I googled "team build logger" and found this page: which explains how to write a custom build logger (by implementing ILogger interface). I was already familiar with this interface and used it once while writing an MSBuild script executer. The important stuff from this blog was that you can register a custom logger for a team build by adding a line to the TFSBuild.rsp for the build type (/Logger:LoggerClassFullName, AssemblyFileName ).

So, I've implemented a new logger which captures build errors and send them at the end of the build to developers. The thing is that failed tests are treated as warning and do not fail the build (The log view in Visual Studio captures the warnings and mark the build as failed). The worse thing is that there is not logging regarding the failed tests. So we are back where we've started with a log that only says that the tests failed. The next step to try and solve this issue was finding the trx files and parsing them for the test results. In the code below you can see how I did it. Ignore the whole code just look at the SelectNodes and SelectSingleNode lines which retrieve the errors from the trx file. You can download the sources from here. Thank you Eyal for the free hosting... To make it work you need to update the config file with your settings and add the line: /Logger:BuildLoggers.ErrorsMailLogger, BuildLoggers.dll to the TFSBuild.rsp file.

XmlNodeList xmlNodeList = testResultsXmlDoc.SelectNodes("//UnitTestResult[errorInfo]");




Clarizen Secures $7 Million in First-Round Funding Co-Led by Benchmark Capital and Carmel Ventures

We had a nice press release yesterday. You can read it here:
Some other article regarding Clarizen: - Hebrew