Tuesday 29 April 2014

Build VS2010 Setup Projects with TFS Build

I wanted to build a .vdproj (setup project in VS 2010) with TFS build and found MS Build does not support that out of the box. Below are few link that explains  “how to do this with build template changes”.
All of above suggested changing build templates, which I am OK to do with. I thought there should be a easy way out. Yes of course there is. “Old but GOLD” article in MSDN has given me a hint.
I created an additional solution and a C# Class Library project.


I already had VS 2010 available in my build server.  I used my Setup Builder C# project “AfterBuild” to execute devenv.exe and build my solution with .vdproj. Then copied the Setup.exe and .msi file to Output to directory so that it will be copied to TFS build drop.
Below are the commands used in “AfterBuild” .



This builds my setup project with MSBuild and it executes devenv.exe to build the Main.Solution with .vdproj (setup project).


I believe it would be better if I could use the Build Template change approach. But with the time constraints, and when you need a quick solution using what I have explained above is definitely a useful workaround.

Sunday 27 April 2014

Upgrading TFS2013 to TFS 2013.2

TFS 2013.2 is out there I thought of upgrading my demo environment to TFS2013.2 from TFS 2013. Below are steps for to do this. For more details always refer Installation Guide for TFS2013.2.

1. Open command prompt in administrator mode in TFS Server and stop all TFS services with “ TFSServiceControl quiesce”.

2.  Start TFS2013.2 setup.




3. Can safely ignore this warning (It is the latest update :) ) and you will not get this if internet is connected to the server. Close to Launch upgrade wizard.

4. Wait till current settings detected.

5. Click Next.

6. TFS Configuration database selected. Click Next.

7. Enter password for TFS service account.

8. Specify “File Cache Folder” for TFS. (You can change the root folder and settings later if required)

9. Select configure reporting.

10.  Report server details populated.

11. Warehouse DB selected.

12. Analysis services ready.

13. Enter password for TFS reports account.

14. Select to configure SharePoint.

15.  User the current settings.

16. Inspect all settings and click Verify.


17. Click Configure.


18. Configuration competed. Click Next to upgrade project collections.





19. Upgrade completed smoothly.


20. Verify in Web Access shows everything up and running for existing projects.


Let’s configure and explore new features for TFS2013.2 in coming posts.

Thursday 24 April 2014

Resolve "Run On Agent (reserved build agent ) Cannot create unknown type '{clr-namespace:" for TFS Custom Build Templates

Today I came across a strange error. I have a custom build template which manipulates assembly version and was running for long time without issues. Today when I try to use this on a newly provisioned build server I came across below error

Run On Agent (reserved build agent BLDSVR - Agent1)
 Cannot create unknown type '{clr-namespace:MyCustomActivityNamespace;assembly=MyCutomActivityAssembly}MyCodeActivity'.

This Template was used for so many builds/projects in this collection so I was 100% ++ sure this is nothing wrong with my template or custom activities. Few minutes trial and error, I searched in www.. and Wow ! this was exactly my issue... Cannot create unknown type clr-namespace: ONLY on one “TFS build agent” and really thankful to Jupaol for sharing his experience. He saved my day and by spending almost his day figuring out his similar issue. Yeah..it was just a restart of the problematic build agent build service.

My custom template successfully builds the application now with the build server after restarting the build service.

This is awesome lesson...restart and try if something strange with MS windows from good old days :)

This error could be because of your mistakes as well, for example have a look at Stuck on “Cannot create unknown type {clr-namespace:” in TFS Build?

Tuesday 8 April 2014

08. Create Instance of Development Machine - Setup Virtual Environment for TFS 2013 - Using Virtualbox

In this step of Setup Virtual Environment for TFS 2013 - Using Virtualbox, we create machine instance for development use.

01. First we need to create a Development user in our PDC

02. Then create machine with Virtualbox using the base machine hard disk we have created.

03. Change the machine name

04. Assign an IP address and assign DNS and Default gateway to PDC

05. Restart the machine

06. Add the machine to domain

07. Choose restart later

08. Add developer domain account to the administrators group in local machine

09. Restart the machine and login with developer domain account.

Next we will setup the first team project in our environment.

Popular Posts