Open ajtruckle opened 3 months ago
Morning!
I am currently working on a workaround. I am implementing a .NET8 console application and slowly transferring functionality related to CsvHelper
into it.
Running the console app in release build (AnyCPU
) is working. So it will be straightforward to adjust my parent C++ application to spawn the console application with relevant command line switches.
Whilst I am happy to make these changes and adjustments, I am still curious as to the root cause of my DLL. 🤔
Describe the bug I have decided to re-work the ticket and simply my example data.
I have a COM Interop C# DLL that performs a lot of tasks. One of which is working with
CsvHelper
classes. This DLL is built in two flavours:I have a COM wrapper class in Visual C++ to perform certain actions. And this is likewise built in two flavours:
My CSV functions used to work but now I am having critical problems. When I run my Visual C++ project in Debug mode then the DLL works ok. But, when I run it in Release mode all my CSV functions complain now.
I do not know when this broke down nor how to fix it. Spent a day and a half on it so far.
To Reproduce Here is a sample C# method:
This method is exposed to the associated interface class. And, here is the C++ wrapper:
Expected behavior I expect this to parse the file correctly and display the Read message.
Additional context I have tried downgrading the Csv NuGet packages. No joy. At the moment this is application breaking behaviour.
What I can tell you is that if I comment out all the CsvHelper code in my function then my function executes. So it was at the moment it went to do the Csv stuff that it all goes wrong without any exceptions in C# being thrown.
Is this a CsvHelper issue? Something that doesn't cater for the context I am using (eg. DLL COM Interop)?