[ilverify] Using ilverify with --include-file, --exclude-file or --ignore-error-file gives a System.NullReferenceException #62012
Labels
untriaged
New issue has not been triaged by the area owner
Description
When using any of the "file" options (
--include-file
,--exclude-file
or--ignore-error-file
) with the ilverify tool a System.NullReferenceException is thrown. I looked into it and this happens because the code tries to get the length on the "non-file" variants of these options:Here options.Include is null, because the option is not given when running the command.
Reproduction Steps
Run ILVerify with either
--include-file
,--exclude-file
or--ignore-error-file
, but not--include
,--exclude
or--ignore-error
. For example:Expected behavior
Expected behavior is that the tool gives no System.NullReferenceException and uses the entries in the file.
Actual behavior
Actual behavior is that a System.NullReferenceException is thrown:
Regression?
No response
Known Workarounds
A workaround is to also define the 'non-file' options, when using a 'file' option. For example:
Configuration
Version 6.0.0 of the ilverify tool: https://www.nuget.org/packages/dotnet-ilverify/
Other information
Created PR that should fixe this: #62013
The text was updated successfully, but these errors were encountered: