OrchardCoreContrib / OrchardCoreContrib.Modules

Unofficial Orchard Core modules that driven by the community who love Orchard Core CMS
BSD 3-Clause "New" or "Revised" License
38 stars 13 forks source link

TypeLoadException after adding OrchardCoreContrib.Apis.Swagger #97

Closed andreapier closed 10 months ago

andreapier commented 1 year ago

I added OrchardCoreContrib.Apis.Swagger to my project and now it crashes during startup with this exception:

Unhandled exception. System.TypeLoadException: Method 'AddSourcesAsync' in type 'OrchardCore.Environment.Shell.Configuration.ShellsSettingsSources' from assembly 'OrchardCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
    at Microsoft.Extensions.DependencyInjection.ShellOrchardCoreBuilderExtensions.AddSitesFolder(OrchardCoreBuilder builder)
    at Microsoft.Extensions.DependencyInjection.ShellOrchardCoreBuilderExtensions.AddDataStorage(OrchardCoreBuilder builder)
    at Microsoft.Extensions.DependencyInjection.ServiceExtensions.AddOrchardCms(IServiceCollection services)
    at Program.<Main>$(String[] args) in /src/Identity.Api/Program.cs:line 18
    at Program.<Main>(String[] args)

I am running in docker, but I doubt this makes a difference.
What should I do to fix this issue?

hishamco commented 1 year ago

@andreapier I'm not sure if it's from OCC.Api.Swagger or something related to OC

Is it working without docker?

andreapier commented 1 year ago

@andreapier I'm not sure if it's from OCC.Api.Swagger or something related to OC

Is it working without docker?

No, it doesn't.

hishamco commented 1 year ago

Could you try to run OCC.Modules.Web?

/src/Identity.Api/Program.cs:line 18

I don't know what's in there?!!

hishamco commented 10 months ago

Closing this while there's no feedback from the author