Skip to content

Commit 17dcdfd

Browse files
committed
Prefer modern UseDotNet task over obsolete DotNetCoreInstaller
The `UseDotNet` task is newer and follows best practices from the dotnet SDK team better than the older `DotNetCoreInstaller` task. One significant difference between the two is that `UseDotNet` sets `DOTNET_MULTILEVEL_LOOKUP=0`, such that once you use this task once, you have to manually install *all* SDK/runtime versions that your pipeline requires. This task *may* be used more than once in order to accomplish this. This is actually a *good* thing, because it means your pipeline is more fully self-describing, and less dependent on whatever versions the agents happen to have installed at the time.
1 parent 02708bb commit 17dcdfd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
steps:
2-
- task: DotNetCoreInstaller@0
2+
- task: UseDotNet@2
33
inputs:
4-
version: '2.2.300'
5-
displayName: 'Install .NET Core SDK'
4+
version: 2.2.300
5+
displayName: Install .NET Core SDK
6+
67
- script: dotnet msbuild build.proj /p:Configuration=$(buildConfiguration)
78
displayName: 'Run Build'

0 commit comments

Comments
 (0)