Skip to content

Incorrect logic of error handling within AssemblyExtensions.GetLoadableTypes #373

@im-aperkhunov

Description

@im-aperkhunov

If an error occurs when loading types of assembly, only the set of types that have been loaded to date is returned.

Steps to reproduce the behavior:

  1. Create FunctionApp assembly some other any assemblies including one with dependency ABCpdfCore, Version=12.1.0.4, Culture=neutral, PublicKeyToken=a7a0b3f5184f2169 (or some other that couldn't be lo);
  2. Try to get swagger.json or UI view.
  3. ReflectionTypeLoadException will occure
  4. Get an empty swagger.json (without endpoints)

Expected behavior
Need to use GetLoadableTypes for getting types or provide that all types are able to load will be loaded.

Environment:

  • OS: Windows 11
  • Browser: any

Additional context
It looks like types can be filtered by full name (in my case ~19k items turn into 13k).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions