Help - I'm having difficulty with a .NET condition in version 6.1.4. It's a simple one that checks if it's an evening or a weekend. The function compiles OK and as you can see below there isn't much to it.
When the condition is executed, the log indicates that a temporary dll (i'm guessing the one that holds the function) cannot be found. When I have a look in the windows\temp folder there is no dll.
Any ideas what is going on? At what stage should be dll be created? Has anyone else got .NET conditions working correctly?
03/06/2013 09:32:21 Debug Running Condition Set: 'Not Evenings or Weekends' for Task: Every 10 Minutes Except Evenings and Weekends
03/06/2013 09:32:21 Debug DotNET Condition returned: MatchError (Could not load file or assembly 'file:///C:\Windows\TEMP\kqzpsrg9.dll' or one of its dependencies. The system cannot find the file specified.)
03/06/2013 09:32:21 Debug Condition Set (Task) returned: MatchError-> ActionExit
using System;
public class Test2
{
// a VisualCron Condition must return a boolean which is the result of the Condition
public static bool notEveningOrWeekend()
{
var now = DateTime.Now;
var evening = now.Hour >= 22 || now.Hour < 6;
var weekend 😞 now.DayOfWeek == DayOfWeek.Saturday) || (now.DayOfWeek == DayOfWeek.Sunday);
return ! (evening || weekend );
}
}