Reputation:
This is my first time posting here.
I am currently writing an ASP.NET MVC application (using .NET 4.5.2 and MVC 5). I want to integrate Hangfire into my project. I have set up a side project which worked. But when I tried to integrate it into my main project, several errors occurred. They are:
The .dll files had to be strong-named (I fixed this issue by using ildasm/ilasm to strong name them. I replace the original files that came with the nuget package.)
After strong-naming and replacing the files, I ran into another error. When I tried to build and run the solution, a 'GlobalConfiguration' does not exists in the current context, and also a are you missing an assembly reference error is thrown.
I have tried various ways to solve this, but to no avail. I would really like some advice on this ! Thanks !
Upvotes: 3
Views: 1251
Reputation: 119146
GlobalConfiguration
is a class in the Hangfire
namespace. You should import the namespace so that you can use it (and the extension methods it provides)
using Hangfire;
So now code like this will work:
GlobalConfiguration.Configuration.UseSqlServerStorage("MyConnectionString");
Upvotes: 1