Export event with C# to iCalendar and vCalendar format

ぃ、小莉子 提交于 2019-12-10 06:03:07

问题


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.


回答1:


  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.



来源:https://stackoverflow.com/questions/5461681/export-event-with-c-sharp-to-icalendar-and-vcalendar-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!