Open crobibero opened 1 year ago
The changelog for version 30.0.0 incorrectly states in the breaking changes section that
Added bool LeaveOpen { get; } to IWriterConfiguration.
Added bool LeaveOpen { get; } to IParserConfiguration.
While the properties were in fact removed.
The LeaveOpen
value is now passed directly via constructor for the parser and writer:
public CsvParser(TextReader reader, IParserConfiguration configuration, bool leaveOpen = false) { ... }
public CsvWriter(TextWriter writer, IWriterConfiguration configuration, bool leaveOpen = false) { ... }
Does this update impact ExcelWriter? I updated from from CsvHelper 27.2.1 to 30.0.1, and when calling the following:
using var stream = new MemoryStream(); await using (var excelWriter = new ExcelWriter(stream, new CultureInfo("en-US"))) // Fails - Exception thrown: 'System.MissingMethodException' in CsvHelper.Excel.dll { await excelWriter.WriteRecordsAsync(collection); }
return stream.ToArray();
Don't know if this is the right place to post this, but it seemed related. Reverted back to CsvHelper 27.2.1 to keep it moving.
Thanks so much in advance,
Describe the bug The property
LeaveOpen
was removed from theCsvConfiguration
class.To Reproduce Attempt to update from 29.0.0 to 30.0.0.0 (or 30.0.1)
Expected behavior
LeaveOpen
should be available.Additional context PR that removed the functionality: https://github.com/JoshClose/CsvHelper/pull/1267 Specific commit: https://github.com/JoshClose/CsvHelper/commit/283d68f97437f921b23606d71f08f3bcf4afd571