Skip to main content

Posts

Showing posts with the label Visual Studio Team Services

Test Impact Analysis is back!

A loooong time ago in Visual Studio 2010 Microsoft introduced a great new feature Test Impact Analysis. Test Impact Analysis tries to predict based on your code changes which tests should be executed. In more recent versions of Visual Studio this feature disappeared…until now. Version 2 of the Visual Studio Test task reintroduces the “Run only impacted tests” checkbox. Checking this checkbox will automatically configure the Test Impact data collector to identify and run only the impacted tests. Remark: If you don’t see this option, check that you are not still using version 1 of the Visual Studio Test task: More information: https://blogs.msdn.microsoft.com/devops/2017/03/02/accelerated-continuous-testing-with-test-impact-analysis-part-1/

TFS - Maintaining your TFS Build Agents

After some time, your build agents start to eat up more and more disk space on your build server. Before I always cleaned it up manually when I get a warning from our system monitoring tools, but there is actually a better way I wasn’t aware of. It is possible to schedule a Maintenance Job to clean up the _work folder in the agent: Remark: As this has an impact on the availability of your pool it is recommended to limit the max percentage of agents running maintenance(25% by default). Where can you find these setting? Login to your TFS or VSTS portal Open the Administration Section of the portal and go to the Agent Pools section On the Agent Pools page, select a specific pool from the list of available pools On the right choose the Settings tab

VSTS - WIKI

A long listed request finally arrived into VSTS, the introduction of a built-in Wiki. Before you had to fallback to the Wiki extension in the marketplace .  It’s still in preview but offers enough features to start playing with it. Open up your VSTS account and you’ll find the following new menu item: When you click on it, you are welcomed with one button ‘Create Wiki’. Shall we? After clicking on Create Wiki , an editor(with Markdown support) is opened that allows you to create your first Wiki page: Let’s hit Save , specify some comments and there is our first Wiki page on VSTS: Creating a link to another Wiki page is as simple as using a Markdown link, don’t forget to replace spaces by a ‘-‘ in the link URL: What features are coming next ? Our team is working hard to get you the next set of Wiki features, such as… Wiki search across projects Tags Wiki integration with work items Rich editing experience that support: HTML tags ...

TFS Build vNext: Build artifacts are not cleaned up on UNC file share

A while ago, I got a message from one of my customers mentioning that their build servers were running out of disk space. As they had a lot of teams and projects and each of these projects had at least a CI, Nightly and Release build, the number of build artifacts was growing at a large pace. To keep this under control, we reconfigured the build retention policies for all our builds. I removed most of the old CI builds and we were good to go, at least that was what I thought… One week later, they called me again saying that one of the build server was again running out of disk space. I double checked all the retention policies, they all looked OK. However there were 2 things that I noticed: The builds that were consuming all the space were TFS vNext builds using the new task based system. XAML builds didn’t cause any trouble. Although I specified in the Build retention policy to only keep the latest build, I noticed in the drop folder that all previous builds were still ther...

VSTS: Monitor usage

Last week I discovered a new tab inside VSTS; the Usage tab.   The Usage tab shows the request history of the users ordered by usage( based on Team Services Throughput Units  or TSTUs). By default, visiting the Usage page will display requests for the last hour. Another nice feature is that you can review the request history leading up to delayed requests.

Xamarin.Forms: Error CS1703 Multiple assemblies with equivalent identity have been imported

When trying to build our Xamarin.Forms project on a VSTS hosted build server, our build failed first with the following error message: Error CS1703 Multiple assemblies with equivalent identity have been imported: ‘C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll’ and ‘C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll’. Remove one of the duplicate references. On our local system it worked without any compiler errors. We tried the easiest solution first, following the advice as mentioned in the error message. We removed the mscorlib.dll from the references. After doing that, everything was working again. I hate it when the behavior differs between a local Visual Studio Build and the build server

Visual Studio Team Services: Create and use task groups

A feature that was recently added to VSTS are Task groups. Task groups allows you to combine a sequence of build/release tasks into a single reusable task. You can choose to extract the parameters from the encapsulated tasks as configuration variables, and abstract the rest of the task information. The new task group is automatically added to the task catalogue, ready to add to other build/release definitions. To create a task group you need to edit a build/release definition. Select the task you want to group together, right click and choose Create task group . Ensure that all of the tasks you want to include in a task group have their parameters defined as configuration variables   such as $(my-value) , where you want to be able to configure these parameters when you use the task group. If you specify a value (instead of a variable) for a parameter, that value becomes a fixed parameter value of the task group. In the Create task group dialog, enter a name and a descrip...

