Friday, September 16, 2016

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:

image

A great tip by Donovan Brown to decrease the time to build your .NET Core applications…

No comments: