I would like to restore my nugets one level up. My repo directory points to say for ex. c:\repo\s and my solutin is in c:\repo\s\src, when I am restoring packages with nuget restore , its restoring the packages at C:\repo\s\src\packages and I would like that to be C:\repo\s\packages. Appreciate your help.
I have the below nuget.config file in C:\repo\s\src directory.
$<configuration>
<config>
<add key="repositoryPath" value="..\..\packages" />
</config>
</configuration>
My Yaml job looks like this
$steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.3.0'
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: src/myproject.sln
vstsFeed: '4448b1e2-8ac8-45ef-870c-1ebab90f3348'
restoreDirectory: '$(Build.SourcesDirectory)'
- task: VSBuild@1
displayName: 'Build solution src/myproject.sln'
inputs:
solution: src/myproject.sln
vsVersion: 15.0
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'