Developer forum

Forum » Integration » Debugging the CsvProvider with DW10/.NET7

Debugging the CsvProvider with DW10/.NET7

Joel Mandell
Reply

Hi. I am currently working on an C4 Pim integration for a customer, and we are using DW10...
When trying out import from csv file to the Ecom-provider I get information in the log about failing input row. And I wonder if it could be an issue with the CSV-provider, but I cannot really see the issue so I wanted to debug against the CsvProvider in Visual Studio.

It is a row in the CSV-file that does not have the same amount of DELIMITERS corresponding to the amount of columns.
I.E. The csv file has 4 columns: ProductID | Name | ShortDesc | LongDesc.
In this case there is a row with the following exampledata that misses a delimiter for the longdesc column:
15314 | Banana | Nutritious fruit

That means that it somehow inteprets that the next row is a continuation of the above row because of missing delimiter. But I am not sure, and wanted to debug against the CsvProvider directly..

But It seems that I am blind and cannot find a DW10/.NET7 project for that provider anywhere in DynamicWeb repos on Azure Devops. The one I find is targeted .NET Standard 2 and trying to add that to the DW10-proj throws internal errors when resolving assemblies (obviously because the CsvProvider depends on DynamicWeb.Core 3.1.0 for example). But I suppose that there should exist a .NET7 targeted codebase somewhere as it exists an NuGet Gallery | Dynamicweb.Core 10.0.2


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Which version of the CSV provider do you use? The 10.0 only have dependency to DW version 10 assemblies.

https://www.nuget.org/packages/Dynamicweb.DataIntegration.Providers.CsvProvider/10.0.0

Dynamicweb.Core v 3 is belonging to the DW9 series - it is standards compliant and API compatible, but you should of course run on the DW10 specific version.

The source for the DW10 CSV provider is actually in Github and not Devops GIT - but it is a private repo. But the symbols for the DW10 package is in Nuget.

BR Nicolai

 
Joel Mandell
Reply

I see now that I posted link to the wrong Nuget-package 😂 I meant the CvsProvider package there...
I am using 10.0.0 :)

And I managed to create a PDB with DotPeek and debug by loading the module in VS. But I cannot get so much further ATM, it is a BadFormatException of some kind.
Most likely I am doing something stupid as the n00b I am with the integration part and DW in general. But I would like to in best case to debug directly against the source code to see more in detail what is going on. 

 

 
Joel Mandell
Reply

Okay so I "kinda" solved it now. Or I found out the problem. It seems to be a bug in CsvHelper 27.x.x that causes that error. Bumping up to 28 solves the import problem. It seemed to be a field that held HTML-code that was the problem. Bumping up to CsvHelper version greater than 27 does not work because parameters has breaking changes. So I am stuck in my process with working with the integration now somehow. Is it possible to do a PR somehow so that it can be updated to depend on CvsHelper >=28?

   
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Joel,
this bug should now be fixed in this PR: https://github.com/dynamicweb/DataIntegration.CsvProvider/pull/10
So you can try to take that version and supply it to your test site with CsvHelper 30.0.1 and set the "Input string delimiter" option to the empty value so that will help to import html fields values.
BR, Dmitrij

Votes for this answer: 1
 
Joel Mandell
Reply

Awesome 🎉 Thanks Nicolai and Dmitriy. Will try it out :)

 
Joel Mandell
Reply

This seemed to fix the issues. Thanks again :)

 

You must be logged in to post in the forum