Vazor icon indicating copy to clipboard operation
Vazor copied to clipboard

@RenderBody not working on Linux

Open mmkathurima opened this issue 11 months ago • 10 comments

This first picture of a small demo application is running on a Windows server image This second picture is the same application but on Linux server image As can be seen, the content of the @RenderBody, in this case the contents of Index.vbxml.vb is not rendered on Linux. @VBAndCs kindly assist on this.

mmkathurima avatar Jan 15 '25 21:01 mmkathurima

As I said, I have zero knowledge of Linux, so I can't help in this. The only advice I can give you, is to review the setup in the Main subroutine the program module, to make sure that it is OK for Linux.


From: mmkathurima @.> Sent: Wednesday, January 15, 2025 9:11 PM To: VBAndCs/Vazor @.> Cc: Mohammad Hamdy Ghanem @.>; Mention @.> Subject: [VBAndCs/Vazor] @RenderBody not working on Linux (Issue #23)

This first picture of a small demo application is running on a Windows server image.png (view on web)https://github.com/user-attachments/assets/52a67ea0-cce0-4488-a3aa-1740e2630223 This second picture is the same application but on Linux server image.png (view on web)https://github.com/user-attachments/assets/76d0781e-d64d-46a6-af4f-565c7a255448

As can be seen, the content of the @RenderBody, in this case the contents of Index.vbxml.vb is not rendered on Linux.

@VBAndCshttps://github.com/VBAndCs kindly assist on this.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/Vazor/issues/23, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVWFAN33X6C2GPYBQ4D2K3FHZAVCNFSM6AAAAABVIET4Q2VHI2DSMVQWIX3LMV43ASLTON2WKOZSG44TAOJQHEYDGNY. You are receiving this because you were mentioned.

VBAndCs avatar Jan 15 '25 23:01 VBAndCs

@VBAndCs I have looked into the issue and I believe it lies in the ZML module, specifically the ZMLExtentions.vb file at the line:

Public Const Ln = vbCrLf

I suggest changing it to the below, for the sake of compatibility across operating systems:

Public ReadOnly Ln As String = Environment.NewLine

I have not raised a pull request as I do not know how to.

mmkathurima avatar Jan 19 '25 18:01 mmkathurima

@mmkathurima

vbCrLf

That's a good find.

You can raise a PR by editing the file at this repo, which forks the repo to your account. You'll raise the PR from there when you save the changes.

InteXX avatar Jan 19 '25 20:01 InteXX

Nice catch. I still has issues to log in to this account, but I will fix the issue as you suggested and upload it using the git console. Thanks.


From: mmkathurima @.> Sent: Sunday, January 19, 2025 6:28 PM To: VBAndCs/Vazor @.> Cc: Mohammad Hamdy Ghanem @.>; Mention @.> Subject: Re: [VBAndCs/Vazor] @RenderBody not working on Linux (Issue #23)

@VBAndCshttps://github.com/VBAndCs I have looked into the issue and I believe it lies in the ZML module, specifically the ZMLExtentions.vb file at the line:

Public Const Ln = vbCrLf

I suggest changing it to the below, for the sake of compatibility across operating systems:

Public ReadOnly Ln As String = Environment.NewLine

I have not raised a pull request as I do not know how to.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/Vazor/issues/23#issuecomment-2600971605, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVSASMHFYYR3LBNVT6D2LPVEVAVCNFSM6AAAAABVIET4Q2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBQHE3TCNRQGU. You are receiving this because you were mentioned.Message ID: @.***>

VBAndCs avatar Jan 19 '25 20:01 VBAndCs

@VBAndCs

I still has issues to log in to this account

Hm, I thought you fixed that.

InteXX avatar Jan 19 '25 20:01 InteXX

Well noted @InteXX. Kindly feel free to create the PR on my behalf, though I believe @VBAndCs would need his account to approve the PR.

mmkathurima avatar Jan 19 '25 22:01 mmkathurima

@mmkathurima

feel free to create the PR on my behalf

Thank you, and I'd love to, but I'd much rather see you learn how to do a PR ;-)

InteXX avatar Jan 20 '25 06:01 InteXX

I've updated ZMl and Vazor packages to fix this issue. https://www.nuget.org/packages/ZML/1.1.3 https://www.nuget.org/packages/Vazor/2.1.0 I haven't updated the Vazor extension yet, so you have to update thee packages in your new projects manually (same as existing projects of course). I wanted to update Vazor to .NET 9, but it gave me some errors, and I don't have time right now. I will look into it later and update the VS extension. @InteXX: If you alteady updated your copy of Vazor, I'd appreciate any advices here.

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avast.comhttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

VBAndCs avatar Jan 20 '25 14:01 VBAndCs

I have updated dependencies and looks ok so far:

Image

mmkathurima avatar Jan 20 '25 15:01 mmkathurima

@VBAndCs

If you alteady updated your copy of Vazor

I haven't gone past net8.0, as the package for VB.NET design-time EF Core is itself still at net8.0.

The sample project I worked up is here.

What problems did you run into when moving to net9.0?

InteXX avatar Jan 20 '25 18:01 InteXX