VCard 2.0.0

dotnet add package VCard --version 2.0.0                
NuGet\Install-Package VCard -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VCard" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VCard --version 2.0.0                
#r "nuget: VCard, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VCard as a Cake Addin
#addin nuget:?package=VCard&version=2.0.0

// Install VCard as a Cake Tool
#tool nuget:?package=VCard&version=2.0.0                

VCard

This Package enables you to create virtual contact cards(VCF).

You can easily create VCards with single or multiple Phone numbers and Emails in a single contact without much hazzle..

Installing this package: Add this nuget package to your project..

dotnet add package VCard --version 2.0.0

Create a new Contact: Add the following namespaces to your project.

using VCard.Models;
using VCard.Helpers;

Code to create a new contact:

Contact contact = new Contact
{
    FirstName = "Satvik",
    LastName = "Rajnarayanan",
    Addresses = new System.Collections.Generic.List<Address>()
    {
        new Address{Description="Example home address", Type="Home" }
    },
    Phones = new System.Collections.Generic.List<Phone>()
    {
        new Phone{Number="0000000000", Type="Home"}
    },
    Email = new System.Collections.Generic.List<Email>()
    {
        { new Email(){ Mail="youremail", Type="Home"} }
    },
    FormattedName = "Satvik",
    Organization = "Nuget",
    Title = "Satvik"
};

To get the vcard use the following command:

CardHelper.CreateVCard(contact);

This returns the VCard as a string which could be used to save it in your system..

string contents = FileHelper.CreateVCard(contact);
File.WriteAllText("FileName.vcf", contents);

Please make sure that you use the file extention as vcf..

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 2,116 2/24/2022
1.0.0 521 1/15/2022 1.0.0 is deprecated because it has critical bugs.

Added support for VCard Version 3.0, Date of birth and an option to read a vcard using it's contents as a string...