Skip to content

Commit 43bd227

Browse files
committed
Add explicit dotnet restore step.
This attempts to work around an intermittent Azure Pipelines failure restoring packages with the message: error NU1101: Unable to find package X. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
1 parent 844833e commit 43bd227

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

azure-pipelines.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,16 @@ jobs:
137137
inputs:
138138
targetType: 'inline'
139139
script: '((Get-Content .\tests\SideBySide\SideBySide.csproj -Raw) -replace(''<TargetFrameworks>.*</TargetFrameworks>'', ''<TargetFrameworks>net472;netcoreapp2.0</TargetFrameworks>'')) | Set-Content .\tests\SideBySide\SideBySide.csproj'
140+
- task: DotNetCoreCLI@2
141+
displayName: 'Restore packages'
142+
inputs:
143+
command: 'restore'
140144
- task: DotNetCoreCLI@2
141145
displayName: 'Side by Side tests (net472/netcoreapp2.0)'
142146
inputs:
143147
command: 'test'
144148
projects: 'tests/SideBySide/SideBySide.csproj'
145-
arguments: '-c Release'
149+
arguments: '-c Release --no-restore'
146150
testRunTitle: ${{ format('{0}, $(Agent.OS), {1}, {2}', 'mysql:8.0', 'net472/netcoreapp2.0', 'No SSL') }}
147151
env:
148152
DATA__UNSUPPORTEDFEATURES: 'Ed25519,Tls11,UnixDomainSocket'
@@ -169,12 +173,16 @@ jobs:
169173
inputs:
170174
targetType: 'inline'
171175
script: '((Get-Content .\tests\SideBySide\SideBySide.csproj -Raw) -replace(''<TargetFrameworks>.*</TargetFrameworks>'', ''<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>'')) | Set-Content .\tests\SideBySide\SideBySide.csproj'
176+
- task: DotNetCoreCLI@2
177+
displayName: 'Restore packages'
178+
inputs:
179+
command: 'restore'
172180
- task: DotNetCoreCLI@2
173181
displayName: 'Side by Side tests (netcoreapp2.1/netcoreapp3.0)'
174182
inputs:
175183
command: 'test'
176184
projects: 'tests/SideBySide/SideBySide.csproj'
177-
arguments: '-c Release -f netcoreapp2.1'
185+
arguments: '-c Release -f netcoreapp2.1 --no-restore'
178186
testRunTitle: ${{ format('{0}, $(Agent.OS), {1}, {2}', 'mysql:8.0', 'netcoreapp2.1/netcoreapp3.0', 'No SSL') }}
179187
env:
180188
DATA__UNSUPPORTEDFEATURES: 'Ed25519,Tls11,UnixDomainSocket'

0 commit comments

Comments
 (0)