NuGet vulnerability warnings: Warn in non-Release mode, Error in non-Release mode (#17244)

* Initial adjustment of the projects with package vulnerabilities that errored, to change to ignore the four specific Nuget vulnerability warnings in Debug mode (but not Release) as per https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904 (NU1901,NU1902,NU1903,NU1904)

* Fixed formatting errors with tests

* No trailing whitespace

* Move NuGet vulnerability warnings error suppression to Directory.Build.props, combine WarningsNotAsErrors and fix minor issues

* Update Umbraco.JsonSchema.csproj

Removed unwanted change

* Update Umbraco.JsonSchema.csproj

Removed unwanted change

* Revert unecessary changes since merge

* Tweak more unecessary changes

* Small tweaks

* Remove space

* Reverted spacing changes

* Remove no longer required warning exclusions

* Reverted unwanted change

* Reversed order

* A few tweaks to reduce warnings in Umbraco.TestData

* More warnings removed as no longer an issue

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
This commit is contained in:
Emma L Garland
2025-09-25 14:31:36 +01:00
committed by GitHub
parent 61f1c4abd0
commit 7572ef5fff
14 changed files with 36 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -10,11 +10,9 @@
<!--
TODO: Fix and remove overrides:
[SYSLIB0021] API supports obsolete serialization
[IDE0060] removed unused parameters
[CS0618] update obsolete references
[CS0649] field not assigned too
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SYSLIB0021,IDE0060,CS0618,CS0649</WarningsNotAsErrors>
<WarningsNotAsErrors>$(WarningsNotAsErrors),SYSLIB0021,CS0618</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>