In my C# project I'm referencing one of my company's DLLs, which is not on NuGet (as it's not public) and my pipeline in Azure DevOps keeps failing because it says it cannot find the reference.
Error CS0234: The type or namespace name 'YYY' does not exist in the namespace 'ZZZ' (are you missing an assembly reference?)
Following the advice from this post I have copied the dll in my solution and I'm referencing it from there, so the dll is version controlled and lives in the repo. Here an extract from the csproj:
<Reference Include="ZZZ.YYY, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\PrivateReferences\ZZZ.YYY.dll</HintPath>
<Private>False</Private>
</Reference>
The solution builds perfectly from my machine, but it keeps failing on Azure. What am I missing?
Thanks!
EDIT AFTER Bright Ran-MSFT REPLY
Here is the extract from my yaml:
trigger:
- develop
pool: 'Default'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Debug'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
vstsFeed: '<GUID of my Feed>'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'