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

Class not found when loading dll's dynamically #82

Open
inginheiiro opened this issue Apr 14, 2021 · 4 comments
Open

Class not found when loading dll's dynamically #82

inginheiiro opened this issue Apr 14, 2021 · 4 comments

Comments

@inginheiiro
Copy link

Hi, great plugin, awesome job :)

I'm loading dll's dynamically.
I'm not referencing them in the main project.
image
When i try to use the dashboard to change the cron i'm getting
image

note: i'm using .UseRecurringJobAdmin(true,typeof(Startup).Assembly) in the main class, but like i said, I'm not referencing the loaded dll's in the main project...

any workaround for this?

thanks

@OldKing-lion
Copy link

me too

@cetins32
Copy link

cetins32 commented Jun 7, 2023

Can you fix this issue please.

@cetins32
Copy link

cetins32 commented Jun 7, 2023

Hi . i downloaded source code and i changed includeReferences = false to includeReferences = true . it works fine

in StorageAssemblySingleton. cs SetCurrentAssembly method

hangfireadd

@SerbanApostol
Copy link

When calling .UseRecurringJobAdmin(true,typeof(Startup).Assembly), have you tried to add the assembly loaded dynamically?
Something like:

var dynamicAssembly = AssemblyLoader.LoadWithDependencies("...");
services.UseRecurringJobAdmin(true, typeof(Startup).Assembly, dynamicAssembly);
 // or
services.UseRecurringJobAdmin(true, new System.Reflection.Assembly[] { typeof(Startup).Assembly, dynamicAssembly });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants