-
Mar 12th, 2022, 10:59 PM
#1
Thread Starter
Junior Member
Blazor and VB.NET
I'd like to write my Blazor controllers in VB.NET.
I seem to recall some time ago coming across a hybrid ASP.NET sample app that someone had put together that ran its startup functions in C# but then quickly transitioned everything to VB. Alas, I'm not able to find it again. There's this technique, but it applies to the older ASP.NET Core—in fact you can't even install the old Microsoft.AspNetCore.All package—and we're all the way on .NET 6 by now.
Does anyone have any suggestions?
Thanks,
Jeff Bowman
Fairbanks, Alaska
-
Mar 13th, 2022, 12:01 AM
#2
Re: Blazor and VB.NET
I would think that your only option would be to write C# code that calls library methods written in VB.
-
Mar 14th, 2022, 12:11 PM
#3
Re: Blazor and VB.NET
When last I checked, Blazor is not supported in VB.Net, only C#. If you want to force the issue, you might be in for a world of pain.
Thankfully though, like any .Net solution, you can mix VB.Net and C# projects in the same solution. You should be able to write a lot of backend stuff in VB.Net.
-
Mar 14th, 2022, 09:31 PM
#4
Thread Starter
Junior Member
Re: Blazor and VB.NET
Originally Posted by jmcilhinney
I would think that your only option would be to write C# code that calls library methods written in VB.
That was my first thought as well.
I'll keep looking for a way to defeat that limitation. If I find one I'll report back here.
Thanks,
Jeff Bowman
Fairbanks, Alaska
-
Mar 14th, 2022, 09:33 PM
#5
Thread Starter
Junior Member
Re: Blazor and VB.NET
Originally Posted by Niya
You should be able to write a lot of backend stuff in VB.Net.
That'll get me by until I find a way to do it directly.
Thanks,
Jeff Bowman
Fairbanks, Alaska
-
Mar 16th, 2022, 02:32 AM
#6
New Member
Re: Blazor and VB.NET
Hi Jeff, as far as I know until the second I reply to this thread, blazor is still specific to c#, although we can make Progam.vb but the rest like razor page, razor view and razor component are still special for c# so they can be compiled
I'm quite surprised why you're interested in blazor, something that's still new. Most developers have years of experience with javascript and its libraries/frameworks, so they don't need web assembly. And who else will know that Blazor can be successful? I think you also know that the UWP, which has been around for a long time, has not been successful, especially since the 'death' of Windows Phone. The same I think also applies to NET. MAUI
And VB can be used for ASP.Net Core MVC/Web API projects. Including most of the minimal APIs introduced by NET 6. If I have time, maybe I'll create a thread about why we stick with VB and can still exist without having to 'switch' to c#
-
Mar 16th, 2022, 08:16 AM
#7
Re: Blazor and VB.NET
Originally Posted by djancuk
The same I think also applies to NET. MAUI
Really? You think MAUI is "dead"? I'm not so sure. Especially since it hasn't been actually released yet. It's close though. The problem with UWP is that it was aimed at the Windows ecosystem exclusively. That's why it's dead. MAUI on the other hand has been done from the ground up, base on Core, and is intended to be cross-platform from the get-go, rather than as an after-thought. My only consternation on it is that it doesn't (yet) include support for Linux system, but it is what it is I guess.
As for switching to C# ... if you're fluent in VB.NET ... it's not really that difficult.
-tg
-
Mar 16th, 2022, 08:20 AM
#8
Re: Blazor and VB.NET
Originally Posted by djancuk
I'm quite surprised why you're interested in blazor, something that's still new. Most developers have years of experience with javascript and its libraries/frameworks, so they don't need web assembly
WASM is generally faster than Javascript, can be a strongly typed language e.g. C#, and doesn't rely on the current Javascript ecosystem of npm packages, webpack etc. as far as I am concerned these are all good reasons to consider it rather than JAvascript.
-
Mar 16th, 2022, 09:04 AM
#9
New Member
Re: Blazor and VB.NET
Originally Posted by techgnome
Really? You think MAUI is "dead"? I'm not so sure. Especially since it hasn't been actually released yet. It's close though. The problem with UWP is that it was aimed at the Windows ecosystem exclusively. That's why it's dead. MAUI on the other hand has been done from the ground up, base on Core, and is intended to be cross-platform from the get-go, rather than as an after-thought. My only consternation on it is that it doesn't (yet) include support for Linux system, but it is what it is I guess.
As for switching to C# ... if you're fluent in VB.NET ... it's not really that difficult.
-tg
I mean NET. MAUI is the same as Blazor, still new. There is no guarantee of success as with WinForms, ASP.NET MVC/Web API, and success I mean widely used.
Regarding 'switching' to c#, maybe in a different thread we will discuss
-
Mar 16th, 2022, 03:56 PM
#10
Thread Starter
Junior Member
Re: Blazor and VB.NET
Originally Posted by techgnome
As for switching to C# ... if you're fluent in VB.NET ... it's not really that difficult.
Working in C# helps me appreciate VB all that much more 🙂
-
Mar 16th, 2022, 03:59 PM
#11
Thread Starter
Junior Member
Re: Blazor and VB.NET
Originally Posted by djancuk
I'm quite surprised why you're interested in blazor, something that's still new.
Because it works today and it fits the bill for an app I'm building.
Originally Posted by djancuk
... maybe I'll create a thread about why we stick with VB and can still exist without having to 'switch' to c#
Sure, sounds interesting.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|