Last post Jun 07, 2020 03:28 PM by firstname.lastname@example.org
Jun 07, 2020 03:28 PMemail@example.com|LINK
I have a dot net core console application which acts as base framework provides some services to client plugin developers. For simplicity lets assume base program exposes a interface called IPlugin, client developer implement this IPlugin. Base framework
console application loads different client assemblies using reflection. The client and base framework exposes a rest endpoint with swagger. Rest service developed in ASP .net core Web API project.
public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
In Base application Asp .net core Web API is hosted using following code,
public IWebHostBuilder CreateWebHostBuilder(string args) => WebHost.CreateDefaultBuilder(args).ConfigureAppConfiguration((context,config) =>
}).ConfigureServices( s => s.AddSingletion(service1)).
.ConfigureServices( s => s.AddSingletion(service2)).
So far good.
Say IPlugin hosts rest service in port P1,
Now client would like to run different version of IPlugin implementation side by side. New assembly in port P2.
When we load another version of same IPlugin ( strongly typed) and host rest end point in another port P2. We see both the endpoints ( P1, P2) has duplicated methods from assembly 1 and assembly 2.
Could anyone please help how to fix this problem?.