Skip to content

Commit c4c5943

Browse files
authored
Use DotNetCoreCLI@2 for Nuget Restore to avoid 120 second timeout, and add RuntimeIdentifiers="" to avoid needing packages not in our feed (#3211)
## Why make this change? Closes #3210 Closes #3212 ## What is this change? We replace the `NuGetCommand@2` task with `DotNetCoreCLI@2 ` to avoid the hard coded 120 second timeout in the former which is causing pipeline failures. We add `restoreArguments: '/p:RuntimeIdentifiers=""'` to the pipelines for build and test. Since these pipelines only build and test (no publish), runtime packs aren't needed. The argument overrides `RuntimeIdentifiers` to empty during restore, skipping those downloads. ## How was this tested? Pipeline ran.
1 parent 0bc68fd commit c4c5943

5 files changed

Lines changed: 13 additions & 4 deletions

File tree

.pipelines/cosmos-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ steps:
6969
projects: '$(solution)'
7070
feedsToUse: config
7171
nugetConfigPath: Nuget.config
72+
restoreArguments: '/p:RuntimeIdentifiers=""'
7273

7374
- task: DotNetCoreCLI@2
7475
displayName: Build

.pipelines/dwsql-pipelines.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
projects: '$(solution)'
6262
feedsToUse: config
6363
nugetConfigPath: Nuget.config
64+
restoreArguments: '/p:RuntimeIdentifiers=""'
6465

6566
- task: Bash@3
6667
displayName: 'Generate password'
@@ -182,12 +183,14 @@ jobs:
182183

183184
- task: NuGetToolInstaller@1
184185

185-
- task: NuGetCommand@2
186+
- task: DotNetCoreCLI@2
186187
displayName: Restore NuGet packages
187188
inputs:
188-
restoreSolution: '$(solution)'
189+
command: restore
190+
projects: '$(solution)'
189191
feedsToUse: config
190192
nugetConfigPath: Nuget.config
193+
restoreArguments: '/p:RuntimeIdentifiers=""'
191194

192195
- task: PowerShell@2
193196
displayName: Install SQL LocalDB # Update when clarity on how to setup

.pipelines/mssql-pipelines.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
projects: '$(solution)'
6363
feedsToUse: config
6464
nugetConfigPath: Nuget.config
65+
restoreArguments: '/p:RuntimeIdentifiers=""'
6566

6667
- task: Bash@3
6768
displayName: 'Generate password'
@@ -186,12 +187,14 @@ jobs:
186187

187188
- task: NuGetToolInstaller@1
188189

189-
- task: NuGetCommand@2
190+
- task: DotNetCoreCLI@2
190191
displayName: Restore NuGet packages
191192
inputs:
192-
restoreSolution: '$(solution)'
193+
command: restore
194+
projects: '$(solution)'
193195
feedsToUse: config
194196
nugetConfigPath: Nuget.config
197+
restoreArguments: '/p:RuntimeIdentifiers=""'
195198

196199
- task: PowerShell@2
197200
displayName: Install SQL LocalDB

.pipelines/mysql-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
projects: '$(solution)'
6161
feedsToUse: config
6262
nugetConfigPath: Nuget.config
63+
restoreArguments: '/p:RuntimeIdentifiers=""'
6364

6465
- task: Bash@3
6566
displayName: 'Generate password'

.pipelines/pg-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
projects: '$(solution)'
5656
feedsToUse: config
5757
nugetConfigPath: Nuget.config
58+
restoreArguments: '/p:RuntimeIdentifiers=""'
5859

5960
- task: Bash@3
6061
displayName: 'Generate password'

0 commit comments

Comments
 (0)