Visual Studio Team Services Hosted Build Agent–Improve build time of your .NET Core applications

When you are using the Hosted build agents(managed for you by Visual Studio Team Services), the agent tries to cache the packages that you are using inside your .NET core app. This makes sense when you re-use the same build agent for multiple builds. But in the situation where you are using the Hosted build agent, you get an agent assigned from a pool meaning that each time you build a different agent can be used. In that case it makes no sense to spend some extra time caching the packages on the machine. You can disable the caching by setting DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to true on your build machine. This can be done through the variables inside your build definition: A great tip by Donovan Brown to decrease the time to build your .NET Core applications…

Using work item templates in TFS 2015 and VSTS

Last week I heared a colleague that he had to customize the TFS work item templates to prepopulate some fields with default values. I had some good news for him. TFS (and VSTS) has a nice productivity feature; work item templates. With work item templates you can quickly create work items which have pre-populated values for your team's commonly used fields. And that’s exactly what he needed. Here are the steps required to create a work item template: Open the TFS web portal Go to the Work hub and click on the Queries tab Click on New and choose the Work Item type you want to create a template for On the New Work Item form fill in the default values you want the template to contain. Next, If you are using VSTS choose the Copy template URL option from the context menu: If you are using TFS on premise, click on the Copy template URL button: An URL is generated and copied to your clipboard. Here is an example of the...

TFS Build Test Task–How to exclude a set of tests

The Test Task in TFS Build allows you to specify which assemblies should be searched for (unit) tests. By using the Test Filter criteria, you can further filter the set of Tests you want to be executed: Based on the Tooltip you get the impression you can only specify which tests to include based on things like TestName, TestCategory, … But under the hood there is a lot more possible. You can not only include tests(using ‘=’), but also exclude tests(using ‘!=’), execute a contains check (using ‘~’) and group subexpressions (using ‘( <subexpression>)’). Here is a short sample where I exclude all PerformanceTests, include tests with Priority 1 and where the name contains the word ‘UnitTest’:

TFS Build: Failed to activate Xamarin license.

While helping a customer setting up a release pipeline for their Xamarin Mobile applications, I noticed that their CI(Continuous Integration) build was failing for some time. When opening the build results I saw the following error message: “Failed to activate Xamarin license. {"code":-3,"message":"Could not look up activation code."}” The build was failing on the Activate Xamarin license step: The acquisition of Xamarin by Microsoft made this license check obsolete, so just remove it and  you are good to!

Creating a release pipeline for your mobile applications

I’m currently working on a release pipeline for our mobile applications, making it easy to build, deploy and test the mobile solutions we are creating on top of the Xamarin platform. Everyone who ever tried to publish a mobile application to a store(Apple AppStore, Google Play Store, Microsoft App Store,…) knows that it is cumbersome process requiring things like certificates, keystores, a lot of configuration work and so on… To optimize the process we went fully automated by using a combination of the following tools: Visual Studio Team Services Hosted Build Service MacInCloud Xamarin Test Cloud HockeyApp A great help during our journey was the DevOps blog series by Richard Woollcott: Xamarin DevOps VSTS – Getting Started: http://www.thexamarinjournal.com/xamarin-dev-ops-with-vsts-getting-started/ Xamarin DevOps with VSTS - Setup iOS CI Builds With MacinCloud: http://www.thexamarinjournal.com/xamarin-dev-ops-with-vsts-setup-ios-ci-builds-with-macinc...

VSTS - Build and Deployment service blade is empty in the Azure portal

As mentioned in my blog post yesterday , you can buy extra private build slots through the Azure Portal. However when I tried to do this, the Build and Deployment service in the Azure portal refuses to load and remains empty. I got the problem no matter if I try Chrome, IE, Firefox. Anyone with the same problem?

VSTS Build–Private Build slots; you only get one for free!

