My session on TFS at the ‘Building Applications for the Future’
Wed, May 22 2013 16:21

Thanks to everyone who attended my session on ‘TFS for Developers’ at the Grey Matter’s ‘Building Applications for the Future’ event today. As you will have noticed my session was basically slide free, so not much to share there.

As I said at the end of my session to find out more have a look at

Also a couple of people asked by about TFS and Eclipse, which I only mentioned briefly at the end. For more on Team Explorer Everywhere look at the video I did last year on that very subject

by But it works on my PC!
Filed under:
Video on Nuget for C++ on Channel 9
Wed, May 22 2013 16:04

I have been out to a number of sites recently where there are C++ developers. We often get talking about package management and general best practices for shared libraries. The common refrain is ‘I wish we had something like Nuget for C++’.

Well it was released in Nuget 2.5 and there is a video on Channel9 all about it.

by But it works on my PC!
Filed under:
Webinar on PreEmptive Analytics tools on the 28th of May
Mon, May 20 2013 10:47

A key requirement for any DevOps strategy is the reporting on how your solution is behaving in the wild. PreEmptive Analytics™ for Team Foundation Server (TFS) can provide a great insight in this area, and there is a good chance you are already licensed for it as part of MSDN.

So why not have a look on the UK MSDN site for more details the free Microsoft hosted event.

MSDN Webinar Improve Software Quality, User Experience and Developer Productivity with Real Time Analytics
Tuesday, May 28 2013: 4:00 – 5:00 pm (UK Time)

Also why not sign up for Black Marble’s webinar event in June on DevOps process and tools in the Microsoft space.

Why do all my TFS labels appear to be associated with the same changeset?
Thu, May 16 2013 2:41

If you look at the labels tab in the source control history in Visual Studio 2012 you could be confused by the changeset numbers. How can all the labels added by my different builds, done over many days, be associated with the same changeset?

image

If you look at the same view in VS 2010 the problem is not so obvious, but that is basically due to the column not being shown.

image

The answer is that the value shown in the first screen shot is for the root element associated with the label. If you drill into the label you can see all the labelled folders and files with their changeset values when the label was created

image

So it is just that the initial screen is confusing drilling in makes it all clearer.

by But it works on my PC!
Filed under:
A new arrival at Black Marble
Tue, May 14 2013 5:03

Look what the stork delivered!

WP_000521WP_000520

Interested in some tutor delivered training on TFS 2012 in the UK?
Fri, May 10 2013 3:23

Interested in some tutor delivered training on TFS 2012? Well Anthony Borton, the TFS trainer and ALM MVP, is over in the UK running his excellent set of the TFS/VS 2012 focused courses.

  • TFS 2012 Configuration and Administration
    10th – 12th June 2013 | Course Outline
  • Software testing with Visual Studio 2012
    13th- 14th June 2013 | Course Outline
  • TFS 2012 Developer Fundamentals
    17th – 18th June 2013 | Course Outline

Interestingly these courses can be taken in the room with the trainer or via Quicklearn’s Remote Classroom Instruction (RCI), so you can take the course in real time with the other students from the comfort of your own home/desk, but with all the benefits of a tutor classroom environment

If you are interested in these courses and need UK billing get in touch with lisa@blackmarble.co.uk for more details

How healthy is my TFS server?
Wed, May 8 2013 9:31

If you want to know the health of the TFS server there are a number of options from a full System Center MOM pack downwards. A good starting point are the performance reports and administrative report pack produced by Grant Holiday. Though the performance pack is  designed for TFS 2008 they work on 2010 and 2012, but you do need to do a bit of editing.

  1. As the installation notes state, create a new shared data source called “TfsActivityReportDS”
    1. Set the connection string to: Data Source=[your SQL server];Initial Catalog=Tfs_[your TPC name]    -  this is the big change as it this used to point to the tfs_ActivityLogging DB, this (as of TFS 2010) is now all rolled into you Team project Collection DB, so you need to alter the connection string to match your TPC. Also note if you use multiple TPCs you will need multiple data sources and reports.
    2. Credentials: domain\user that has access to the Tfs_[TPC Name] database
    3. Use as windows credentials when connecting to the data source
    4. Once uploaded each report needs to be edited via the web manage option to change it Data Source to match the newly created source

      image
    5. You also need to edit each report in the pack via Report Builder as the SQL queries all contain the full path. For each dataset, (and each report can have a few) you need to edit the query to only contain the table name not the whole SQL path

      i.e. From TfsActivityLogging.dbo.tbl_Command to tbl_Command

      image

Once this is done most of the reports should working and giving a good insight into the performance of your server.

