msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Providing -pp will suppress errors and fail silently

Open nagilson opened this issue 3 years ago • 0 comments

To reproduce, do the following:

  1. Create a new console project with dotnet new console.
  2. Open the foo.csproj or project file created by new console. Edit it to be like this:
<Project Sdk="Microsoft.NET.Sdk">
  <Message>Blah</Message>
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>
</Project>

run dotnet msbuild --pp and observe that no error is produced and msbuild is silent, but without --pp it will raise an error.

nagilson avatar Aug 29 '22 20:08 nagilson