Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load type 'MediatR.ServiceFactory' from assembly 'MediatR, Version=12.0.0.0 #3775

Closed
satishviswanathan opened this issue Mar 7, 2023 · 2 comments
Labels
stale The issue has no activity for a long time

Comments

@satishviswanathan
Copy link

Dotnet 7
Elsa 2.10.2.2

var services = new ServiceCollection();
services.AddElsa(elsa=> elsa.UseEntityFrameworkPersistence(ef=> ef.UsePostgreSql("connectionString");
services.AddElsaApiEndpoints();
services.Configure(options => options.BlobStorageFactory = () => StorageFactory.Blobs.DirectoryFiles(Path.Combine(currentAssemblyPath, "Workflows")));

Error
Could not load type 'MediatR.ServiceFactory' from assembly 'MediatR, Version=12.0.0.0
Error Stack

System.TypeLoadException : Could not load type 'MediatR.ServiceFactory' from assembly 'MediatR, Version=12.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'.

Stack Trace: 
ServiceRegistrar.AddRequiredServices(IServiceCollection services, MediatRServiceConfiguration serviceConfiguration)
ServiceCollectionExtensions.AddMediatR(IServiceCollection services, IEnumerable1 assemblies, Action1 configuration)
ServiceCollectionExtensions.AddMediatR(IServiceCollection services, IEnumerable1 handlerAssemblyMarkerTypes, Action1 configuration)
ServiceCollectionExtensions.AddMediatR(IServiceCollection services, Action1 configuration, Type[] handlerAssemblyMarkerTypes) ElsaServiceCollectionExtensions.AddWorkflowsCore(ElsaOptionsBuilder elsaOptions) ElsaServiceCollectionExtensions.AddElsaCore(IServiceCollection services, Action1 configure)
ElsaServiceCollectionExtensions.AddElsa(IServiceCollection services, Action1 configure) WorkFlowServiceCollectionExtension.AddWorkFlowEngine(IServiceCollection services, IConfiguration configuration, Action1 elsaBuilder) line 45
WorkFlowServiceCollectionExtensionTests.can_service_collection_add_work_flow_engine() line 16
RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

@deydinov
Copy link

Waiting for nuget with such fix 👍

Lauryx-star added a commit to Lauryx-star/elsa-core that referenced this issue Mar 23, 2023
* fix typo

* update badge

* Configuration headers for kafka consumer were not implemented to ConsumerConfig. Implementation provided. (elsa-workflows#3731)

Co-authored-by: Recep OBUT <[email protected]>

* DeleteMany fixes (elsa-workflows#3718)

* Changed so that DeleteAsync uses batch delete and removed psql and mysql work around

* Re added mysql workaround

* switch to feedz

* [no ci] update readme

* [no ci] update feedz URL

* update feedz npm key

* [no ci] update README with feedz

* cache npm packages

* [no ci] update action version

* enable integration tests

* Fix credential manager in designer. (elsa-workflows#3739)

* Inject `monacoLibPath` in `elsa-credential-manager-items-list`

* Fix secret editor in non OAuth2 types.

* Adjust so that only finished statuses are also add an OR between status instead of AND (elsa-workflows#3717)

* Bump MongoDB.Driver in /src/persistence/Elsa.Persistence.MongoDb (elsa-workflows#3759)

Bumps [MongoDB.Driver](https://github.com/mongodb/mongo-csharp-driver) from 2.13.1 to 2.19.0.
- [Release notes](https://github.com/mongodb/mongo-csharp-driver/releases)
- [Commits](mongodb/mongo-csharp-driver@v2.13.1...v2.19.0)

---
updated-dependencies:
- dependency-name: MongoDB.Driver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump MongoDB.Driver (elsa-workflows#3760)

Bumps [MongoDB.Driver](https://github.com/mongodb/mongo-csharp-driver) from 2.13.1 to 2.19.0.
- [Release notes](https://github.com/mongodb/mongo-csharp-driver/releases)
- [Commits](mongodb/mongo-csharp-driver@v2.13.1...v2.19.0)

---
updated-dependencies:
- dependency-name: MongoDB.Driver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump MongoDB.Driver (elsa-workflows#3761)

Bumps [MongoDB.Driver](https://github.com/mongodb/mongo-csharp-driver) from 2.13.1 to 2.19.0.
- [Release notes](https://github.com/mongodb/mongo-csharp-driver/releases)
- [Commits](mongodb/mongo-csharp-driver@v2.13.1...v2.19.0)

---
updated-dependencies:
- dependency-name: MongoDB.Driver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Implement Customize SqlClientFactory with discovery database types (elsa-workflows#3781)

* Implement Customize SqlClientFactory with discovery database types

* Order usings

* fix issue elsa-workflows#3744 (elsa-workflows#3788)

Co-authored-by: William Verdolini <[email protected]>

* Upgrade MediatR to 12.0.1 fixing issue elsa-workflows#3775 (elsa-workflows#3790)

* Make copy-pasting work across multiple domains (elsa-workflows#3794)

* Make copy-pasting work across multiple domains

* Handle errors on paste better

---------

Co-authored-by: Tanel Kuhi <[email protected]>

* Bump webpack (elsa-workflows#3796)

Bumps [webpack](https://github.com/webpack/webpack) from 5.70.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.70.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Added general global bookmark provider for all KafkaMessageReceivedOverride Triggers (elsa-workflows#3807)

Co-authored-by: Yannick Laubscher <[email protected]>

* [no ci] bump preview version

* update version of Fody packages (elsa-workflows#3824)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Mohamed Ali <[email protected]>
Co-authored-by: Recep Obut <[email protected]>
Co-authored-by: Recep OBUT <[email protected]>
Co-authored-by: Martin Hjulström <[email protected]>
Co-authored-by: Chryssie Ta <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mircotamburini <[email protected]>
Co-authored-by: William Verdolini <[email protected]>
Co-authored-by: William Verdolini <[email protected]>
Co-authored-by: Axel Bergman <[email protected]>
Co-authored-by: tanelkuhi <[email protected]>
Co-authored-by: Tanel Kuhi <[email protected]>
Co-authored-by: Yannick Laubscher <[email protected]>
Co-authored-by: Yannick Laubscher <[email protected]>
Co-authored-by: Joshua Hartmann <[email protected]>
@stale
Copy link

stale bot commented May 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale The issue has no activity for a long time label May 17, 2023
@stale stale bot closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The issue has no activity for a long time
Projects
None yet
Development

No branches or pull requests

2 participants