My winforms application builds ok on my machine.
However when the pipeline tries to build it shows
Error CS0234: The type or namespace name 'Dynamic' does not exist in the namespace 'System.Linq' (are you missing an assembly reference?)
Process 'msbuild.exe' exited with code '1'.
The pipeline contains
pool:
vmImage: 'windows-2019'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
Major: '2'
Minor: '0'
Patch: '0'
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
I solved my problem by removing the reference to System.Linq.Dynamic It turned out that I did not need it. Also I found packages.config had an old version which I deleted.