1
Vote

tlbimp: /silence:WarningNumber behaves confusing

description

The warning number you specify is treated as hex number. However, the type library importer outputs the number as integer. So you can not just use the number from the output messages and suppress warnings by using the number with the /silence option without having to convert them to hex before.
 
Suggested change: Change code in Tlbimp.cs line 453 from
int warningNumber = int.Parse(opt.Value, System.Globalization.NumberStyles.HexNumber);
to
int warningNumber = int.Parse(opt.Value, System.Globalization.NumberStyles.Integer);

comments