@@ -34,29 +34,24 @@ jobs:
34
34
inputs :
35
35
packageType : sdk
36
36
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)
42
39
43
40
- 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
47
43
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)
48
46
49
47
- script : ${{ parameters.sourceIndexBuildCommand }}
50
48
displayName : Build Repository
51
49
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
53
51
displayName : Process Binlog into indexable sln
54
- env :
55
- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX : 2
56
52
57
53
- ${{ 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)
59
55
displayName : Upload stage1 artifacts to source index
60
56
env :
61
57
BLOB_CONTAINER_URL : $(source-dot-net-stage1-blob-container-url)
62
- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX : 2
0 commit comments