msbuild doesn't set non-zero exit code when promoting import warnings to errors with /warnaserror
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Steps to reproduce
a.proj:
```xml
```
b.proj:
```xml
```
Command line
```
msbuild a.proj /warnaserrors
```
### Expected behavior
```
> echo %ERRORLEVEL%
1
```
### Actual behavior
```
Microsoft (R) Build Engine version 15.7.177.53362 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 5/10/2018 11:05:50 AM.
D:\temp\a.proj(7,3): error MSB4011: "D:\temp\b.proj" cannot be imported again. It was already imported at "D:\temp\a.pr
oj (6,3)". This is most likely a build authoring error. This subsequent import will be ignored.
Project "D:\temp\a.proj" on node 1 (default targets).
T:
Hello
Done Building Project "D:\temp\a.proj" (default targets).
Build FAILED.
D:\temp\a.proj(7,3): error MSB4011: "D:\temp\b.proj" cannot be imported again. It was already imported at "D:\temp\a.
proj (6,3)". This is most likely a build authoring error. This subsequent import will be ignored.
0 Warning(s)
1 Error(s)
> echo %ERRORLEVEL%
0
```
### Environment data
`msbuild /version` output:
```
>msbuild /version
Microsoft (R) Build Engine version 15.7.177.53362 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.7.177.53362
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.