@@ -34,29 +34,24 @@ jobs:
3434 inputs :
3535 packageType : sdk
3636 version : 3.1.x
37-
38- - task : UseDotNet@2
39- displayName : Use .NET Core sdk
40- inputs :
41- useGlobalJson : true
37+ installationPath : $(Agent.TempDirectory)/dotnet
38+ workingDirectory : $(Agent.TempDirectory)
4239
4340 - script : |
44- dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
45- dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
46- echo ##vso[task.prependpath]$(Build.SourcesDirectory)/.source-index/tools
41+ $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
42+ $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
4743 displayName: Download Tools
44+ # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
45+ workingDirectory: $(Agent.TempDirectory)
4846
4947 - script : ${{ parameters.sourceIndexBuildCommand }}
5048 displayName : Build Repository
5149
52- - script : BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
50+ - script : $(Agent.TempDirectory)/.source-index/tools/ BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
5351 displayName : Process Binlog into indexable sln
54- env :
55- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX : 2
5652
5753 - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
58- - script : UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
54+ - script : $(Agent.TempDirectory)/.source-index/tools/ UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
5955 displayName : Upload stage1 artifacts to source index
6056 env :
6157 BLOB_CONTAINER_URL : $(source-dot-net-stage1-blob-container-url)
62- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX : 2
0 commit comments