Skip to main content

Posts

Showing posts with the label TFS 2013

Azure Pipelines–Consolidate all build output in one folder

Today I was working at a customer who was still using Team Foundation Server 2013(!) and the XAML build feature. We are helping them to move away (finally) from this very old version and bring them to Azure DevOps Server 2022. The migration itself went quite smoothly. We had to do an upgrade first to TFS 2015 but from there we could directly upgrade to Azure DevOps Server 2022. Great work from the team at Microsoft that created the Upgrade Wizard. I can only imagine what a challenge it was to create an upgrade process that works for so many versions. That being said it was not yet the end of our journey because we also had to reverse engineer and migrate all XAML builds to the new task based Azure Pipelines. We decided to first migrate the builds ‘as-is’. One (small?) difference between the XAML builds and the new build system is that the XAML build puts the build output for all projects in the same folder. How can we mimic this behavior using the newer build system? The first ...

Team Foundation Server: How to migrate TFS Version Control project by project–Part 2

If you want to migrate a full TFS collection, support is built-in. But what if you want to migrate a specific project but want to keep the source code history? I blogged about a solution I used before by using Git as a way to move code between 2 TFS Version Control repositories. (Here is the link in case you cannot find it: http://bartwullems.blogspot.be/2015/05/team-foundation-server-how-to-migrate.html ). I used this approach multiple teams with great success. However some people who tried to do the same thing complained that the approach I described didn’t work when you have multiple branches. So time to solve this and add the misssing steps required to migratie multiple branches: Extract the old TFS project including all branches with the git-tfs tool : git-tfs clone --with-branches http://oldtfs:8080/tfs/DefaultCollection $/BranchingDemo/Main Open the .config file inside the .git folder and add a new remote:  [core] repositoryformatversion =...

TFS 2013 XAML Builds: BuildDetail variable no longer available

After upgrading a customer from TFS 2012 to TFS 2013, we couldn’t access the BuildDetail property anymore inside our XAML build process template. Instead we got the following error message: Error 102 Compiler error(s) encountered processing expression "BuildDetail.DropLocation". 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. This is a breaking change when upgrading from TFS 2012 to TFS 2013. Luckily it is not hard to solve: Open your XAML build process template Add a Variable on the Variables tab Choose IBuildDetail as type Name it BuildDetail Drag a GetBuildDetail activity inside your workflow Set the Result property to the BuildDetail variable Now you can access the same information as before…

TFS 2015–Visual Studio Test Runner

After upgrading a XAML build template to TFS 2015, some of our unit tests started to fail. I had no idea what was causing the issue, so I tried to enable any kind of logging I could. I knew that behind the scenes the Build agent was calling the vstest.console.exe, but no matter what I tried I noticed that I couldn’t find the exact parameters that were used to call this test runner . I’m not the only one who had this problem, as an issue had already been raised on Uservoice, http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6073220-diagnostics-logs-should-show-the-vstest-console-co . Remark: Maybe another good reason to upgrade to the new Build system in TFS 2015, as the Visual Studio Test step nicely logs the exact parameters.

TFS Local Workspaces error -TF400030: The local data store is currently in use by another operation.

On a large Visual Studio project I started getting the following error message: TF400030: The local data store is currently in use by another operation. This project is using the local workspace feature of TFS, which has a lot of advantages, but has it own set of problems when your solution gets quite large(think 50.000 items or more). I tried multiple solutions to solve the issue: One possible solution is to delete the local workspace and recreate it again. This will clear the local version table, and allows you to start over with a clean slate. We noticed a small performance improvement after doing this. An alternative could be to evaluate your current workspace and see if some server side folders should not be mapped. This can help decrease the size of your workspace. Another option you have is to change back from a local workspace to a server workspace. As mentioned before, this option is useful only when your workspace contains a lot of items. In that case s...

Visual Studio and Team Foundation Server : Fix bindings in solution file

For some time, I had an error when opening a specific Visual Studio solution. After a problematic merge operation, the Team Foundation Server Source Control binding information inside my solution file didn’t match with the projects I had in my solution. If I opened up the sln file, I could find the following section: Global     GlobalSection(TeamFoundationVersionControl) = preSolution         SccNumberOfProjects = 92         SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}         SccTeamFoundationServer = http://mytfsserver:8080/tfs/defaultcollection         SccLocalPath0 = . The number of projects(92) was complete wrong. Visual Studio told me there should be 68 projects:   I found an easy solution to fix this: Close the solution in Visual Studio Check...

