In the middle of the TFS upgrade, it fails with the error message:
Caught exception in ExecuteScripts: Microsoft.TeamFoundation.Framework.Server.DatabaseConnectionException: TF246017: Team Foundation Server could not connect to the database. Verify that the instance is specified correctly, that the server that is hosting the database is operational, and that network problems are not blocking communication with the server. —> System.Data.SqlClient.SqlException: Cannot open database "Tfs_DefaultCollection" requested by the login. The login failed.
[12:44:29.207] Login failed for user ‘SERVERTOGO\TFSSERVICE’.
While this error message can have multiple causes (invalid credentials, SQL Server not available/not started, etc.), it was strange that it failed during the upgrade process (which means many steps were already successfully executed against that SQL Server instance).
The Windows Event Log is a good candidate where to look for the potential cause. In this case, SQL Server told me that it stopped a transaction, because the transaction log was full.
Increasing the maximum size of the Transaction Log (in SQL Management Studio) resolved the issue.
The Process Template Editor that you can use to export/import work item types of existing team projects as well as modify or create your own process templates, is a separate download and made available as part of the TFS 2015 Power Tools.
As the Process Template Editor is a plug-in to Visual Studio, you need at least a Visual Studio Express Edition (all higher Editions are equally good) installed.
Figure: Process Template Editor running in VS Express for Windows Desktop.
Tags:Process Template Editor
When trying to build an Xamarin iOS solution with TFS Build, you get the following errors/warnings:
/Library/Frameworks/Mono.framework/Versions/4.2.3/lib/mono/4.5/Microsoft.Common.targets: warning : Project reference ‘../HelloWorldApp/HelloWorldApp.csproj’ could not be resolved.
AppDelegate.cs(26,33): error CS0246: The type or namespace name `App’ could not be found. Are you missing an assembly reference?
How to fix this:
Remove references to the project that could not get resolved (in the example above, it’s a portable class library HelloWorldApp.csproj) and put them back in (as project reference).
(Big thanks goes out to the guys at MacInCloud.com for making me aware of the forum post that contained this useful solution, which fixed it for me.)
Answer: Users need the “Edit project-level information” permission to rename a team project.
By default the Project Administrators group has that permission.
It’s documented here: https://msdn.microsoft.com/en-us/Library/vs/alm/Overview/rename-team-project
(Special thanks to Rogan Ferguson and Kathryn Elliott from Microsoft for helping me with this answer.)
Answer: You can find a good description of the various expressions that you can use for the “Test Filter criteria” parameter at: http://i1.blogs.msdn.com/b/visualstudioalm/archive/2012/09/26/running-selective-unit-tests-in-vs-2012-using-testcasefilter.aspx
Answer: On the “Run Functional Tests” task, you can specify a .testsettings file in the “Run Settings File” parameter.
You can create .testsettings files in Visual Studio, which pops up a wizard to guide you through the settings, or you can read more about .testsettings files at: https://msdn.microsoft.com/en-us/library/ee256991.aspx
Answer: As you have no influence as to what software gets installed on the Hosted Agent that is provided as part of VS Team Services, it’s important to know what is currently installed.
TFS-MVP colleague Tarun runs a website, where you can see the currently installed software and which gets updated regularly: http://listofsoftwareontfshostedbuildserver.azurewebsites.net/
Hint: There’s also a VS Extension available to see the list of installed software right from Visual Studio: https://visualstudiogallery.msdn.microsoft.com/591f2516-9aec-4892-be08-53c1d63bc5a1
You are receiving one of the following compiler errors:
The type ‘Microsoft.TeamFoundation.Framework.Client.ILocationService’ cannot be used as type parameter ‘TService’ in the generic type or method ‘VssRequestContextExtensions.GetService<TService>(IVssRequestContext)’. There is no implicit reference conversion from ‘Microsoft.TeamFoundation.Framework.Client.ILocationService’ to ‘Microsoft.TeamFoundation.Framework.Server.IVssFrameworkService’.
‘ILocationService’ does not contain a definition for ‘GetSelfReferenceUri’ and no extension method ‘GetSelfReferenceUri’ accepting a first argument of type ‘ILocationService’ could be found (are you missing a using directive or an assembly reference?)
‘ILocationService’ does not contain a definition for ‘GetServerAccessMapping’ and no extension method ‘GetServerAccessMapping’ accepting a first argument of type ‘ILocationService’ could be found (are you missing a using directive or an assembly reference?)
ILocationService exists in two namespaces. Make sure you use Microsoft.VisualStudio.Services.Location.Server.ILocationService (from Microsoft.TeamFoundation.Framework.Server.dll).
Answer: If you are already authenticated against the “classic” TFS Object Model from the Microsoft.TeamFoundationServer.ExtendedClient NuGet Package (typically having an instance of TfsTeamProjectCollection), you can use its GetClient<T> generic method to aquire an *HttpClient class from the REST API.
TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri(collectionUri)))
TfvcHttpClient tfvcClient = tpc.GetClient<TfvcHttpClient>();
See also “Example 3” at: https://www.visualstudio.com/en-us/integrate/get-started/client-libraries/samples