elsa-workflows / elsa-workflows/elsa-core

Error with Elsa DropIns: Method not found: 'Elsa.Features.Services.IModule.get_Services()'

Open
#4,954 3 comments 0 reactions 0 assignees View on GitHub
bug elsa 3 triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

So I want to use the DropIn feature.

I created a Plugin Project, that adds GRPC activities.
The activities are implemented in a project called "IOCommunicationActivies".
The GRPC functionality is implemented in a project called "GrpcClient".
The GrpcClient is referenced by the IOCommunicationActivites project.

I build the IOCommunicationActivites project and copy the output to the configured DropIns folder.
In the class DropInStartup : IDropIn in the Install method, I want to register a grpc service.
I do that by writing:
```cs
public void Install(IModule module)
{
module.AddActivitiesFrom();
module.Services.AddSingleton(_ => new GrpcClient.GrpcClient(new Uri("")));
}
```

Running the Elsa Server I get the error:
```
Exception thrown: 'System.MissingMethodException' in Elsa.DropIns.dll
An unhandled exception of type 'System.MissingMethodException' occurred in Elsa.DropIns.dll
Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Elsa.Features.Services.IModule.get_Services()'.
```

I'm relatively new to plugin like project configurations so I'll post the csproj files for GrpcClient and IOCommunicationActivities:
GrpcClient:
```xml


net8.0-windows
enable
enable
enable
true










all
runtime; build; native; contentfiles; analyzers; buildtransitive

```

IOCommunicationActivities:
```xml


net8.0-windows
enable
enable
true
$(SolutionDir)ElsaBackend\App_Data\Plugins
false



runtime


runtime



```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.