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

MissingMethodException Method not found: 'Void OrchardCore.Workflows.Helpers.ServiceCollectionExtensions.AddActivity (OCC-304) #509

Open
carlosmorenoaguilera opened this issue Nov 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@carlosmorenoaguilera
Copy link

carlosmorenoaguilera commented Nov 18, 2024

Describe the bug

System.MissingMethodException: Method not found: 'Void OrchardCore.Workflows.Helpers.ServiceCollectionExtensions.AddActivity(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.
at OrchardCore.Commerce.WorkflowStartup.ConfigureServices(IServiceCollection services)
at OrchardCore.Environment.Shell.Builders.ShellContainerFactory.CreateContainerAsync(ShellSettings settings, ShellBlueprint blueprint)
at OrchardCore.Environment.Shell.Builders.ShellContextFactory.CreateDescribedContextAsync(ShellSettings settings, ShellDescriptor shellDescriptor)
at OrchardCore.Environment.Shell.Builders.ShellContextFactory.OrchardCore.Environment.Shell.Builders.IShellContextFactory.CreateShellContextAsync(ShellSettings settings)
at OrchardCore.Environment.Shell.ShellHost.GetOrCreateShellContextAsync(ShellSettings settings)
at OrchardCore.Environment.Shell.ShellHost.GetScopeAsync(ShellSettings settings)
at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

To Reproduce

  1. Create new blank site dotnet new occms
  2. Add follow packages:
  <ItemGroup>
    <PackageReference Include="OrchardCore.Commerce" Version="2.1.0" />
    <PackageReference Include="OrchardCore.Commerce.Inventory" Version="2.1.0" />
    <PackageReference Include="OrchardCore.Commerce.Payment" Version="2.1.0" />
    <PackageReference Include="OrchardCore.Commerce.Payment.Exactly" Version="2.1.0" />
    <PackageReference Include="OrchardCore.Commerce.Tax" Version="2.1.0" />
    <PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="11.0.0" />
    <PackageReference Include="OrchardCore.Logging.NLog" Version="2.0.2" />
    <PackageReference Include="OrchardCore.Application.Cms.Targets" Version="2.0.2" />
  </ItemGroup>

set this on Program.cs:


using OrchardCore.Logging;
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseNLogHost();

builder.Services
    .AddOrchardCms()
// // Orchard Specific Pipeline
// .ConfigureServices( services => {
// })
// .Configure( (app, routes, services) => {
// })
;

var app = builder.Build();

if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Error");
    // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
    app.UseHsts();
}

//app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseOrchardCore();
app.Run();


Go to admin dashboard >> Features and Install

Screenshot 2024-11-17 184024

and immediately get an error

Screenshot 2024-11-17 184044

Expected behavior

not get an error while trying to install

Jira issue

@carlosmorenoaguilera carlosmorenoaguilera added the bug Something isn't working label Nov 18, 2024
@github-actions github-actions bot changed the title MissingMethodException Method not found: 'Void OrchardCore.Workflows.Helpers.ServiceCollectionExtensions.AddActivity MissingMethodException Method not found: 'Void OrchardCore.Workflows.Helpers.ServiceCollectionExtensions.AddActivity (OCC-304) Nov 18, 2024
@sarahelsaig
Copy link
Contributor

Sorry for the late reply, could you check if it works for you using the Cloudsmith package instead of the NuGet?
I think this has been already fixed in the main branch, and we will publish a new major release in NuGet soon. So if possible, please use the preview package from Cloudsmith in the mean time.

@carlosmorenoaguilera
Copy link
Author

thanks seems works with preview packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants