vCardLib is a .NET library to help developers read either single or multiple contacts from a single vcf file or StreamReader.
$ dotnet add package vCardLib.dllvCardLib is a powerful and flexible .NET library designed to simplify working with vCard (.vcf) files. Whether you're reading, writing, or manipulating contact information, vCardLib provides an easy-to-use API to handle vCard versions 2.1, 3.0, and 4.0 seamlessly. 🌟
Perfect for applications dealing with contact management, address books, or any scenario where vCard files are used, vCardLib ensures your vCard processing is smooth and efficient. 🚀
Important: The .NET Standard 1.3 target will be dropped in the next major release. If your project currently targets .NET Standard 1.3, please plan to migrate to .NET Standard 2.0 or a later framework version to continue receiving updates and support.
.vcf file, stream, or string.IEnumerable<vCard> for effortless looping.You can install vCardLib via NuGet using one of the following methods:
Install-Package vCardLib.dll
dotnet add package vCardLib.dll
string filePath = // path to .vcf file;
IEnumerable<vCard> contacts = vCardDeserializer.FromFile(filePath);
var stream = // generate stream containing serialized vCards
IEnumerable<vCard> contacts = vCardDeserializer.FromStream(stream);
var contactDetails = @"BEGIN:VCARD
VERSION:2.1
N:John;Doe;;;
END:VCARD";
IEnumerable<vCard> contacts = vCardDeserializer.FromContent(contactDetails);
var vcard = new vCard(vCardVersion.V2)
{
FormattedName = "John Doe"
};
var serialized = vCardSerializer.Serialize(vcard);
/*
Output:
BEGIN:VCARD
VERSION:2.1
REV:20230719T001838Z
FN:John Doe
END:VCARD
*/
var vcard = new vCard(vCardVersion.V2)
{
FormattedName = "John Doe"
};
var serialized = vCardSerializer.Serialize(vcard, vCardVersion.V4);
/*
Output:
BEGIN:VCARD
VERSION:4.0
REV:20230719T001838Z
FN:John Doe
END:VCARD
*/
master: Contains the latest breaking changes and features. 🚧
Note: This branch may contain unstable code and is not recommended for production use.
v4 Tag: The most recent stable release. ✅
A huge thank you to these amazing contributors who have helped make vCardLib better:
vCardLib is licensed under the MIT License. See the LICENSE file for more details.
Whether you're building a contact management system, integrating vCard support into your app, or just need to process .vcf files, vCardLib is here to make your life easier. Install the package, follow the examples, and start working with vCards like a pro! ⏱️
Happy Coding! 🚀