Have been busy installing an internal version of Team Foundation Server 2012, hosted on Windows Server 2012 using Forefront Threat Management Gateway 2010 to perform SSL operations and helping to ensure I don’t need to put my TFS server directly on the Internet.
As usual there were a couple of gotchas with this configuration so if there’s any interest in this configuration, I’ll find some time to write up my notes…
If I had one pound sterling for every Team Foundation Server install I’ve performed in my life I’d be a rich man by now. Back in late 2004/early 2005 when a number of us were playing with the alpha TFS 2005 bits, all the components had to be installed on a separate machines and if you made the slightest mistake it was a rebuild job from the bare metal – of course Virtualisation technologies like snapshotting weren’t mainstream in those days and installation was a pain!
Fast forward 8 years and here we are; .NET Framework is properly integrated as a system component in the OS, Virtualisation and snapshotting is the norm, disks have got much faster, TFS installs in minutes (not hours) and automatically configures IIS and all the prerequisites it needs, which makes life amazingly easy.
Grant Holliday wrote this article that I still refer to when I need to build a TFS2010 virtual machine from scratch so when I came to installing a brand new Windows 8 Server with SQL Server 2012 and TFS “11″ in a Virtual Machine I had to do a little bit of thinking for myself.
Assuming you want to create a Default instance of SQL Server 2012 complete with Analysis Services and SQL Server Reporting Services (SSRS) as if you had accepted all the defaults:
- start with a completely blank Windows 8 Server image with no roles or features added
- mount the disk in your favourite manner (i.e. mount the .iso image on your host machine from the menu on your guest VM, or use Virtual CloneDrive to mount the .iso file locally)
- at a new administrator command prompt, replace the highlighted bits with a valid user who you wish to have full access to everything!) and paste the whole thing:
d:\setup.exe /QS /ACTION="Install" /ENU /UpdateEnabled /FEATURES=SQLENGINE,FULLTEXT,AS,RS,SSMS,ADV_SSMS /UpdateSource="MU" /INDICATEPROGRESS="True" /X86="False" /INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server" /INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" /INSTANCENAME="MSSQLSERVER" /INSTANCEID="MSSQLSERVER" /SQMREPORTING="False" /RSINSTALLMODE="DefaultNativeMode" /ERRORREPORTING="False" /INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /AGTSVCACCOUNT="NT Service\SQLSERVERAGENT" /AGTSVCSTARTUPTYPE="Manual" /ASSVCACCOUNT="NT Service\MSSQLServerOLAPService" /ASSVCSTARTUPTYPE="Automatic" /ASCOLLATION="Latin1_General_CI_AS" /ASDATADIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data" /ASLOGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log" /ASBACKUPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup" /ASTEMPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp" /ASCONFIGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config" /ASPROVIDERMSOLAP="1" /ASSYSADMINACCOUNTS="VS11BETA\Administrator" /ASSERVERMODE="MULTIDIMENSIONAL" /SQLSVCSTARTUPTYPE="Automatic" /FILESTREAMLEVEL="0" /SQLCOLLATION="Latin1_General_CI_AS" /SQLSVCACCOUNT="NT Service\MSSQLSERVER" /SQLSYSADMINACCOUNTS="VS11BETA\Administrator" /TCPENABLED="1" /NPENABLED="0" /BROWSERSVCSTARTUPTYPE="Disabled" /RSSVCACCOUNT="NT Service\ReportServer" /RSSVCSTARTUPTYPE="Automatic" /FTSVCACCOUNT="NT Service\MSSQLFDLauncher" /IAcceptSQLServerLicenseTerms
Installation will progress for a while but when finished you have all the components required to do the TFS 11 install immediately afterwards.
Has been a long time since I posted on here (sign of the times I think, most of my updates are relegated to 140 characters these days). I’ve been very busy in the UK, India and other countries helping a very large company get a hold of their deployment engineering practices as part of an ALM overhaul.
It’s nearly November and RippleRock are sponsoring the ALM Summit in Redmond. If you are and you’re from the UK, drop me a note in the comments – we might even organise a mini UK ALM User Group over a beer whilst we are out there…
Only applies if you are in a non-US locale.
Working through a Visual Studio Scrum implementation on a client site at the moment we noticed there seems to be a date format bug in the Sprint Burndown report in Visual Studio Scrum 1.0 RTW if you are in a non US locale. This prevents the current sprint bring calculated and the report falls over with an error:
Query execution failed for dataset ‘dsSprintsCurrent’. (rsErrorExecutingCommand)
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
My fix is in the RDL and to replace the line:
DECLARE @Tomorrow DATE = CONVERT(DATE, DATEADD(day, 1, @Today)
DECLARE @Tomorrow DATE = CONVERT(DATE, DATEADD(day, 1, CONVERT(DATE, @Today, 103)))
No doubt there will be an update at some point but thought put up this information to help anyone who has this issue.
Update (22nd July 2010): The official fix revolves around the data type of the “Today” parameter in the report which is incorrectly set to a string:
After all the effort put in to setting up a vote for the date of the 2nd UK ALM User Group meeting on 23rd June 2010, I am regretfully going to have to postpone it again.
Firstly there is some football match* on Wednesday afternoon and this has limited the choice of venue somewhat (and probably attendance), secondly it is necessary for me to be on a client site on Wednesday and it is out of town so I cannot even guarantee my attendance.
This is certainly not the way we planned things, I would be grateful for anyone who can step forward and help co-ordinate the London end of things jointly with me so we have some resilience in future. Any suggestions for a venue with a projector (not showing the football!), tables, WiFi (am I just dreaming now?) and a bar gratefully received.
We had a few presenters lined up for this session as well as a raffle for a Pluralsight On Demand subscription and I apologise to them especially and hope we can reschedule all of this asap.
Finally, i’m compiling a twitter list (@ukalmug/members) with everyone who wants to participate so we can follow each other – please can you send me your twitter ID and I will add it.
UK ALM User Group Coordinator, http://almug.org
(* Can you tell I’m not a big football fan?)
This post generated some interest on a discussion list so I’m re-posting here on my blog. Cutting a longer story short, the original poster wanted a way to start a process as Network Service rather than as the current Windows identity to mitigate the risk that you have more rights than you should have.
For those who have tried to use “runas” to achieve this you are left with the rather bleak message: “RUNAS ERROR: Unable to acquire user password”.
I’ll skip the reasons for this and go straight onto the solution. Create a dummy service using the Service Manager (sc.exe). This launches the application in the right session and is allowed to run as Network Service or even Local System (NT Authority\Local System).
sc delete NetworkServiceCmd >nul:
sc create NetworkServiceCmd binpath= “cmd /K start c:\neverendingapp.exe” obj= “NT Authority\Network Service” >nul:
sc start NetworkServiceCmd >nul:
sc delete NetworkServiceCmd >nul:
Simply drop the above into a batch file and run it. You can then use “Attach to Process” in Visual Studio to attach to the process (don’t forget that your PDB’s must be in the same location as the assembly).
Here’s a screenshot of the debugger attached to my “NeverEndingApp” and viewing the current identity.
You need to manually kill off the process you started, you can use Task Manager as usual or here’s a macro I use that works in my scenario. You can attach this to a Keyboard Shortcut or even a Toolbar.
Public Module TerminateProcess
Public Function TerminateProcess()
Dim processes As EnvDTE.Processes = DTE.Debugger.LocalProcesses
Dim process As EnvDTE.Process
For Each process In processes
If (process.Name.ToLower().Contains(“neverendingapp.exe”)) Then
I’m certain all the above can be improved on but I think all the basics are in here and customising it for your process is a challenge I’ll leave to the reader!
There are many more sophisticated ways of achieving this but none seemed to give me exactly what I wanted, so here I present yet another way of doing assembly versioning with Team Build 2010. I wanted my Team Build number to exactly match that of my assembly versions (and not be derived), like this:
So here’s how I do it. To start off with I customise the BuildNumber format within my build definition:
In my case, I decided to customise it so that the Major and Minor version numbers “0.1” were added explicitly. This lets me control the first two parts of the version number which is what I want to achieve. I also added the macros $(Month)$(DayOfMonth) with a 1 in front of it. For the 2nd May 2010 this would generate a number 10502. (The reason I don’t use the full year here is that for today it would generate a build number of 100502 and a file version number cannot be higher than 65335).
When I decide to work on version 0.2, 0.3 or 1.0 all I have to do is increment the Build Number here and save the definition, I’m also happy to increment the number when the year changes. I said it was simple!
The final part of the build number format was left as-is (i.e. the Revision number that increments by 1 with each build on that day and resets for the next day).
Now all we need to do is retrieve this version number when MSBuild is run against the solution, split the version number and take the numeric portion into the Properties\AssemblyVersion.cs file (you will need to comment out the AssemblyFileVersion line in that file first and check it in).
Here’s the fragment that you’ll need to insert in your .csproj file (you’ll have to check it out then open it in Notepad or your favourite text editor).
AssemblyFile="$(MSBuildProgramFiles32)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.ProcessComponents.dll"
Condition="' $(BuildUri) '!=' '"/>
<Target Name="BeforeBuild" Condition="' $(BuildUri) '!=' '">
<GetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)">
<Output TaskParameter="BuildNumber" PropertyName="BuildNumber" />
<AssemblyVersionLines Include="[assembly:AssemblyFileVersion("$(BuildNumber.Substring($(BuildNumberSplitLocation)))")]" />
<Exec Command="attrib -r "$(ProjectDir)\Properties\AssemblyInfo.cs"" ContinueOnError="false" />
<Message Text="Lines being added: @(AssemblyVersionLines)" Importance="high" />
<WriteLinesToFile File="$(ProjectDir)\Properties\AssemblyInfo.cs" Lines="@(AssemblyVersionLines)" />
Hopefully this will save someone a minute or two.
In Visual Studio 2010 to enable Code Coverage, you edit the .TestSettings file (e.g. Local.TestSettings) – similar to the TestRunConfig file in Visual Studio 2008. Code Coverage no longer has its own section – it can be found under Data and Diagnostics where you can then set Code Coverage to enabled by checking the box.
The subtle thing I missed for a couple of minutes was that the Configure button at the top of the grid only is enabled when you select the Code Coverage row – and in there is the Code Coverage Detail dialog that lets you select the “artifacts to instrument”.
Looks pretty obvious now huh!
The inaugural meeting of the UK ALM User Group was held on Thursday 11th February at Microsoft’s Cardinal Place offices near Victoria in London.
The session was deliberately left with an open agenda, and after we had made our introductions we shared many anecdotes from our collective experiences with ALM, the discussion on the day mainly focusing around people and process rather than the tools.
As the majority of people in the meeting were practitioners using Microsoft ALM tooling – there was widespread support for bringing in presenters on non-Microsoft ALM tools to ensure that the group kept abreast of the latest developments.
Some of the wider questions about the group included:
– What is the vehicle for the UK ALM User Group message?
– Should the UK ALM User Group have a “voice”?
– How do we spread the word about ALM and ‘make it stick’.
Lessons learned were that we need to prioritise the topics and also timebox them! Hopefully in future sessions this will be easier to achieve.
It was agreed that each member of the group should try and post a session topic to the User Group website (http://ukalmug.ning.com/forum/topics/discussion-topics-for-uk-alm). The most popular session topics will be determined and we can then find presenters for them.
There was also broad support for having the UK ALM User Group more regularly than the initially proposed (quarterly). More details on this will follow soon. If anyone can recommend a bar or other venue in London with presentation facilities then please let me know.
Drinks, socialising and continuation of some of the discussions were then had at a local bar…
Thanks to Microsoft for providing the venue and for the enthusiastic attendees some of whom had travelled from out of London to come to the meeting. Hope to see all of you and more at the next meeting.
Please remember to tag anything related to the user group on twitter with #ukalmug. There is also a list of members on twitter at @ukalmug/members
This post is to announce the UK ALM User Group that I have created. This has been a personal objective of mine for some time and I have decided that now is as good a time as any to actually make it happen!
The UK ALM User Group is for practitioners of Application Lifecycle Management (ALM) and Software Development Lifecycle (SDLC) in the UK to get together and discuss and share ideas, tools and techniques, as well as to socialise somewhere other than Agile and Software Development conferences!
Initially we plan to meet quarterly, the first dates are already lined up for February and May. Membership is free and we have some venues in mind in London to visit to start off with – not to say that if there is enough interest those of us in the south will travel to other UK locations too!
ALM Practitioners and enthusiasts from all technical disciplines are welcome – we’re an agnostic bunch!
To sign up, visit: http://almug.org and join in the discussion – especially welcome are presenters for our first meeting planned for February 11th 2010.
Hope to see some of you there!