Answered by:
Azure DevOps Pipeline project not compiling using references to a Nuget package

Question
-
I have a solution with a project that has a package reference to Newtonsoft as follows:
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
It compiles fine on my computer but when I run the azure pipeline, I get the following:
##[error]Utils\JsonExtensions.cs(7,7): Error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
The following is the contents of my azure-pipelines.yml:
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/ApplicationGeneratorBuildTasks.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
feedsToUse: select
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'- Moved by SamaraSoucy-MSFTMicrosoft employee Monday, December 16, 2019 5:25 PM
Sunday, December 15, 2019 3:53 AM
Answers
-
The Azure DevOps team and community are active and answering questions on https://developercommunity.visualstudio.com/spaces/21/index.html can you please post your question there instead? This forum is specifically for Azure App Configuration questions.
- Proposed as answer by Richard MuellerMVP Monday, December 16, 2019 9:59 PM
- Marked as answer by Richard MuellerMVP Monday, December 23, 2019 11:21 AM
Monday, December 16, 2019 5:25 PM -
Another option is:
https://stackoverflow.com/questions/tagged/azure-devops
Richard Mueller - MVP Enterprise Mobility (Identity and Access)
- Proposed as answer by Dave PatrickMVP Tuesday, December 17, 2019 2:33 AM
- Marked as answer by Richard MuellerMVP Monday, December 23, 2019 11:21 AM
Monday, December 16, 2019 10:02 PM
All replies
-
The Azure DevOps team and community are active and answering questions on https://developercommunity.visualstudio.com/spaces/21/index.html can you please post your question there instead? This forum is specifically for Azure App Configuration questions.
- Proposed as answer by Richard MuellerMVP Monday, December 16, 2019 9:59 PM
- Marked as answer by Richard MuellerMVP Monday, December 23, 2019 11:21 AM
Monday, December 16, 2019 5:25 PM -
Another option is:
https://stackoverflow.com/questions/tagged/azure-devops
Richard Mueller - MVP Enterprise Mobility (Identity and Access)
- Proposed as answer by Dave PatrickMVP Tuesday, December 17, 2019 2:33 AM
- Marked as answer by Richard MuellerMVP Monday, December 23, 2019 11:21 AM
Monday, December 16, 2019 10:02 PM