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

Make warnaserror work from the property pages. #2368

Merged
merged 2 commits into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
<BoolProperty Name="Optimize" DisplayName="Optimize" Visible="False"/>
<StringProperty Name="NoWarn" DisplayName="Supress Warning" Visible="False"/>
<BoolProperty Name="TreatWarningsAsErrors" Default="False" Description="Treat warnings as errors" Visible="False"/>
<StringProperty Name="TreatSpecificWarningsAsErrors" Description="Treat specific warnings as errors" Visible="False" />
<StringProperty Name="TreatSpecificWarningsAsErrors" Description="Treat specific warnings as errors" Visible="False">
<StringProperty.DataSource>
<DataSource Persistence="ProjectFile" PersistedName="WarningsAsErrors" />
</StringProperty.DataSource>
</StringProperty>
<StringProperty Name="OutputPath" DisplayName="Output Path" Visible="False"/>
<StringProperty Name="DocumentationFile" DisplayName="Documentation file" Visible="False"/>
<EnumProperty Name="GenerateSerializationAssemblies" DisplayName="Generate serialization assemblies" Visible="False">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Visible="False"
ReadOnly="True" />

<StringProperty Name="TreatSpecificWarningsAsErrors"
<StringProperty Name="WarningsAsErrors"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to send both properties to NuGet? What if someone specifically enters <TreatSpecificWarningsAsErrors>NU1000</TreatSpecificWarningsAsErrors>? Or do we need to deprecate that because it will not be reflected in the property page?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya TreatSpecificWarningsAsErrors is not a property that has meant anything to anyone in the past. It looks like the DTE property is called that and so we just had a StringProperty with that same name by mistake. The only projects that will have this are ones where someone tried to set WarnAsError from the proppages and it wouldn't have worked. So its dead code in their project files. I don't see any reason to support both.

Copy link
Contributor

@natidea natidea Jun 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, we should update the NuGet spec at https://github.com/NuGet/Home/wiki/Improved-NuGet-warnings to use <WarningsAsErrors> in Scenario-1, step 5
/cc @anangaur

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we should. Tagging @emgarten again to make sure that the implementation does that.

Visible="False"
ReadOnly="True" />

Expand Down