You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's code for 'dotnetfile.py' to return the assembly name along with the version. Use as is or modify as need but please just add something like this. Thanks.
# Table 35
@metatable
class AssemblyRef:
....
def get_assemblyref_names_with_versions(self, deduplicate: bool = False) -> Dict:
"""
Get a list of referenced assembly names and their versions
"""
result = {}
for table_row in self.dotnetpe.metadata_tables_lookup['AssemblyRef'].table_rows:
string_address = table_row.string_stream_references['Name']
if string_address:
assembly_name = self.dotnetpe.get_string(string_address)
if deduplicate:
if assembly_name in result:
continue
vs = Struct.AssemblyInfo(table_row.MajorVersion.value, table_row.MinorVersion.value, table_row.BuildNumber.value, table_row.RevisionNumber.value)
result[assembly_name] = f'{vs.MajorVersion}.{vs.MinorVersion}.{vs.BuildNumber}.{vs.RevisionNumber}'
return result
The text was updated successfully, but these errors were encountered:
Here's code for 'dotnetfile.py' to return the assembly name along with the version. Use as is or modify as need but please just add something like this. Thanks.
The text was updated successfully, but these errors were encountered: