Add Assembly at Runtime
See original GitHub issueWhen I load an application part with a controller in it, Swashbuckle doesn’t add the controller to the Swagger.
List<System.Reflection.Assembly> ExtraControllerAssemblies { get; set; }
public void ConfigureServices(IServiceCollection services)
{
foreach (var assembly in ExtraControllerAssemblies)
{
services.AddMvc().AddApplicationPart(assembly);
}
}
I can invoke actions on the runtime-loaded controller just fine, so it’s clearly loaded properly, but Swashbuckle hasn’t generated any Swagger for it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
c# - Can I load a .NET assembly at runtime and instantiate ...
You can load an assembly using *Assembly.Load** methods. Using Activator.CreateInstance you can create new instances of the type you want. Keep ...
Read more >How to: Load Assemblies into an Application Domain
Learn how to load assemblies into an application domain in .NET. The recommended way is to use the static (or Shared) Load method...
Read more >Dynamically Loading an assembly at Runtime and calling ...
This article explains how to load an assembly dynamically and call its method.
Read more >Using Reflection to execute assemblies at runtime in C# - ...
In this article, we are going to use Reflection to load an assembly at runtime, extract a few methods from it and then...
Read more >Understanding Dynamic Assembly Loading with ...
What is AssemblyLoadContext? The official documentation says. It provides a service of locating, loading, and caching managed assemblies and other dependencies.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@AceCoderLaura Hi, were you able to resolve this issue? I’m seeing the same issue with swagger to work with an assembly which contains controllers and is loaded by Applicationpart.
Same here …