Skip to content

MSBuildWarningsAsMessages should allow comma separation #7094

@rainersigwald

Description

@rainersigwald

We don't:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <NoWarn>NAT011,NAT012</NoWarn>
  </PropertyGroup>

  <Target Name="AlwaysRun">
    <Warning Code="NAT011" Text="You fail" />
    <Warning Code="NAT012" Text="Other Fail" />
  </Target>

</Project>
C:\Users\forgind\Desktop\Archives\Bug-specific\myTemp>dotnet build myTemp.csproj /t:AlwaysRun
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Users\forgind\Desktop\Archives\Bug-specific\myTemp\myTemp.csproj(12,5): warning NAT011: You fail
C:\Users\forgind\Desktop\Archives\Bug-specific\myTemp\myTemp.csproj(13,5): warning NAT012: Other Fail

Build succeeded.

C:\Users\forgind\Desktop\Archives\Bug-specific\myTemp\myTemp.csproj(12,5): warning NAT011: You fail
C:\Users\forgind\Desktop\Archives\Bug-specific\myTemp\myTemp.csproj(13,5): warning NAT012: Other Fail
    2 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.69

Originally posted by @Forgind in #7089 (comment)

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasetriaged

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions