We are building a Net Core 2.0 project through Azure Devops. It is taking a long time because it keeps redownloading and installing the Nuget packages, taking 5 minutes.
How do I make it build quickly, (example when I rebuild on local Visual Studio, it does not have to redownloa nugets so building only taking a few seconds). How do I make it retain the Nuget packages in the build?
Current YAML Azure Devops Code:
name: $(Date:yyyyMMdd)$(Rev:.r)
trigger:
- master
pool:
vmImage: 'vs2017-win2016'
variables:
buildConfiguration: 'Debug'
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
configuration: $(buildConfiguration)
projects: "**/*.csproj"