-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Description
@ViktorHofer I'm looking as to why I'm seeing some warnings as errors when building aspnetcore with --warnaserror false.
For example:
/home/tester/workdir/aspnetcore/src/Hosting/test/testassets/BasicLinkedApp/BasicLinkedApp.csproj : error NU1603: Warning As Error: BasicLinkedApp depends on Microsoft.NET.ILLink.Tasks (>= 10.0.0-preview.6.25277.101) but Microsoft.NET.ILLink.Tasks 10.0.0-preview.6.25277.101 was not found. Microsoft.NET.ILLink.Tasks 10.0.0-preview.6.25277.102 was resolved instead. [/tmp/tmp.X9Undgqi2t/sdk/10.0.100-preview.6.25277.101/NuGet.targets]
I found this:
| RemoveProperties="$(_RemoveProps);TreatWarningsAsErrors" |
From #5172 (comment), it seems the intent is to consistenly have TreatWarningsAsErrors=false to avoid re-restoring if the property changed due to the project config.
In my case, it seems this has the unintended effect of filtering out TreatWarningsAsErrors=false.
Could we change the above to setting it to false in Properties instead of filtering it out in RemoveProperties?
<MSBuild Projects="@(_ProjectToRestore)"
Properties="@(_SolutionRestoreProps);TreatWarningsAsErrors=false"
RemoveProperties="$(_RemoveProps)"
Targets="Restore"
SkipNonexistentTargets="true"
BuildInParallel="%(_ProjectToRestore.RestoreInParallel)"
Condition="'$(Restore)' == 'true'"/>Metadata
Metadata
Assignees
Labels
No labels