By default when you are using VSTS(aka Visual Studio Online), you get the following extra services as part of your subscription: Build and Deployment : Use this task-based service to create, queue, and monitor cross-platform builds. Use Hosted Agents that Microsoft runs, or Private Agents that you run so that you can install custom software. Build(XAML)/ Build and Deployment: Create build definitions  and run them in Visual Studio Team Services. Configure builds to run on demand at specific intervals, or for continuous integration (CI). Builds are charged per minute for the actual amount of computing time used to build your project. Cloud-based Load Testing : Create load tests using Visual Studio Ultimate 2013, Visual Studio Enterprise 2015, or later. Run those tests in Visual Studio Team Services. Load tests are measured and billed in virtual user minutes: the number of virtual users multiplied by the number of minutes that you set up for the load test run...

Migrating from TFS Version Control to Git–Follow-up

A few months ago, I blogged about the Git-TF tool and Git-TFS tool I have been using to migrate TFSVC repositories. Last week I noticed a blog post by Richard Fennell from Black Marble where he describes in detail the steps needed to migrate a TFS VC team project to a Git team project. He not only talks about migrating the source code but also about migrating work items, retaining changesets, test plans and suites. He is using the same toolset I have been using but provides a lot more detail. So certainly worth a read… And of course, before I forget, here is the link to the article: https://www.microsoft.com/en-gb/developers/articles/week03aug14/migrating-a-tfs-tfvc-based-team-project-to-a-git-team-project/

VSTS–Live updates on Kanban board

Yesterday I discovered a nice new feature on the VSTS Kanban board, I noticed the addition of a new icon If you click on it, live updates of the board will be activated. Once enabled, everyone in your team, can observe changes made to the board immediatelly. So no need anymore to refresh the screen. It’s great how I keep finding hidden gems that improve our workflow.

Team Foundation Server 2015–Create a new Team Project from the web interface

For a long time, the only way to create a new Team Project in TFS on premise was through Visual Studio. With the introduction of Visual Studio Team Services(VSTS), an option was added to create your Team Project directly from the web interface. Unfortunately this feature was only available in the online version and I couldn’t find the same option on premise… or at least this was what I thought. Recently I discovered the following option inside the web interface(look at the last option at the bottom): Yes! The option is finally available. I have no clue when it was added, but I’m glad it’s there… When you click on it, the New team project window is shown: Note that you cannot create and configure Reporting Services and Sharepoint integration for your team project, if you decide to create your team project through the web interface.

Team Foundation Server 2015: Add Git and TFS Version Control repositories to the same Team Project

With Team Foundation Server 2015 Update 1, Microsoft introduces the option to add Git repositories to your existing team project created with TFVC (or vice versa). This is great if you are using TFSVC today and want to move to Git but you want to keep your work items, build definitions, and other data. How? Open the Team Project web portal inside your favorite browser Go to the Code hub Open the repository selector Click on New repository… Choose the repository type and a name for your repository Click on Create That’s it! Remark 1: You need Visual Studio 2015 Update 1 to see the repository appear inside the Team Explorer view. VS 2015 RTM and previous version only show the repo created with the team project Remark 2: It is possible that you have to configure some security settings to allow access to the new repository type. This will be fixed in Update 2. In the meanwhile you can follow the steps as explained here: https://msdn.mi...

TFS 2015 - Release Manager Workflow Migrator

The ALM rangers never sleep. Now they have created a Release Manager Workflow Migrator: Looking to export a Release Management agent based deployment pipeline so that it can be reused in the Release Management service in Visual Studio Team Services (VSTS)? We have released a migration tool and associated guidance as an open source project, allowing you to use “as is” or contribute to the project. If a Pull Request shows up at the door for the source or documentation, it will definitely be considered. So if you are using Release Manager today and want to switch to the new Release Management service in VSTS, this will be a great help! More information: https://github.com/ALM-Rangers/Migrate-assets-from-RM-server-to-VSTS

Visual Studio Team Services–Code Search extension

With the introduction of the Visual Studio Marketplace, a growing list of great extensions for the Visual Studio ecosystem is coming to us.   The first extension I installed was Code Search , it promises to “provide a fast, flexible and accurate search across your code” inside Visual Studio Team Services. Sounds great! After installing it, when you browse to your Visual Studio Online project(now renamed to Visual Studio Team Services), go to the Code tab and you should see a search box on the top right corner: The search offers a large set of functionality like: Filters: filter by project, by location within a project, by scope, by code type Code collaboration: share search results with other team members Version control integration: lookup history Behind the scenes it is using the power of Roslyn to give you advanced search capabilities. Remark: The code search feature is free at the moment, but this can change after Preview.