Je reçois ci-dessous erreur lors de l'initialisation StdSchedulerFactory dans Quartz.netImpossible d'initialiser StdSchedulerFactory à quartz dot net
The type initializer for 'Quartz.Impl.StdSchedulerFactory' threw an exception
{"Could not load file or assembly 'Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e' or one of its dependencies. The system cannot find the file specified.":"Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e"}
fusionlog: === Pre-bind state information ===
LOG: DisplayName = Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e
(Fully-specified)
LOG: Appbase = file:///
LOG: Initial PrivatePath =
Calling assembly : Quartz, Version=2.6.0.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: d\web.config
LOG: Using host configuration file: C:\Users\ \Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/f3308e15/e6cfbeeb/Common.Logging.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/f3308e15/e6cfbeeb/Common.Logging/Common.Logging.DLL.
LOG: Attempting download of new URL file:/// bin/Common.Logging.DLL.
LOG: Attempting download of new URL file:// SCS.Presentation.Web/bin/Common.Logging/Common.Logging.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/f3308e15/e6cfbeeb/Common.Logging.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/f3308e15/e6cfbeeb/Common.Logging/Common.Logging.EXE.
LOG: Attempting download of new URL file:/// /bin/Common.Logging.EXE.
LOG: Attempting download of new URL file:/// SCS.Presentation.Web/bin/Common.Logging/Common.Logging.EXE.
Le même code fonctionnait avant un certain temps, tout d'un coup, il a commencé à jeter cette exception. S'il vous plaît trouverez ci-dessous mon code,
var id = queryParams.Schedule.ScheduleId.ToString();
var config = (NameValueCollection)ConfigurationManager.GetSection("quartz");
// First we must get a reference to a scheduler
ISchedulerFactory sf = new StdSchedulerFactory(config);
IScheduler scheduler = sf.GetScheduler();
ITrigger trigger;
IJobDetail job = JobBuilder.Create<ScheduleJob>()
.WithIdentity(id)
.Build();
Je reçois une erreur sur cette ligne
ISchedulerFactory sf = new StdSchedulerFactory(config);
Avez-vous fait référence à Quartz.net grâce à son paquetage nuget? – yorah
Avez-vous 'Common.Logging' dans vos références de projet? – yorah
Oui, j'ai référencé Quartz.net à travers son paquet nuget et j'ai Common.Logging dans vos références de projet. –