icsharpcode / CodeConverter

Convert code from C# to VB.NET and vice versa using Roslyn
https://icsharpcode.github.io/CodeConverter/
MIT License
826 stars 216 forks source link

Issue/172 #1110

Closed GrahamTheCoder closed 2 months ago

GrahamTheCoder commented 3 months ago

Spike relates to #172 Best solution available is probably to match the vbhtml structure against the generated vb document (which follows a simple pattern), then manually call to convert each part of the syntax tree separately so it's easy to construct the final document without any manual parsing - after which the normal converter functions can be used.

I haven't found the correct settings to get the vb document yet. It may even need an older version of the library that targeted dot net framework

GrahamTheCoder commented 2 months ago

It's likely a fair bit of work to get what could turn out to break next version since it depends on internals of another library. I don't believe there's a public api that allows this. If someone wants to continue this route, I will accept the PR and advise where I can, but I'm not planning to take this any further myself.