Visual Studio

Welcome to the Visual Studio UserVoice site! Let us know what you would like to see in future versions of the Visual Studio suite of products. This site is for suggestions and ideas. If you need to file a bug, visit the Visual Studio Connect site: https://connect.microsoft.com/visualstudio.

We would also like to invite you to check out the Announcements section we have added to this site, where we will be posting special opportunities for you to participate in.

We look forward to hearing from you!

The Visual Studio Team
Terms of Service and Privacy Policy

NEW! Announcing Limited Preview for Visual Studio Online Code Search

I suggest you ...

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can vote and comment on it.

If it doesn't exist, you can post your idea so others can vote on it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  1. enable line comments in VB after the line continuation char (_)

    Just a very simple thing:

    I had an attribute and a field written on two lines like this:

    <DebuggerBrowsable(DebuggerBrowsableState.Never)> _
    Private _SomeField As String

    and wanted to add a line comment after the '_':

    ...State.Never)> _ 'My reason why

    I now get the following error: "Line continuation character '_' must be preceded by at least one white space and must be the last character on the line."

    My request now is to change the rule "...must be the last character on the line" to "...must be the last non-white-space character on that part of the line that does not belong…

    14 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      1 comment  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →

      Hey Chris,

      Excellent suggestion! When we introduced implicit line-continuation in VB2010 it was a very painful restriction that we had to leave in due to technical and schedule constrains that comments weren’t allowed after them. Happily, thanks to the improved parser architecture we use in Roslyn (a future version of VB/C#) we will be able to support it one day. In fact, in the Roslyn compilers comments are already supported after implicit line-continuation so I can write this:

      ’ Comment here

      Private _SomeField As String

      After we got that working it seemed reasonable to lift the restriction on normal, explicit line-continuation as well though we haven’t yet done so.

      While we do not currently have plans to address this issue in the next release of Visual Studio, we are reviewing suggestions now for future versions of VB in and beyond the Roslyn time-frame. We have not determined when that will…

    • Windows Phone 7 Training Kit for Developers

      VB code examples in the hands-on-labs (solutions and lab manuals).

      Windows Phone 7 Training Kit for Developers - RTM Refresh: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=ca23285f-bab8-47fa-b364-11553e076a9a

      14 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
      • [Planned] Make 'References' node visible in VB projects in Solution Explorer (like C#)

        In C#, references are visible in Solution Explorer/Navigator. In VB you have to hide invisibles to achieve this.

        14 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          0 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →

          Good news everyone!

          We’ve fix this for Visual Studio “14” and verified that the node is visible on our internal builds. I’ll update this suggestion when you can see the change in a public release.

          Regards,

          Anthony D. Green, Program Manager, Visual Basic & C# Languages Team

        • Add IntelliSense for XML Literals based on Imported xmlns

          The current feature that allows you to import an xmlns gives IntelliSense only when consuming XML via XElement or XDocument objects. You can type .< or .@ or ...< after an objcect of type XElement or XDocument and get IntelliSense for the available element and attribute names based on the XML Namespace.

          I've spoken at several user groups and code camps on this subject and the next thing that everyone wants to do is to get IntelliSense when composing XML Literals, but that's not currently available.

          Even if you have an xmlns imported and type something like the following, you…

          13 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            0 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
          • Allow Unsafe Code and Pointers in VB.

            Make it so pointers can be cast in unsafe contexts for complex interop coding ...

            Public Unsafe Function x(y as SomeStruct) As ResultStruct
            Dim p As Object? ' use Object? as an alternative to (void *)
            p = InteropCall(y?) ' use ? to get the address of something.
            Return CType(@p, ResultStruct) ' use @ to dereference.
            End Function

            12 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              2 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
            • Add NotifyPropertyChanged attribute (or keyword) to properties declared as auto-implemented properties

              I absolutely love using auto-implemented properties and the removal of the need to declare a backing variable.

              Public Property MyProperty As String

              However, for classes that implement INotifyPropertyChanged, I can't use auto-implemented properties, and instead have to write the more verbose:

              Private _myProperty As String
              Public Property MyProperty As String
              Get
              Return _myProperty
              End Get
              Set(value As String)
              _myProperty = value
              RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("MyProperty"))
              End Set
              End Property

              Multiply this by a few dozen properties, and this gets a little tedious (even with code snippets), much too verbose to read, and increases the surface area for typo bugs.

              I…

              12 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                1 comment  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
              • Add some Tutorial Projects

                Add some tutorial projects for those poeple who are new to vb.net/2011 get to know what it is and how it works n stuff encouraging them to get into programming and explore new ideas also making the process user friendly. The easiest way to do this by using sample projects like "HelloWorld" and implementing into vb as a tutorial project with basic fucktion like If Fucntions , Select Case and loop functions etc... basically Add more of some practical related tutorials :)

                11 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  0 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                • Do Not Collapse Comments

                  It would be nice if the comments simply did not collapse with CTRL+M+O. That or if there is a blank space between two blocks of comments. Do not treat them as 1. But instead it will collapse the entire section even though comments may not be a part of the one above it (obv limitation of VB because they do not have multi-line comments). I'm sure if we could just have a more robust commenting system. Things would have been peachy and I may not have switched to C#.
                  This should be simple, and to me already done as the…

                  10 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    1 comment  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                  • One Line Initialization

                    I have a suggestion for a possible syntax improvement in visual basic.net. It's towards the initialization portion of a one line multiple declaration. Here is an example:

                    'Syntax:
                    Dim a, b, c As Integer = 5

                    'Output:
                    'a = 5
                    'b = 5
                    'c = 5

                    Attached is a file of an example where I would want to use a one line initialization. Take a look at the test scores(test1, test2, test3). An easier way to declare those would be:

                    Dim test1, test2, test3 As Double = -1

                    10 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      0 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                    • Allow the subject of a With block to be referenced in the block using a new keyword WithRef

                      Primarily, this is a convenience mechanism to avoid having to declare a variable in certain cases.

                      Proposed:

                      Function ReturnNewCheese(cheeseType as CheeseEnum) as Cheese
                      With New Cheese
                      .CheeseType = cheeseType 'property
                      .Curdle 'method
                      Helpers.DoSomethingWithCheese(WithRef)
                      Return WithRef
                      End With
                      Exit Function

                      Now:

                      Function ReturnNewCheese(cheeseType as CheeseEnum) as Cheese
                      Dim x as New Cheese
                      With x
                      .CheeseType = cheeseType
                      .Curdle
                      Helpers.DoSomethingWithCheese(x) 'requires explicit variable declaration
                      End With
                      Return x 'requires explicit variable declaration
                      Exit Function

                      10 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        under review  ·  5 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                      • Fix opcodes from vb compiler when initialize an array and function local variant

                        Hi guys,

                        I want to point out some flaw opcodes that vb compiler create and hope VB dev team have sometime to fix those and make VB better performance.

                        1. Array

                        When I create an array like this "Dim Data(input.Length - 1) As Char", compiler will rewrite to "Dim Data(input.Length - 1 + 1) As Char"; it's unnecessary 4 bytes and you loss 4 of 64 bytes if you aim to create a tiny method.

                        2. Function local variant

                        VB function away has self local variant like "Function foo() As string" will have "Dim foo As String" even it's unused…

                        9 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          0 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                        • 9 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            10 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                          • Collection initializers for read-only collection properties in VB.NET

                            I'm very happy that Microsoft is committed to VB.NET have the same features as C#.
                            One feature I use extensivle in C# is collection initializers. I've just noticed that VB.NET supports these but not for read-only class properties.
                            I found at http://msdn.microsoft.com/en-us/library/dd293617.aspx that if a collection has a an Add method, it is used to initialize the variable. This should also apply to read-only collection properties.

                            Here is compilable C# code showing the feature working:

                            using System;
                            using System.Collections.Generic;

                            namespace ConsoleApplication3
                            {
                            class Class1
                            {
                            private readonly List<Int32> list = new List<Int32>();

                            public List<Int32> ListProp
                            {
                            get
                            {
                            return this.list; …

                            8 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              under review  ·  2 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                            • Extend for each loops to be able to handle Linq clauses (eg. where, order by)

                              At the moment, we have to use 2 lines to do the following...

                              Dim ps = From p in People Where p.Active=True Order By p.Surname, p.FirstName

                              For Each p In ps ...

                              It would be neater to be able to write code such as

                              For Each p In People Where p.Active=True Order By p.Surname, p.FirstName

                              I don't see why this can't work with C# too.

                              8 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                1 comment  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                              • Add to Visual Basic the ability to declare a new strong type in terms of another type

                                Many other languages have 'strong' typing. Java, C#, and VB have strong typing regarding classes, but not for the primitive numeric types. It can be a great aid to making large-scale industrial and commercial software. For example, if one could declare two different types Apples and Oranges:

                                Type Apples Is New Integer
                                Type Oranges Is New Integer
                                ...
                                Dim A As Apples = 3
                                Dim B As Oranges = 4

                                then accidentally mixing arithmetic or assignment between these types would be prevented by the compiler, e.g. the assignment:

                                A = B

                                would be rejected by the compiler (and Intellisense) as…

                                8 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  4 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                                • Allow multiple languages (C#,VB,F#) in the same project

                                  Now with Roslyn this could be possible.

                                  It's very annoying that you have to convert C# to VB just to include a class/function/snippet in your VB project, and viceversa.
                                  If all code compiles to MSIL, then why we cannot use different NET languages in the same project.

                                  Another example is a function in F#, you may want to use some functions that will simplify/improve your project (C#/VB) and it's better to do it in a functional language, but you don't want to code all your project in F#, nor want to create a separate project in F# with its DLL…

                                  7 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    1 comment  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                                  • The idea: "Visual Basic".

                                    Summary: Bring back an Independent VB IDE, capable to create all kind of applications and solutions. Mobile, WinRT, WinForms, Web, Installers, images and other media files, help files, reports and charts. Capable to do it by using WebForms, Web MVC/Razor, Silverlight (not just Lightswitch but Silverlight really), and WPF of course. And if Microsoft can do it, OS multiplatform. This time, the IDE must be purely for the VB language.

                                    BASIC as a programming language is not "just for kids", as is often read in forums and sometimes hear from other programmers. This is a high-level language, easy understanding and…

                                    7 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      2 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Add new initialization way of memvars

                                      Add new initialization way of memvars:
                                      x,y = 0
                                      x,y,z = 1,2,3
                                      a,b,c = MyFunction()

                                      Function MyFunction() as byte, byte, int
                                      return 1,2,3

                                      6 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        1 comment  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                                      • vb.net: make generated code-artefacts like class, sub, fields, methods: public, protected or private

                                        The default-behaviour if you type something new or unknown in your code and you work with:
                                        - "generate class"
                                        - "generate property"
                                        - "generate field",
                                        - "generate method"
                                        do some random things.

                                        Often you get a "Class MyClass..." without specification of "public", "private", or "protected".

                                        A Class-Field becomes a "Dim myField"... instead of a "Private myField"

                                        More and more frameworks using reflection to work and it's not really clear whats the default of an empty directive or a dim instead of private
                                        does.

                                        It is not really easy to see those things if you search issues in your code...
                                        So…

                                        6 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          0 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Addition of a 'With Each' Statement

                                          Rather than having to a With statement within a For statement, users would have the ability to consolidate the two statements.

                                          Example:
                                          Dim BigSpenders = (From Customer In Customers Where Customer.DollarsSpent > 1000 Select Customer)
                                          With Each Customer In Customers
                                          .RewardsProgram = True
                                          .StoreCredit = 50
                                          .Discount = 15
                                          Next

                                          6 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            2 comments  ·  Languages - Visual Basic  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base