Sunday, July 3, 2016

Windows and PowerShell versions

Although it's written all over the net i just felt i had to put it also, it makes life easier when using the TFS2015 builds and you know what is missing....



PowerShell Version
Release Date
Default Windows Versions
Available Windows Versions
PowerShell 1.0
November 2006
Windows Server 2008 (*)
PowerShell 2.0
October 2009
Windows 7
Windows Server 2008 R2 (**)
PowerShell 3.0
September 2012
Windows 8
Windows Server 2012
PowerShell 4.0
October 2013
Windows 8.1
Windows Server 2012 R2
PowerShell 5.0
April 2014 (***)
Windows 10

Saturday, April 23, 2016

vNext Build Git

The new TFS2015 Build system is very powerful and easy to use.
but there are still no tasks for git integration and we are forced to use batch / Power Shell scripts.

commit / push
when a git is cloned by the build it creates a detached head (temporary branch)

do this (case sensitive):
git commit "<files>" -m "comment"
git branch -a // show all branches optional
git rebase HEAD <branch name>
git push origin <branch name>

** make sure the build agent user has "Exempt from policy enforcement" set to allow otherwise the push will fail if branch policies exist.

Warning
I have noticed that using pull request with a build policy and the build performs updates to the repository causes the pull request to not function correctly as rebase also pushes the pull request.

branch polices
Although written, for all new users to Git, Visual studio will not let you create a Pull request
(available since VS2015.1) from the same branch locally to the same branch remotely.
the ideal way is to use git flow and create pull request from develop to master


Wednesday, January 6, 2016

Running old XAML build templates on TFS 2015 build server

Recently i arrived to help a client in upgrading their TFS2012 to TFS2015 Update 1.
the upgrade passed successfully without any issues.

however when we tried to run the builds we often got an error the template could not be loaded.



So first thing i did was to verify all the custom build assemblies were upgraded and don't contain "microsoft.teamfoundation.dll" as this assembly is not included since TFS2013 (merged to microsoft.Teamfoundation.Client). sadly this did not help.

after long try and error (google was no help here :(), i found this to be a reference written in the XAML it self.
i opened the XAML in Notepad and found,
there is a section  called "TextExpressions.ReferancesForImplementation" there i found
<AssemblyReference>Microsoft.TeamFoundation</AssemblyReference>
removing this line fixed the problem and the template was able to load

hope this will help you also...