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

Unable to cast object of type 'System.Double' to type 'System.Decimal' #204

Open
DanielMarmander opened this issue Oct 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@DanielMarmander
Copy link

DanielMarmander commented Oct 4, 2024

Describe the bug
After a couple of these errors:
Error : NuGetDefense : OSS Index scan failed with exception: System.ArgumentException: An item with the same key has already been added. Key: CVE-2024-29992
(which seems to be harmless?)

It throws this one and then exits:
Error : Encountered a fatal exception while checking for Dependencies in path/mysolution.sln. Exception: System.InvalidCastException: Unable to cast object of type 'System.Double' to type 'System.Decimal'.
at NuGetDefense.SqlLiteVulnerabilityCache.GetPackageCachedVulnerabilitiesForSource(NuGetPackage package, String sourceName, Dictionary2& packageUrlVulnerabilityMap) in /home/codingcoyote/RiderProjects/NuGetDefense/Src/NuGetDefense.Lib/SqlLiteVulnerabilityCache.cs:line 232 at NuGetDefense.SqlLiteVulnerabilityCache.GetPackagesCachedVulnerabilitiesForSource(IEnumerable1 cachedPackages, String sourceName, Dictionary`2& vulnDict) in /home/codingcoyote/RiderProjects/NuGetDefense/Src/NuGetDefense.Lib/SqlLiteVulnerabilityCache.cs:line 205
at NuGetDefense.Scanner.ScanVulnerabilities(ScanOptions options) in /home/codingcoyote/RiderProjects/NuGetDefense/Src/NuGetDefense.Lib/Scanner.cs:line 235

To Reproduce
Steps to reproduce the behavior:

  1. nugetdefense -p .\mysolution.sln

Expected behavior
Run and finish with no error.

Tools (please complete the following information):

  • OS: Windows 11 Pro
  • Powershell 5.1.22621.4111
  • .net vesion: 8.0.402
  • Latest nugetdefense release; 4.1.3.1
@DanielMarmander DanielMarmander added the bug Something isn't working label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant