Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress warnings using .NET Core CLI task (DotNetCoreCLI@2) in Azure DevOps pipeline

Trying to suppress warnings in Azure DevOps pipeline using .NET Core CLI task (DotNetCoreCLI@2), but getting the following error:

MSBUILD : error MSB1001: Unknown switch. Switch: --noWarn:MSB3277

Here is an example of the code, which is similar to how the switch is used in a couple of posts I found related to msbuild cli reference:

- task: DotNetCoreCLI@2
  displayName: Release Build
  inputs:
    command: 'build'
    projects: '${{ parameters.solutionPath }}'
    arguments: --configuration Release --noWarn:MSB3277

I have tried lowercase --nowarn as well, but still no luck, so any help with this issue would be gratefully appreciated.

Thanks in advance for your support,

Terry

like image 634
Terry Avatar asked May 11 '26 01:05

Terry


1 Answers

Please use /nowarn:msb3277

- task: DotNetCoreCLI@2
  displayName: Release Build
  inputs:
    command: 'build'
    projects: '${{ parameters.solutionPath }}'
    arguments: --configuration Release /nowarn:msb3277
like image 124
Krzysztof Madej Avatar answered May 17 '26 11:05

Krzysztof Madej