[{"data":1,"prerenderedAt":117},["ShallowReactive",2],{"/2026/01/05-vb.net-property-is-of-unsupported-type":3},{"id":4,"title":5,"body":6,"date":108,"description":85,"extension":109,"meta":110,"navigation":111,"path":112,"robots":113,"seo":114,"stem":115,"__hash__":116},"posts/2026/01/05 VB.NET-property-is-of-Unsupported-Type.md","05 VBNET Property Is Of Unsupported Type",{"type":7,"value":8,"toc":105},"minimark",[9,18,25,28,31,33,48,50,53,55,58,67,69,72,86,88,91,100,102],[10,11,13],"post-title",{":date":12},"date",[14,15,17],"h1",{"id":16},"vbnet-property-is-of-unsupported-type","VB.NET Property is of Unsupported Type",[19,20,21],"notes",{},[22,23,24],"p",{},"This is a repost from my old blog. First posted in 2/15/2021.",[26,27],"br",{},[22,29,30],{},"Backward compatibility is hard and there is a saying \"The only constant is change\". The error message this time makes me scratch my head for an hour or so.",[26,32],{},[22,34,35,36,47],{},"I updated the CsvHelper package in one of my applications to 23.0.0 and immediately notice errors. Looking at the change log (",[37,38,41],"span",{"className":39},[40],"text-blue-600",[42,43,44],"a",{"href":44,"rel":45},"https://joshclose.github.io/CsvHelper/change-log",[46],"nofollow",") and indeed there is a breaking change. I'm aware of the parameter change to a struct as specified in the change log and made the required change.",[26,49],{},[22,51,52],{},"For somewhat reason, Visual Studio didn't like the configuration part, for example the PrepareHeaderForMatch delegate, in which it can't access the property of the struct argument. The error message says: Property 'CsvHelper.PrepareHeaderForMatchArgs.Header' is of unsupported type.",[26,54],{},[22,56,57],{},"This happens on Visual Studio 2017. So, I visited the GitHub repository:",[22,59,60],{},[37,61,63],{"className":62},[40],[42,64,65],{"href":65,"rel":66},"https://github.com/JoshClose/CsvHelper/blob/master/src/CsvHelper/Delegates/PrepareHeaderForMatch.cs",[46],[26,68],{},[22,70,71],{},"and noticed the following code:",[73,74,75],"code-block",{},[76,77,82],"pre",{"className":78,"code":80,"language":81},[79],"language-text","public string Header { get; init; }\n","text",[83,84,80],"code",{"__ignoreMap":85},"",[26,87],{},[22,89,90],{},"After searching online, seems like the 'init' setter is the issue. It is supported in VB 16.9 which is immediately available in Visual Studio 2019.",[22,92,93],{},[37,94,96],{"className":95},[40],[42,97,98],{"href":98,"rel":99},"https://docs.microsoft.com/en-us/dotnet/visual-basic/whats-new/#visual-basic-169",[46],[26,101],{},[22,103,104],{},"When I opened the code in Visual Studio 2019, the error went away. So due to time constraint, I switch to VS 2019 for that particular application.",{"title":85,"searchDepth":106,"depth":106,"links":107},2,[],"2026-01-05T00:00:00.000Z","md",{},true,"/2026/01/05-vb.net-property-is-of-unsupported-type",null,{"title":5,"description":85},"2026/01/05 VB.NET-property-is-of-Unsupported-Type","KGChtKCPC_9tZGmy04Izzq0QBaidAuww8tvxKwgeYXI",1785167451905]