Some reports such as the Source Control Requests and Top user bypassing proxy take a bit more SQL query fiddling.

  • Server Status - Top Users Bypassing Proxies – you need to alter the Users part of the query to something like (note the hard coded table path, i am sure we could do better, but I don’t usually need this report as have few proxies, so not made much effort on it)

    Users(
            ID,
            UserName,
            FullyQualifiedAlias,
            eMail
        ) AS
        (

            SELECT [personSK]
                  ,[Name]
                  ,[Domain] + '\' + [Alias] as FullyQualifiedAlias
                  ,[Email]
              FROM [Tfs_2012_Warehouse].[dbo].[DimPerson] with (nolock)
        )

  • Source Control Requests – runs from a straight web service endpoint, so you need to edit the Url it targets to something like

http://localhost:8080/versioncontrol/v3.0/administration.asmx

Unlike the performance reports the admin report packs is designed for TFS 2010/2012 so it works once you make sure the reports are connected to the correct shared data sources.

However, remember the new web based Admin Tools on TFS 2012 actually address many of these areas out the box.

by But it works on my PC!
Filed under:
Workaround for TF900546: An unexpected error occurred while running the RunTests activity
Wed, May 1 2013 9:01

The problem

I have been working on a project that contains SharePoint 2010 WSP packages and a MSI distributed WPF application. These projects are all in a single solution with their unit tests. I have been getting a problem with our TFS 2012.2 build system, all the projects compile but at the test point I get the unhelpful

TF900546: An unexpected error occurred while running the RunTests activity: 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'.

If I remote onto the build box and loaded the solution in Visual Studio (which was luckily installed on the build box) and tried to run the test in the test explorer I got

image

and the event log showed

Application: vstest.executionengine.x86.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidProgramException
Stack:
   at System.ServiceModel.ServiceHost..ctor(System.Object, System.Uri[])
   at Microsoft.VisualStudio.TestPlatform.TestExecutor.TestExecutorMain.Run(System.String[])
   at Microsoft.VisualStudio.TestPlatform.TestExecutor.ServiceMain.Main(System.String[])

and

Faulting application name: vstest.executionengine.x86.exe, version: 11.0.60315.1, time stamp: 0x5142b4b6
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18015, time stamp: 0x50b83c8a
Exception code: 0xe0434352
Fault offset: 0x0000c41f
Faulting process id: 0x700
Faulting application start time: 0x01ce4663824905bd
Faulting application path: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.x86.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: c2689d15-b256-11e2-80aa-00155d0a5201

Next I tried creating in a simple new test project with one unit test, this failed with the same error.

As all the tests work locally on my development PC it was all pointing to a corrupted installed of Visual Studio (and/or the components installed as part of TFS build) on the build box. It should be noted that this was a build box with a good number of additional packages installed to support SharePoint, so patching order could be an issue.

The workaround

Robert, another of our ALM consultants, said he had seen a similar problem at client and suggested changing the test runner.

So in the build definition > process > Basic > Automated Tests > I edited the test run settings and changed to the MSTest VS2010 runner from the default.

image

Once this was done my tests then ran. However I then got a publishing error

API restriction: The assembly 'file:///C:\Builds\2\BM\CTAppBox.Main.CI\Binaries\_PublishedWebsites\WebServiceTestClient\bin\WebServiceTestClient.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.

The problem was the build was set to the default test search criteria of *test*. This meant it picked a project it should not have, due to a poor naming convention. As soon as I changed the filter to *.tests all was OK.

I did retry the VS2012 test runner after fixing this naming issue, it had no effect.

I know I need to sort (rebuild) this build box, but now is not the time, I have a working solution that will do for now

Follow the Yorkshire Global Windows Azure Event
Sat, Apr 27 2013 4:48

Today Black Marble is hosting the Yorkshire Global Windows Azure Bootcamp event.

To see what is happening check out the photos on our Facebook gallery and the #GlobalWindowsAzure Twitter hashtag

Global Azure Bootcamp Logoimage

Thanks for attending my webinar on lab management
Tue, Apr 23 2013 5:58

Thanks to everyone who attended my webinar session today in TFS Lab Management, I hope the audio issues were not too much of a problem and you found the session useful. We are looking into the causes of the audio problem so hopefully the next webinar will not need people dialling in via the phone unless they want to.

A number of people asked for the slides, you can find a copy of them here.

As I mentioned in the session if you want a look at Lab Management you can have a go yourself using the HOL in Brian Keller’s TFS 2012 VM. Or watch the video I did at Techday 2010, an end to end demo of Lab Management.

I also mentioned a couple of Microsoft case studies that might be of interest

Lab Management webinar next week
Thu, Apr 18 2013 10:53

If you are interested finding out more about TFS Lab Management why not come to the Black Marble Bite size webinar next Tuesday (23rd April). I will be giving a basic overview of the product and discussing some of our experiences implementing it.

Our upgrade to TFS 2012.2 has worked OK
Thu, Apr 18 2013 8:57