Team Foundation Server–Print the list of active TFS users

Today I got a request to print the list of active TFS users. I first tried to get this information through the Team Foundation Sidekicks , but unfortunately I didn’t found an easy way to extract the list of users from this otherwise great tool. In the end I used a different approach: Open SQL Server Management Studio Connect to your TFS Database instance Execute the following query for every collection database:

Team Foundation Server: How to migrate TFS Version Control project by project

One of the customers I work for is making the move to Team Foundation Server. For the project I’m working on, we used a temporal TFS project hosted at my employer(Ordina). Unfortunately there wasn’t an easy migration path to move the source code from the Ordina TFS to the TFS at the customer location. Why? Because we are using SQL Server 2014 and the customer has standardized on SQL Server 2012. And this is an unsupported migration path. Luckily, I found a workaround to not lose any history. In short, what I do is export all the source code in TFS Version Control(TFVC) from my company’s TFS to a Git Repo. Afterwards I import the code from Git  into the TFSVC from the customer. Interested in the specific steps? Here are all the details: Prerequisites I used a combination of 2 tools that support integration between TFS and Git. (Why 2 tools? Because I had some issues when I tried to accomplish the process with only one of the tools.) Git-TF The official tool c...

Team Foundation Server: Error creating a new team project

A customer reported me the following issue when they tried to create a new TFS project: brary!ReportServer_0-43!fbc!03/30/2015-08:44:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.; library!ReportServer_0-43!fbc!03/30/2015-08:44:26:: e ERROR: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)    at System...

Tackling Technical Debt with SonarQube and Team Foundation Server

Great news! Just before all the big announcements at Build, the Microsoft  ALM team announces the availability of a set of integration components that allow you to configure a Team Foundation Server (TFS) Build to connect to SonarQube. SonarQube is an open source platform that is the de facto solution for understanding and managing technical debt. Although SonarQube had a C# plugin before, with the new set of components it becomes really easy to share the following data: results of .Net and JavaScript code analysis code clone analysis code coverage data from tests metrics for .Net and JavaScript In addition, SonarSource have produced a set of .Net rules, written using the new Roslyn-based code analysis framework, and published them in two forms: a nuget package and a VSIX . This makes it possible to run the same set of rules in SonarQube AND directly in Visual Studio. More information: http://blogs.msdn.com/b/visualstudioalm/archive/2015/04/28/technical-d...

Git-tf–Save your credentials

At the moment I’m working on a hybrid source control project where I combine GIT for local development and Team Foundation Server Version Control as a centralized repository. To simplify the process, I’m using Git-TF : Git-TF is a set of cross-platform, command line tools that facilitate sharing of changes between Microsoft Team Foundation Server, Visual Studio Online and Git. These tools make it easy to clone sources from TFS, fetch updates from TFS, and update TFS with changes committed locally in Git. One of the things I found annoying was that I had to specify my username and password each time the tool tries to connect to TFS. To fix this, you can store your username and password in the git configuration for your repository: git config git-tf.server.username your-username git config git-tf.server.password your-password Remark: This will store your password in the git configuration file in plain text. So don’t tell a security expert

Excel Team Explorer Add-in: HTTP code 407: Proxy Authentication Required

Did you ever had the following error when you tried to connect to Team Foundation Server(TFS) use the Team Explorer add-in in Excel? HTTP code 407: Proxy Authentication Required When you see this error, most of the time, it’s caused by the fact that your organization is using a proxy. The proxy credentials are not properly passed through the Excel add-in and you end up with the error above. I had the same problem when connecting to TFS from Visual Studio. There I solved it by updating the devenv.exe.config with the following section: But Excel doesn’t have a config file, so I was thinking I couldn’t use the same solution. I was wrong, what you can do is create a new Excel.exe.config file, put the same information in as above and place it on the same location as Excel.exe. This solved the problem for me…

TFS Build Definition–Loading process template takes forever

While preparing a demo for a session I give later this week, I stumbled over the following problem: I created a Build Definition for a build controller in TFS Online. When I try to edit the build definition(Right click –> Edit Build Definition…) and go to the Process tab, the only thing that shows is a ‘Preparing build definition environment’ message and an endless spinning wheel… I found the issue on Connect but it was closed as ‘Not reproducable’ . Anyone with a solution? Update: The workaround mentioned on the Connect site; repairing Visual Studio; solved the problem for me. 

