Much of the pain around including references to TFS assemblies and other dependencies can be removed by using NuGet to set up the assemblies. The only gotcha I found was that if you are importing a VS project whose target framework is say 4.0, then the NuGet execution fails.
In those cases, target say 4.6 and things will be fine.
Using the NuGet rather than adding references by hand does create an enormous amount of bloat, as the NuGet package picks up anything that MIGHT be needed as a dependency, and sticks it under References.
So working through the example screenshots below, the flow shows (credit here btw for the source Solution):
- The build fails because the References cannot be found
- We do an initial NuGet execution, which also fails
- We then move from the 4.0 target to 4.6
- Redo the NuGet import
- Rebuild – compile succeeds
Just dumping notes tonight, as just need to get things recorded and move on.
Install-Package Microsoft.TeamFoundationServer.ExtendedClient -Version 15.112.1
As a starting point for walking through TFS objects, I took this code , changed it a bit, giving this:
The references required are these:
The location of those DLLs is here (for me – I am btw using the VS2017 Enterprise preview (October 2017):
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
Running that gives something like this:
At work, I want to get ahead on using the TFS API to drag data out of the MTM/TFS repository especially around test related queries, e.g. for a given test case id, tell me what test suites that appeared in: that is actually impossible for MTM/TFS (2012) to do out of the box. However the TFS API is very capable. All my POC/sandbox work is done at home. But TFS is not something that you just install… or so I thought. In fact there is a perfectly adequate TFS 2013 Express which you can use for development, and run the server on your own box (I have a number of Visual Studio Online web sites, but as Work does not have VSO, that fact is useless for this exercise).
In about 1.5 hours I managed to get a working TFS, with me and Jan as administrators (she will never know 🙂 ), a Feature, a Story, and some dummy test cases attached. Although any chronological sequence in the screenshots below is dependent on how WordPress loads them, they anyway give a pretty full story of how I got to that point. There is no reference to MTM because at this point I don’t need its artefacts – the test executions can wait. So this is just the raw material right now. And just looking at the top photos, yes the sorting seems to be entirely name-based at first glance. Another day I’ll get PowerShell to do a time-based renaming. For now…