0
votes

I have a big problem which makes me cry everytime when I try to resolve it. I have installed VisualStudio2012 Express and made project in .net 4.5 framework it is simple project which use QUARTZ library and has only 2 lines:

var cron = new Quartz.CronExpression("0 * 8-22 * * ?");
DateTimeOffset? nextFire = cron.GetNextValidTimeAfter(DateTime.Now);

I successfully have compiled application and it works fine. But one day I had to change framework from .net4.5 to .net 4.0 and when i did it VisualStudio throws errors in line

DateTimeOffset? nextFire = cron.GetNextValidTimeAfter(DateTime.Now);

Exception is:

"An unhandled exception of type 'System.AccessViolationException' occurred in WindowsFormsApplication6.exe Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I tried to change framework from net4.0 to .net4.5 because in .net4,5 application worked fine but it does not works! I can go back to .NET4.5 but application throws the same System.AccessViolationException. Have Anyone know how to resolve this issue?

1
That smells like a quartz issue. What happens if you create a new project, target 4.0 from the start, and copy your code from the initial project?Sven Grosen
Hi ledbutter, When i create new project target on 4.0 and my code does not work. I also tried to change framework from 4.0 to 4,5 and it also does not work. It looks like QUARTZ problem or VisualStudio Version.I will check this issue on VisualStudioPro and I will let You know about result?JacekRobak85
Which version of Quartz.NET?Marko Lahma
This is the last version of QUARTZ but prblem is in machine (my windows in on KVM and I have VisualStudioExpress2013), because on other machines it works fine. Thank You all for help.JacekRobak85

1 Answers

0
votes

I was facing this same problem.Somehow my project configuration for build was set x86. It was not giving me option to change it.I unloaded project and changed it in notepad.Build configuration was set as "AnyCPU" and things started working problem