Export event with C# to iCalendar and vCalendar format

Mark Ursino picture Mark Ursino · Mar 28, 2011 · Viewed 11.7k times · Source

I'm working on a project where we'll be supporting the ability to export an event to Outlook 2007, Outlook 2010, and iCal. I've done some research and found that iCal (to support the iCal program) and vCal (to support Outlook) are basically the same thing, from what I've seen. It appears that iCal is based on the old vCal format, so I'm trying to see what I can borrow between the two implementations to make it easier to generate .ics and .vcs files. I've found a C# implementation for a vCal file, and a C# implementation for a iCal file as well.

  1. Is there anyone out there that knows of the true difference between the two? It seems like iCal has a few more properties and is version 2.0 where vCal is 1.0.

  2. Are there any libraries out there that already handle exporting to these two separate types so I don't have to write basically the same thing or a library to handle both?

  3. Is the vCal implementation different between Outlook 2007 and Outlook 2010?

Note: I am aware that Outlook also supports the iCal (*.ics) format however we've been asked to support creation of vCal (*.vcs) files in addition to *.ics files.

Answer

SteveP picture SteveP · Apr 2, 2011
  1. Stack Overflow Question on the difference between vcal and ical. Wikipedia has some more info and here is a Google Answers question on the same topic. Basically iCal inherits from the earlier vCal implementation. The main changes are the amount of information and the format that that data can take.

  2. For .NET, use Doug Day's great DDay.iCal library. It can export both ical and vcal formats. (Just set the calendar version to 1.0 instead of 2.0 to enable compatability for outlook 2003/vcal)

  3. The Wikipedia article has some information on Outlook's implementation of the iCal standard, but doesn't have any information on changes between the two.