title: Add an alert to an event in Ical.net
body: <p>I am using ical.net to provide outlook internet calendar integration for my solution.</p>
  
  <p>I have several events from 00:00 a.m. to 00:00 a.m. (next day).
  When I add an alarm to the events, in Outlook these events show with no alert.</p>
  
  <p>This is the code how I added the alarms and events.</p>
  
  <pre><code>    foreach (var taskItem in taskItems.Where(t =&gt; t.DueDate != null &amp;&amp; t.DueDate.HasValue == true))
      {
          var hyperlink = Request.GetBaseUrl();
  
          hyperlink = string.Format("{0}/TaskBoard/Tasks?listId={1}", hyperlink, taskItem.ListId);
          var dueDate = new DateTime(taskItem.DueDate.Value.Ticks, DateTimeKind.Utc);
          var alarm = new Alarm()
          {
              Summary = taskItem.Title,
              Trigger = new Trigger(TimeSpan.FromMinutes(-15)),
              Action = AlarmAction.Display
          };
  
          var calendarEvent = new Event
          {
              Class = "PUBLIC",
              Summary = taskItem.Title,
              Created = new CalDateTime(taskItem.Created.Value),
              Description = string.Format("Open board: {0}", hyperlink),
              Start = new CalDateTime(dueDate),
              End = new CalDateTime(dueDate.AddDays(1)),
              Uid = taskItem.Id.ToString(),
              Location = taskItem.ListTitle
          };
  
          calendarEvent.Alarms.Add(alarm);
          calendar.Events.Add(calendarEvent);
      }
  </code></pre>
  
  <p>this is the resulting iCal file content</p>
  
  <pre><code>BEGIN:VCALENDAR
  PRODID:-//github.com/rianjs/ical.net//NONSGML ical.net 2.2//EN
  VERSION:2.0
  X-WR-CALNAME:Agile Kanban - Meine Aufgaben
  BEGIN:VEVENT
  CLASS:PUBLIC
  CREATED:20170814T114839
  DESCRIPTION:Open board: https://localhost:44300/TaskBoard/Tasks?listId=637
   90e98-cacc-4f03-992f-f3276db06dda
  DTEND:20170827T220000Z
  DTSTAMP:20170829T170757Z
  DTSTART:20170826T220000Z
  LOCATION:Room1
  SEQUENCE:0
  SUMMARY:Task changed
  UID:1d4b10bf-7434-41d9-8dd2-311e3679b0a7
  BEGIN:VALARM
  ACTION:Display
  SUMMARY:Task changed
  TRIGGER:-PT15M
  END:VALARM
  END:VEVENT
  END:VCALENDAR
  </code></pre>