I have mentioned in past posts the issues we had doing our first quarterly update for TFS 2012. Well today we had scheduled our upgrade to 2012.2 and I am please to say it all seems to have worked.

Unlike the last upgrade, this time we were doing nothing complex such as moving DB tier SQL instances; so it was a straight upgrade of a dual tier TFS 2012.1 instance with the DB being stored on a SQL2012 Availability Group (in previous updates you had to remove the DBs from the availability group for the update, with update 2 this is no longer required).

So we ran the EXE, all the files were copied on OK. So when we got to the verify stage of the wizard we had expected no issues, but the tool reported problems with the servers HTTPS Url. A quick check showed the issue was the server had the TFS ODATA service bound to HTTP on port 433, but using a different IP address to that used by TFS itself. As soon as this web site was stopped the wizard passed verification and the upgrade proceeded without an errors.

So it would seem that the verification does a rather basic check to see if port 443 is used on any IP address on the server, not just the ones being used TFS as identified via either IP address or host header bindings.

The only other thing we have had to do is upgrade Tiago’s Team Foundation Task Board Enhancer, without the upgrade the previous version of this extension did not work.

So not too bad an experience.

Great event in Antwerp
Thu, Apr 18 2013 6:46

I had a great time yesterday at the VISUG Conference in Antwerp, thanks to everyone involved in event.

image

The ALM track organiser Pieter and all the speakers, myself, Martin and Neno, were really pleased to see how full our room was all day. There certainly seems to be more interest in ALM than ever before.

If you want to find out more on areas of TFS I was talking on i.e connecting from environments other than Visual Studio, why not look at a very similar session I recorded last year, it can be found on Channel9.

by But it works on my PC!
Filed under:
Error TF400129: Verifying that the team project collection has space for new system fields when upgrading TFS to 2012.2
Thu, Apr 11 2013 9:02

Whist testing an upgrade of TFS 2010 to TFS 2012.2 I was getting a number of verification errors in the TFS configuration upgrade wizard. They were all TF400129 based such as

TF400129: Verifying that the team project collection has space for new system fields

but also mention models and schema.

A quick search threw up this thread on the subject, but on checking the DB tables I could see my problem was all together more basic. The thread talked of TPCs in incorrect states. In my case I had been provided with an empty DB, so TFS could find not tables at all. So I suppose the error message was a bit too specific, should have been ‘DB is empty!!!!’ error. Once I got a valid file backup restored for the TPC in question all was ok.

A bit more digging showed that I could also see an error if I issued the command

tfsconfig remapdbs /sqlinstances:TFS1 /databaseName:TFS1;Tfs_Configuration

As this too reported it could not find a DB it was expecting.

So the tip is make sure you really have the Dbs restored you think you have.

Lab Management with SCVMM 2012 and /labenvironmentplacementpolicy:aggressive
Tue, Mar 26 2013 6:05

I did a post a year or so ago about setting up TFS Labs and mentioned command

C:\Program Files\Microsoft Team Foundation Server 2010\Tools>tfsconfig lab /hostgroup /collectionName:myTpc  ​/labenvironmentplacementpolicy:aggressive /edit /Name:"My hosts group"

This can be used tell TFS Lab Management to place VMs using any memory that is assigned stopped environments. This allowed a degree of over commitment of resources.

As I discovered today this command only works for SCVMM 2010 based system. if you try it you just get a message saying not support on SCVMM 2012. There appears to be no equivalent for 2012.

However you can use features such as dynamic memory with in SCVMM 2012 so all is not lost

Kerbal Space Program - Its educational and written in Mono too!
Sun, Mar 24 2013 6:35

image

My son is really taken with Kerbal Space Program. This great games allows you to design your own  space craft and so run your own on-going space program, all with a realistic physics engine.

What is particularly nice is that this cross platform Mono based application is being built in a very agile manner with a new release most weeks, each adding features as well as bug fixes. There also seems to be an active community of people building plug-ins for extra space craft components and rovers.

I am not sure how much orbital mechanics will appear in his school exams this year, but it is certainly educational in the longer term.

TF900548 when using my Typemock 2012 TFS custom build activity
Sat, Mar 23 2013 16:52

Using the Typemock TFS 2012 Build activity I created I had started seen the error

TF900548: An error occurred publishing the Visual Studio test results. Details: 'The following id must have a positive value: testRunId.'

I thought it might be down to having patched our build boxes to TFS 2012 Update 1, maybe it needed to be rebuild due to some dependency? However, on trying the build activity on my development TFS server I found it ran fine.

I made sure I had the same custom assemblies and Typemock autorun folder and build definition on both systems, I did, so it was not that.

Next I tried running the build but targeting an agent on on the same VM as the build controller. This worked, so it seems I have a build controller issues. So I ran Windows update to make sure the OS was patched it to date, it applied a few patches and rebooted. And all was OK my test ran gain.

