Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio doesn't fail when the warning MSB3247 is added to WarningsAsErrors #6473

Closed
MattBussing opened this issue May 21, 2021 · 5 comments
Assignees

Comments

@MattBussing
Copy link

Issue Description

If I set several MSBuild warnings to errors via MSBuildWarningsAsErrors and WarningsAsErrors and build with Visual Studio, VS will successfully build and output the warnings, that should be errors, as normal warnings. Here are the settings. You can get the project to reproduce the error at https://github.com/MattBussing/vs-issue-example.

<MSBuildWarningsAsErrors>MSB3276;MSB3247;MSB3277;NU1605;MSB3245;MSB3243</MSBuildWarningsAsErrors>
<WarningsAsErrors>MSB3276;MSB3247;MSB3277;NU1605;MSB3245;MSB3243</WarningsAsErrors>

Steps to Reproduce

Expected Behavior

The build to fail in VS and output MSB3247 as an error.

Actual Behavior

VS

Here it doesn't fail. It just warns about the issue.
image
image

Rider

Rider actually fails.
image

Versions & Configurations

VS

Microsoft Visual Studio Professional 2019
Version 16.9.4
MSBuild 16.9.0.16703

Rider

JetBrains Rider 2021.1.2
Build #RD-211.7142.19, built on April 22, 2021
Runtime version: 11.0.10+9-b1341.41 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
.NET Framework 4.0.30319.42000

@MattBussing MattBussing added bug needs-triage Have yet to determine what bucket this goes in. labels May 21, 2021
@benvillalobos benvillalobos self-assigned this May 26, 2021
@benvillalobos benvillalobos added initial-investigation Perform initial investigation, apply untriaged label when done. and removed needs-triage Have yet to determine what bucket this goes in. labels May 26, 2021
@benvillalobos
Copy link
Member

Unable to repro in 16.10.2+857e5a733.

This was likely fixed with #5957. Is it possible for you to upgrade your version of VS?

@benvillalobos benvillalobos added needs-more-info Issues that need more info to continue investigation. and removed initial-investigation Perform initial investigation, apply untriaged label when done. labels Jun 28, 2021
@MattBussing
Copy link
Author

MattBussing commented Jul 2, 2021

Thanks for looking into this for me. I updated to 16.10.2+857e5a733, and now it is sort of fixed.
It still shows as a warning here (I would think it would show an error)
image
but now it fails the build (intended behavior) (thanks for fixing this!)
image

@benvillalobos
Copy link
Member

@MattBussing If it properly fails in the output/command line then it's fixed in terms of MSBuild. Still seeing it as a warning in that window is project-system I believe? /cc: @jjmew

@benvillalobos benvillalobos removed the needs-more-info Issues that need more info to continue investigation. label Jul 2, 2021
@benvillalobos
Copy link
Member

Closing in the meantime. Feel free to open an issue in dotnet/project-system

@MattBussing
Copy link
Author

MattBussing commented Jul 13, 2021

Yeah sounds good! I will open a ticket there. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants