Inside the Microsft.VisualBasic.Strings namespace, not all methods from the .NET framework have been implemented. Left has been, but Trim, Right, Mid etc. haven't
Is this something that can be added?
@AnthonyDGreen ?
@stephentoub @VSadov is there a compat issue? or is it just a work item that needs to be done?
is there a compat issue? or is it just a work item that needs to be done?
I believe the request is to port more functionality to .NET Core in https://github.com/dotnet/corefx/blob/master/src/Microsoft.VisualBasic/src/Microsoft/VisualBasic/Strings.vb.
I think it is just work.
VB runtime historically has smaller public surface in Core FX than in .Net FX.
That is because it was derived from Compact FX version that intentionally dropped some functionality just to reduce the size.
It seems like work we should do.
Have we heard about this from customers?
Is there anymore news on this?
There's definitely a need to port more Visual Basic functions from netfx to corefx. I want to move an application to .NET Core that heavily relies on the Microsoft.VisualBasic assembly. I want the functions FileGet, DateDiff, Fix, Mid, Len, among many others, to be available in .NET Core.
As far as I could see using Reflector, many of these functions are purely managed code. Reverse engineering these functions might be a technical option, but that's not what I want.
Can we assist in porting? Is it possible to share parts the netfx Microsoft.VisualBasic code?
@EdwinEngelen yes we are working to make the sources public soon and will ask for help porting/writing tests.
https://github.com/dotnet/corefx/issues/29878
What's 'soon'? Will it be within days, weeks or months? That info would be nice to have for our own planning. Thanks.
I hope the code can go up this week if there are no issues found - @rbhanda can give an update. After that it is a matter of how quickly folks can port it/write tests. Then it will be in master, so it would likely not ship until 3.0 next year: depending on your project, perhaps you could work against master meantime, or perhaps you could paste in the implementations into your project temporarily until then.
Linking a Roslyn issue where we tracked a number of these APIs
Closing as this is tracked in the master issue https://github.com/dotnet/corefx/issues/31181
@kaiukdevelopment perhaps you'd like to offer a PR using the info there.
You can use a custom made port of the library named Ported.VisualBasic:
No any warranties on code correctness after porting, just use on your own risk.
Imports Ported.VisualBasic
Strings.Trim(S), Strings.Mid(...), etc
More details:
https://github.com/dotnet/corefx/issues/31181#issuecomment-436422404
You can find a compiled assembly here:
https://github.com/bimonsubio1984/CommonCore/releases/download/First/Ported.VisualBasic.dll
Or build from source by yourself.
The Visual Basic Runtime is being ported to .NET Core 3.0, which is issue dotnet/corefx#31181
Our plans for the Visual Basic Runtime are also discussed here
Most helpful comment
@EdwinEngelen yes we are working to make the sources public soon and will ask for help porting/writing tests.
https://github.com/dotnet/corefx/issues/29878