File tree Expand file tree Collapse file tree
mdoc/Mono.Documentation/Updater/Formatters/AttributeFormatters Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,14 +138,23 @@ private bool IsIgnoredAttribute(CustomAttribute customAttribute)
138138 return false ;
139139 }
140140
141- var attrTypeDef = attrType as TypeDefinition ;
142- if ( attrTypeDef != null && ! DocUtils . IsPublic ( attrTypeDef ) || ( FormatterManager . SlashdocFormatter . GetName ( attrType ) == null )
141+ if ( FormatterManager . SlashdocFormatter . GetName ( attrType ) == null
143142 || Array . IndexOf ( IgnorableAttributes , attrType . FullName ) >= 0 )
144143 {
145144 return true ;
146145 }
147146
148- return false ;
147+ try
148+ {
149+ var attrTypeDef = attrType . Resolve ( ) ;
150+ // We probably should return true if attrTypeDef is null, but it would cause too many diffs in dotnet-api-docs repo.
151+ return attrTypeDef != null && ! DocUtils . IsPublic ( attrTypeDef ) ;
152+ }
153+ catch ( Exception ex )
154+ {
155+ Console . WriteLine ( $ "Unable to resolve { attrType . FullName } ", ex ) ;
156+ return true ;
157+ }
149158 }
150159
151160 // FIXME: get TypeReferences instead of string comparison?
You can’t perform that action at this time.
0 commit comments