It does seem that for many build issues the standard switch it off and back on again does the job

Black Marble is hosting the Yorkshire Chapter of the Global Windows Azure Bootcamp on the 27th of April
Thu, Mar 21 2013 7:45

Black Marble is hosting the Yorkshire Chapter of the Global Windows Azure Bootcamp taking place in several locations globally on the April 27th, 2013. This free community organised event is one day deep dive class where you will get you up to speed on developing for Windows Azure. The class includes a trainer with deep real world experience with Windows Azure, as well as a series of labs so you can practice what you just learned.

Black Marble’s event will be run by Robert Hogg (Microsoft Integration MVP) and Steve Spencer (Windows Azure MVP). Come along and join the global Azure event of the year!

Check out the prerequisites you need to install on your PC and here to sign up

Global Azure Bootcamp Logo

Installing a DB from a DACPAC using Powershell as part of TFS Lab Management deployment
Thu, Mar 14 2013 11:45

I have been battling setting up a DB deployed via the SQL 2012 DAC tools and Powershell.  My environment was a network isolated pair of machines

  • DC – the domain controller and SQL 2012 server
  • IIS – A web front end

As this is network isolated I could only run scripts on the IIS server, so my DB deploy needed to be remote. So the script I ended up with was

param(
    [string]$sqlserver = $( throw "Missing: parameter sqlserver"),
    [string]$dacpac = $( throw "Missing: parameter dacpac"),
    [string]$dbname = $( throw "Missing: parameter dbname") )

Write-Host "Deploying the DB with the following settings"
Write-Host "sqlserver:   $sqlserver"
Write-Host "dacpac: $dacpac"
Write-Host "dbname: $dbname"


# load in DAC DLL (requires config file to support .NET 4.0)
# change file location for a 32-bit OS
add-type -path "C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\Microsoft.SqlServer.Dac.dll"

# make DacServices object, needs a connection string
$d = new-object Microsoft.SqlServer.Dac.DacServices "server=$sqlserver"

# register events, if you want 'em
register-objectevent -in $d -eventname Message -source "msg" -action { out-host -in $Event.SourceArgs[1].Message.Message } | Out-Null

# Load dacpac from file & deploy to database named pubsnew
$dp = [Microsoft.SqlServer.Dac.DacPackage]::Load($dacpac)
$d.Deploy($dp, $dbname, $true) # the true is to allow an upgrade, could be parameterised, also can add further deploy params

# clean up event
unregister-event -source "msg"

Remember the SQL 2012 DAC tools only work with PowerShell 3.0 as they have a .NET 4 dependency.

This was called within the Lab Build using the command line

image

cmd /c powershell $(BuildLocation)\SQLDeploy.ps1 dc $(BuildLocation)\Database.dacpac sabs

All my scripts worked correctly locally when I ran it on the command line, they were also starting from within the build, but failing with errors along the lines of

Deployment Task Logs for Machine: IIS
Accessing the following location using the lab service account: blackmarble\tfslab, \\store\drops.
Deploying the DB with the following settings
sqlserver:   dc
dacpac:
\\store\drops\Main.CI\Main.CI_20130314.2\Debug\Database.dacpac
dbname: Database1
Initializing deployment (Start)
Exception calling "Deploy" with "3" argument(s): "Could not deploy package."
Initializing deployment (Failed)
At
\\store\drops\Main.CI\Main.CI_20130314.2\Debug\SQLDeploy.ps1:26
char:2
+  $d.Deploy($dp, $dbname, $true) # the true is to allow an upgrade
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DacServicesException
Stopped accessing the following location using the lab service account: blackmarble\tfslab, \\store\drops.

Though not obvious from the error message the issue was who the script was running as. The TFS agent runs as a machine account, this had no rights to access the SQL on the DC. Once I granted the computer account IIS$ suitable rights to the SQL box all was OK. The alternative would have been to enable mixed mode authentication and user a connection string in the form 

“server=dc;User ID=sa;Password=mypassword”

So now I can deploy my DB on a new build.

You don’t half get strange errors when two servers have the same SID
Tue, Mar 12 2013 12:30

You don’t half get strange errors when building a test environment if when you run SYSPREP’d each copy of your VM base image you forget to check the ‘generalize’ box

image

If you forget this, as I did, each VM has a different name but the same SID. Basically the domain/AD is completely confused as who is what. The commonest error I saw was that I could not setup application (Report Services, SP 2010 and TFS 2012) with domain service accounts. I all cases I got messages about missing rights or cannot communicate with domain controller.

The fix was to basically start again. I re-SDYSPREP’d one of the pair of boxes I had to it reset it’s SID, I stripped off what I was trying to install, re added it to the domain and installed applications again. Once this was done all was fine.

For more on SID and SYSPREP see Mark Russinovick’s blog

More Posts Next page »