LabManager VMM Server Background Synchronization Job Failing

The Team Foundation Server logs of a client was filling up with errors about a failing job: LabManager VMM Server Background Synchronization . This runs every few minutes and tries to keep the LabManager server up to date.   The reason why this job fails on our system is because the Lab Management functionality is no longer in use. We used it when we were still on Team Foundation Server 2012. But when we moved to Team Foundation Server 2013, we didn’t upgrade the Lab Management part as well. So the Lab Management parts were gone and we didn’t de-register it first. I wanted to get rid of these errors and decided to look for a solution. First thing I tried was using the tfsconfig command and ask TFS to delete the lab management part: tfsconfig lab /delete /collectionName:<collectionname> But this failed with a TF255384 error complaining that the Virtual Machine Manager Administration Console could not be found on the application server. I didn’t want to instal...

TypeScript build server error: "tsc.exe" exited with code 1.

After configuring a Continuous Integration build for a TypeScript enabled web application, the build turned red with the following error message: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript\Microsoft.TypeScript.targets (118): "tsc.exe" exited with code 1. On the build server I had installed the TypeScript components for Visual Studio 2013 , but for this particular project we were still using Visual Studio 2012. I was able to fix the problem by installing the TypeScript 1.0 Tools for Visual Studio 2012 on the build server.

Team Foundation Best Practices Analyzer - "%TFSServerURLValidated% error

When running the Team Foundation Best Practices Analyzer , it failed immediately with the following message: Cannot validate the URL provided The scan was generated using the corrected URL "%TFSServerURLValidated%". I never seen this issue before. On the Internet I found some related blog posts here and here . But in my case the solution was a lot simpler: I ran the tool again with the ‘Run as Administrator’ option. This time everything was working as expected.

TFS Performance Tips

Last week I noticed the following blog post by Cory House; Two Quick TFS Performance Tips . It’s a small post, but one with great value… In his post, he shares one of the greatest performance tips ever about TFS; create a separate workspace for each Team Project . How many times I heard a developer complain that TFS was slow and cumbersome to use… And when I took a look at his Visual Studio solution I had to discover that his 5 years of developer work was all sitting in the same workspace. Ugh…

TF400917: The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration

While upgrading a Team Foundation Server instance to the latest bits, I ended up with the following error ( again ): TF400917 : The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration. This time the issue was not related to some missing work item states, but to an invalid configuration of one of the Add panels. The Add panel allows you to quickly add new work items in the web access: In our case the Add Panel was customized to show some extra fields and these fields were no longer available after the TFS upgrade. To fix it, I exported the process configuration file using witadmin exportprocessconfig and removed the invalid field from the AddPanel configuration: Afterwards I imported the process configuration again using witadmin importprocessconfig. This article brought me to the solution: http://www.codeproject.com/Articles/739438/TF-The-current-configuration-is-not-valid-for-this .

Team Foundation Server: Change profile picture

In Team Foundation Server, you can set a picture for your user profile. This picture is shown at different locations inside the TFS Web Access. As long as you don’t set a picture, you only get a boring icon. For example the Team members overview looks like this on the Overview page of your TFS project: Let’s change this! Navigate to the Web Access url of the Team project that has the User Profiles you want to set. Navigate to the Administration page by clicking on the Wheel icon in the upper right corner. Click on the Security tab Select Users from the left panel Select the User Profile you want to edit. Click on the image on the top right hand corner to edit the image. In the Profile Image dialog, upload your image and Save Changes . That’s it! If we now look at the Team Members again, you’ll see: Remark: This change will be applied to all your Team projects. Another way to ...

Team Foundation Server Git–Where are my branches?

As you probably already know, Team Foundation Server offers 2 options to store your source code; either through the ‘classic’ Team Foundation Server Version Control or through Git. I really like Git and the powerful features it offers, so if I have the choice I use Git as my preferred source control system. For a project I’m working on I created a git repo with 2 branches on my Windows 8 development machine and pushed this repo to the origin TFS Git repo. I also have another PC where I still run Windows 7. So when I had to make a small change while I was using my Windows 7 machine so I cloned the TFS Git repo. However when I opened up the solution in Visual Studio and wanted to switch between branches I only had one branch available! Where is my other branch and how can I switch to it? What I didn’t know is that when you do a clone in git, only one branch is created(generally master). To create a local branch for a branch that is not yet available on your machine, you’ll have t...