Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Cory Smith
    @DualBrain
    @AnthonyDGreen The latest video (JSON literals) is AWESOME!
    Kathleen Dollard
    @KathleenDollard
    Hi folks, I'm really happy we'll have this place for VB folks to ask questions and talk about where VB is going.
    Cory Smith
    @DualBrain
    Still getting used to gitter myself; so want to make sure that everyone is aware that there are several "rooms" related to VB.NET: https://gitter.im/VB-NET to see the full list. Please be sure to check out and join the other rooms you might be interested in.
    Marcelo Garay
    @MarceloJGaray
    Are there any plans to add VB.NET to ASP.NET Core 3.0 in the near future? I’m not talking about vbhtml or Web Pages, but creating new ASP.NET Core and Web API VB.NET projects using VB.NET for the code behind files. I would argue this is the biggest show stopper for Web Apps VB.NET developers trying to move to new technologies like .Net Core (and yes I know you can create console apps and class libraries using VB.NET).
    Kathleen Dollard
    @KathleenDollard
    You can do this today. There just aren't any templates, because the whole story is a bit complex. Much of that complexity is on the client side. Here's a link: https://devblogs.microsoft.com/vbteam/combining-angular-visual-basic-and-net-core-for-developing-modern-web-apps/ If someone wants to put a template together on this, I'm happy to get it publicize it and work on a good OSS location for it (which might be in ASP.NET)
    Marcelo Garay
    @MarceloJGaray
    Hi Kathleen, thank you for the info. I did read the blog post and downloaded the project. What makes it a little confusing to me is that the Web API code is mixed up with an Angular project. Do you know if there are any examples like this one but with the VB.NET Web API project separated from the SPA client project? I would also be very interested on seeing something similar but with a Blazor project. Thanks!
    Cory Smith
    @DualBrain
    @MarceloJGaray I'm in the process of trying to wrap my head around Blazor as well; unfortunately, I really haven't found very many examples and it appears that a lot of the #Blazor (client side) stuff is a little behind the release of VS2019. There is a ton of converstation taking place in the https://gitter.im/aspnet/Blazor; so much so that I've kind of had to stop monitoring it due to being too busy with other commitments. However, just spending a few days monitoring it was very informative and there seems to be a lot of great people working on the project. In the end, I too would like to see some really solid samples around Blazor; if after getting my head wrapped around all this, I might put something together if someone else doesn't get to it first. (It's kind of foreign to me since I'm primarily a native client dev... where web development is done out of necessity, not by choice. ;-) )
    Kathleen Dollard
    @KathleenDollard

    One of the folks working on Visual Studio asked me the following, and I wanted to get other people's opinion. Thoughts?


    I’m working on a “Target-typed completion” feature where the user can reduce the completion list down to only items of the type expected at a given location (or implicitly convertible types).

    For completion in C#, see the first gif in dotnet/roslyn#34655

    There would normally be tons more items in the list, but the user has clicked the “Target type match” filter at the bottom of the completion popup (left/right arrows in this screenshot), so the list has removed everything except these symbols which are actually valid at that location.

    For completion in Visual Basic, I’ve gone and done the same experiment and I get a list with over 100 extra symbols, all from the Microsoft.VisualBasic assembly. While technically valid at a location expecting an Integer, these extra items make it hard to find the symbols that were easily discovered in C#.

    So I think the questions are:

    • Should we be blocking some or all of these symbols from showing up?
    • If so, what heuristics should it be based on? Belonging to Microsoft.VisualBasic? Some other heuristic (or combination of heuristics)?

    Please let me know what you think. 😊

    Not exactly language.
    Cory Smith
    @DualBrain
    Would this be affected (or could be) by which Option settings are enabled/disabled? In other words, are the 100 extra symbols showing up because of late binding? If Option Strict On, would these be appropriately narrowed?
    (And, in VB, the line between UI Tools and Language is very blurred. ;-) )
    Kathleen Dollard
    @KathleenDollard
    It's not an Option Strict issue. VB just has lots of things that are Integer (for example) that are in scope pretty much all the time. C# doesn't have this.
    Cory Smith
    @DualBrain
    Ah... gotcha... all of the "helper" variables (vbNNN). Is there the ability to have it be "just my stuff"? Where it would only contain things that are clearly part of the active source (solution) and include elements that are clearly api specific (as in the animated example you pointed to)?
    Kathleen Dollard
    @KathleenDollard
    I think that is pretty much what we'd get if we ignore the VB Runtime. That's what is being suggested.
    Anthony D. Green
    @AnthonyDGreen
    Love the idea of less stuff in the IntelliSense list. I don't have a clearly thought out idea of the rules.
    Ignoring the VB runtime members might be good.
    But like, I've recently come to appreciate that I never want to see anything in the list related to LINQ. I know there's a Where and a Select and like 50 other things around and I don't care to see them. Kinda miss Common & All. The IntelliSense doesn't need to be driven by the Option Strict setting at all, but you may want to look at only giving symbols with a Widening conversion, particularly widening reference conversions for complex times and maybe even identity conversions for the primitive value types. If it comes up.
    Paul M Cohen
    @paul1956
    I have been playing with 16.1 preview 3 and Comment after Line Continuation works as expected in .NET SDK projects but not in the IDE of a test project. Programmatically is works everywhere. Formatting is very strange in the IDE. I hate to complain because the ability to put comments virtually anywhere really aids in documentation. Identical programs after entered in VS IDE
        private static readonly Regex s_originCategoryCodeTextExpression = new Regex
                (
                @"^\s*"
                // Match a [optional project number prefix 'ddd>'], single letter + colon + remaining filename, or
                // string with no colon followed by a colon.
                + @"(((?<ORIGIN>(((\d+>)?[a-zA-Z]?:[^:]*)|([^:]*))):)"
                // Origin may also be empty. In this case there's no trailing colon.
                + "|())"
                // Match the empty string or a string without a colon that ends with a space
                + "(?<SUBCATEGORY>(()|([^:]*? )))"
                // Match 'error' or 'warning'.
                + @"(?<CATEGORY>(error|warning))"
                // Match anything starting with a space that's not a colon/space, followed by a colon. 
                // Error code is optional in which case "error"/"warning" can be followed immediately by a colon.
                + @"( \s*(?<CODE>[^: ]*))?\s*:"
                // Whatever's left on this line, including colons.
                + "(?<TEXT>.*)$",
                RegexOptions.IgnoreCase
                );
        Private Private ReadOnly s_originCategoryCodeTextExpression As Regex = New Regex(
     _  ' Beginning of line and any amount of whitespace.
        "^\s*" _
     _ ' Match a [optional project number prefix 'ddd>'], single letter + colon + remaining filename, or
     _ ' string with no colon followed by a colon.
          & "(((?<ORIGIN>(((\d+>)?[a-zA-Z]?:[^:]*)|([^:]*))):)" _
     _ ' Origin may also be empty. In this case there's no trailing colon.
          & "|())" _
     _ ' Match the empty string or a string without a colon that ends with a space
          & "(?<SUBCATEGORY>(()|([^:]*? )))" _
     _ ' Match 'error' or 'warning'.
          & "(?<CATEGORY>(error|warning))" _
     _ ' Match anything starting with a space that's not a colon/space, followed by a colon. 
     _ ' Error code is optional in which case "error"/"warning" can be followed immediately by a colon.
          & "( \s*(?<CODE>[^: ]*))?\s*:" _
     _ ' Whatever's left on this line, including colons.
          & "(?<TEXT>.*)$",
           RegexOptions.IgnoreCase)
    Kathleen Dollard
    @KathleenDollard
    @paul1956 did you report this on GitHub.com/dotnet/roslyn?
    Paul M Cohen
    @paul1956
    @KathleenDollard No I didn't because the feature is more important than the odd formatting and there are still MSBuild and IDE issues just enabling it without issues.
    @KathleenDollard The enabling issues were reported but not under Roslyn.
    Cory Smith
    @DualBrain
    I had a wierd "repeat key" issue in VS19 occur last night in my live-stream; I had a writeline using a literal string that was about 40 characters long. I duplicated this line and set out to replace all the characters with a literal string containing nothing but spaces. When I toggled the insert key and then held down the spacebar... it worked for the about the first 10 characters and then randomly started skipping existing characters placing spaces randomly for the rest of the string. Anyone else ever see something like this?
    Marcelo Garay
    @MarceloJGaray
    Are there any specific plans in the .Net Core roadmap (either 3.1 or 5.0) to add the ASP.NET Core VB.Net templates to Visual Studio? I haven't been able to find a clear answer on this topic. Thanks!
    Jeff Bowman
    @InteXX
    Hi Marcelo, you may want to follow this thread. It's received quite a bit of traffic lately and in it, @KathleenDollard has promised a RoadMap update soon.
    Marcelo Garay
    @MarceloJGaray
    Thanks, just read the thread. It mentions work being done for WinForms/WPF, but it's still not clear about ASP.NET CORE templates
    Jeff Bowman
    @InteXX
    Right, I guess ASP.NET Core is a bit off-topic for that one. I was thinking more about Kathleen's RoadMap promise in the context of your question.
    MarcusMM2
    @MarcusMM2
    is it possible to make "optional" optional, it is redundant, "optional i as integer = 2" has not more info for compiler as "i as integer = 2"
    Cory Smith
    @DualBrain
    @MarcusMM2 I think that's a pretty good idea. ;-)
    Paul M Cohen
    @paul1956
    That is how C# does it. I think I have seen this proposal under Roslyn but I can't find it.
    Cory Smith
    @DualBrain
    @MarcusMM2 Has the optional Optional been added as a proposal? If so, can you provide us with a full link so we can (at minumum) provide a thumbs up?
    MarcusMM2
    @MarcusMM2
    @DualBrain I dont know if it has been added as proposal, it is my personal feeling for many years now because I always have to type the "ugly" word "optional"
    I have meant (at) Cory Smith
    Paul M Cohen
    @paul1956
    It would be a relatively trivial change to the parser, I don't know if there are any ripple effects without looking at the code.
    rskar-git
    @rskar-git
    Hi folks, this (https://stackoverflow.com/questions/60021378/calling-constructor-from-shared-method-c-to-vb-net/) got me wondering: Would it be a good idea for the Call statement to allow for "naked" object creation expressions?
    Paul M Cohen
    @paul1956
    @rskar-git before I did "naked" object creation I would opt for "Discards". The object still potentially needs to be disposed so you really need the variable. I think it is clearer that and more VB like with the Dim.