error NU1900: Warning As Error: Error occurred while getting package vulnerability

 Getting a package vulnerability while trying to build a c# application. 

The ideal solution would be to update your package in your project. However, there's a workaround there by you can turn nuget auditting off - as shown below with <NugetAudit> block


<PropertyGroup>

    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<WarningsNotAsErrors></WarningsNotAsErrors>
<NuGetAudit>false</NuGetAudit>
<NoWarn></NoWarn>
  </PropertyGroup>


Here is a link that you can get some additional resources 

https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages#disabling-security-auditing


Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm