NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #92 most downloaded on NuGet
A library for reading and writing CSV files. Extremely fast, flexible, and easy to use. Supports reading and writing of custom class objects.
Last release 1 years ago
02 Jun 2025
Ships unpredictably
gaps range from 8 days to 1.2 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
10 versions withdrawn
withdrawn after publishing
127 years old
236 releases · first in 1900
Dynamic now uses Configuration.PrepareHeaderForMatch on header name to get property name for dynamic object.
Fixed issue with LINQPad not working properly due to types from differently assemblies being cached in the writer.
One column per quarter.
Fixed issue with LINQPad not working properly due to types from differently assemblies being cached.
Nothing published for this version
Use ObjectResolver to create internal classes RecordManager , ExpressionManager , RecordCreatorFactory , and RecordHydrator , RecordWriterFactory .
Use ObjectResolver to create internal classes RecordManager , ExpressionManager , RecordCreatorFactory , and RecordHydrator , RecordWriterFactory .
Added generic resolve method to object resolver.
Added mapping methods to MemberMap for use during runtime mapping.
Added more info and properties to TypeConverterException.
Added IObjectResolver.Resolve<T>( params object[] constructorArgs ) method.
Added IWriter.WriteRecords<T>( IEnumerable<T> records ) method.
TypeConverterException constructors signatures changed.
Added Map .References( expression ) back in.
Added ReadingExceptionOccurred callback to GetRecord methods when an exception occurs.
Fixed issue with parsing when buffer spans over a field.
Fixed issue where trimming inside quotes would fail when the character after a space was a delimiter, \r, or \n.
Added setter to ISerializerConfiguration.Quote .
Added setter to ISerializerConfiguration.Quote .
Removed ClassMap<TClass>.References( expression, constructorArs ) . Use sub property mapping instead.
Removed ClassMap<TClass>.ConstructUsing( expression ). Use the ObjectResolver` instead.
Change how reference header prefixing works.
Changed Configuration / IReaderConfiguration / IWriterConfiguration bool PrefixReferenceHeaders to Func<Type, string, string> ReferenceHeaderPrefix . The function takes in the member type and member name and returns the prefix.
Removed MemberReferenceMap.Prefix() method.
Removed ParameterReferenceMap.Prefix() method.
Changed Configuration / IReaderConfiguration / IWriterConfiguration ClassMap AutoMap<T>() to ClassMap<T> AutoMap<T>()
Changed TypeConverterException constructors parameter from ReadingContext to IReadingContext .
Fixed issue when a map was created through auto mapping, you couldn't use sub property mapping to update a member.
Added more information to the DefaultTypeConverter.ConvertFromString not convertible exception.
Added more information to the DefaultTypeConverter.ConvertFromString not convertible exception.
Reduced the number of PrepareHeaderForMatch calls.
Attribute mapping. It's back...
Fixed issue where you weren't able to write IEnumerable .
Allow multiple headers to be written.
Flush CsvWriter on Dispose .
Made ShouldSkipRecord not called if the parser returns null for an end of stream.
ShouldUseConstructorParameters returns false if there are no constructors.
Header validation doesn't validate members where ConvertUsing or Constant are used.
Massive speed improvements to the CsvParser .
netstandard2.0
Massive speed improvements to the CsvParser .
Speed improvements to CsvSerializer .
Map child properties so multiple mapping classes aren't needed.
ConvertUsing implementation for writing.
Read/write IEnumerable properties.
Field mapping.
Async reading/writing.
Added ClassMapBuilder to build maps on the fly without a mapping class.
Write IDynamicMetaObjectProvider objects. DynamicObject and ExpandoObject are the 2 most common.
Allow null fields to be written.
IDictionary type converters.
Added trim options to trim in parser and removed trim from reader.
Header validation.
Field validation.
Added leaveOpen flag to constructors to not dispose of underlying TextReader and TextWriter .
Added properties to CsvHelperException and removed the string data.
Speed up mappings that use ConvertUsing by caching the named indexes.
Write comments.
Map constants.
Write fields that aren't mapped.
Specify values that resolve to null when reading.
Added CsvProperMap to allow for compile time type checking on mappings.
Read more than 1 header row.
Changed reading exception callback to send a CsvHelperException.
Map the same property more than once.
Exposed the underlying TextReader as a property.
Removed header matching manipulation configuration IsHeaderCaseSensitive , IgnoreHeaderWhiteSpace , and TrimHeaders and added a config for PrepareHeaderForMatch that is a function. Both the header field name and the property name are ran through this method before matching against each other.
Added interfaces for configuration so you can tell what options are available in your current context.
Moved detection of column count changes into the reader. The parser shouldn't care and should just return whatever data it finds.
ConstructUsing works with reference maps.
ConstructUsing can use initializers.
Allow resuming reading of more data is written to the stream.
Auto mapping with user defined struct .
Ability to change required quote characters.
Speed improvements when using GetField .
Speed improvements when using WriteField .
Allow mapping default value to be a string that is converted.
Moved reading/writing state data into a common context object that is shared.
Multiple string formats for TypeConverterOptions .
Created object resolver so interfaces can be mapped to and IoC containers can be plugged in.
Made methods ReIndex and GetMaxIndex on CsvClassMap public .
Added a Flush method to the writer so NextRecord just writes a line ending. This will allow users to not write a line ending if they want.
Removed statics to eliminate possible threading issues.
Added SerializableAttribute to exception classes. It was removed previously because of netstandard1.x not having it available.
Added ByteArrayConverter .
Reading anonymous types.
Auto mapping with any constructor.
Changed Property naming to Member since both properties and fields are used.
TypeConverterFactory is now instance of Configuration instead of a static.
Changed Configuration flags to callbacks with default functionality to let the user change the functionality if they want.
Fixed issue with CsvClassMapCollection[type] choosing the wrong type when multiple types on the inheritance tree are mapped.
Fixed issue where setting Configuration.ShouldSkipRecord method always overrides the Configuration.SkipEmptyRecords setting.
Fixed issue where ignoring header whitespace wouldn't work if a named property had the same whitespace in it.
When comments are on and a field is being written that is the first field in the record and the first char is a comment char, quote the field because it's not a comment.
Fixed issue with type converter options set in factory not working with auto mapping or explicit map.
Fixed line ending spanning buffer issue.
Fixed issue of skipping a character if a line ending was within a quoted field.
Added locking to factory to make it thread safe.
Fixed bug when mapping a constant then mapping another property after will throw an exception.
Changed reflection calls to ConvertToString to get the method for ITypeConverter instead of the actual converter. This is so the overridden implementation will be used instead of a random method with the same name.
Adding locking in ReflectionHelper.CreateInstance for the static delegate cache.
Fixed quote handling issue of IsFieldBad by marking unquoted fields with quote chars as bad only when Configuration.IgnoreQuotes is false .
Fixed issue with automapping not mapping references correctly in some nested situations because it thought it was a circular dependency when it wasn't.
Fixed issue with private properties not being able to be set.
Fixed issue with getting the class map from the collection. It was only getting the current and not looking up the tree.
Fixed issue with Constant not working with null .
Removed all .NET builds except for net45 and netstandard2.0.
Removed obsolete code.
object ICsvReader.GetField( int index, ITypeConverter converter )
object ICsvReader.GetField( string name, ITypeConverter converter )
object ICsvReader.GetField( string name, int index, ITypeConverter converter )
void ICsvWriter.WriteField( Type type, object field )
void ICsvWriter.WriteField( Type type, object field, ITypeConverter converter )
void ICsvWriter.WriteRecord( Type type, object record )
Moved methods that aren't row level out of ICsvReaderRow and into ICsvReader .
IEnumerable<T> GetRecords<T>()
IEnumerable<object> GetRecords( Type type )
void ClearRecordCache<T>()
void ClearRecordCache( Type type )
void ClearRecordCache()
Removed CanConvertTo and CanConvertFrom from the type converters because there is no need for them.
Added properties to CsvHelperException and removed the string data.
Changed WriteRecord to not call NextRecord .
Changed config setting name from IgnorePrivateAccessor to IncludePrivateProperties to be more clear on intention.
Changed reading exception callback to send a CsvHelperException .
Removed configuration IsHeaderCaseSensitive , IgnoreHeaderWhiteSpace , and TrimHeaders and added PrepareHeaderForMatch .
Changed DateTime and DateTimeOffset converters to not work when the string is spaces to match what all the other converters do. The .NET Framework DateTime and DateTimeOffset converters will convert a string of all spaces into MinValue , so we are diverging from that a little.
Changed ReadHeader to not set CurrentRecord to null .
Removed Excel specific code. This will go into a separate library. The malformed fallback behavior that mimics Excel still exists.
Moved reading/writing state data into a common context object that is shared.
Changed BadDataCallback to take in a ReadingContext instead of a string .
Removed Csv prefix from all classes except CsvReader , CsvParser , CsvWriter , and CsvSerializer .
Removed default null values since there is no common standard that could be found.
Removed default boolean values of yes , y , no , n since it's not a standard boolean. true , false , 1 , 0 still work.
Changed default delimiter to , instead of ListSeparator.
Added a Flush method to the writer.
Changed Property naming to Member .
Removed Configuration s ThrowOnBadData , IgnoreReadingExceptions , SkipEmptyRecords , and WillThrowOnMissingField in favor of function callbacks.
Renamed
TypeConverterFactory to TypeConverterCache
TypeConverterOptionsFactory to TypeConverterOptionsCache
Configuration.HeaderValidatedCallback to Configuration.HeaderValidated
Configuration.MissingFieldFoundCallback to Configuration.MissingFieldFound
Configuration.ReadingExceptionCallback to Configuration.ReadingExceptionOccurred
Configuration.BadDataFoundCallback to Configuration.BadDataFound
ICsvParser to IParser
FieldReader to CsvFieldReader
ICsvReader to IReader
ICsvReaderRow to IReaderRow
ICsvSerializer to ISerializer
ICsvWriter to IWriter
ICsvWriterRow to IWriterRow
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed issue with CsvClassMapCollection[type] choosing the wrong type when multiple types on the inheritance tree are mapped.
Made TypeInfo compatibility stuff internal to not cause conflicts.
Fix for UWP release not working.
Nothing published for this version
Nothing published for this version
Updated project to .NET Core RC2.
Added net45 build and excluded it from CoreFX compatibility.
Fixed issue with .NET 2.0 classes being included that shouldn't have been in .NET 4.0.
Nothing published for this version
Fixed ShouldSkipRecord not working on rows before header.
Nothing published for this version
Fixed issue where the number of delimiter characters was read when a multiple character delimiter is hit. This was causing non-delimiters to be read w
Fixed issue with TryGetField with named index returning wrong value.
Added missing DateTimeConverter to the list of default converters.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed issue where char converter would trim a single space string.
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →