Visual Studio IDE

Announcement: This forum has been migrated to provide our customers one convenient and responsive system for all feedback. You can now suggest new ideas, browse and vote on existing ideas in the Visual Studio Developer Community. To learn more about the migration to Visual Studio Developer Community please check out the release blog post.

We’d like your suggestions and ideas to help us continuously improve future releases of Visual Studio, so we’ve partnered with UserVoice, a third-party service, to collect your feedback. Please do not send any novel or patentable ideas, copyrighted materials, samples or demos for which you do not want to grant a license to Microsoft.

This site is for feature suggestions; if you need to file a bug, you can visit our Developer Community website to get started.

Note: your use of the portal and your submission is subject to the UserVoice Terms of Service & Privacy Policy and license terms.

We look forward to hearing from you!
- The Visual Studio Team

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 support and comment on it.

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

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

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Expand the Things That Can Be Renamed

    It would be lovely if I could rename (via ctrl+r, ctrl+r) dictionary accessor notation. My use case would be something like ViewState[ "someKey" ]. If I highlight that in it's entirety, it would be nice to be able to use the rename to change all instances to ViewState[ "someOtherKey" ]. It would have to require selection of the braces at the least to avoid mangling matching text in other strings.

    3 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
    • Attribute based decorators

      Python allows you to use an @mydecorator syntax (which is effectively an attribute that can be placed above a method).. This indicates when executing the decorated method should get wrapped it in an outer method. it makes AOP programming really easy. It also makes it explicit that the method or methods within a class have been decorated and with what. Decorators can also be chained by using multiple attributes.

      In C# the wrapping would have to be performed at compile time rather than at execution time, but that would still be very very useful.

      1 vote
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
      • Shortcut for creating tasks

        Map this:

        static Task MethodAsync() {
        Task A = new Task(() => {
        Console.WriteLine("A:begin");
        for (int i=0; i < 10000; i++) {
        Console.WriteLine("A:{0}", i);
        }
        Console.WriteLine("A:end");
        doneA = true;
        });
        A.Start();
        return A;
        }

        Into this:

        static TaskNew MethodAsync() {
        Console.WriteLine("A:begin");
        for (int i=0; i < 10000; i++) {
        Console.WriteLine("A:{0}", i);
        }
        Console.WriteLine("A:end");
        doneA = true;
        }

        0 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
        • It would be nice to be able to have arrays of strings in structs.

          It would be nice to be able to have arrays of strings in structs.

          1 vote
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
          • eliminate the using clause

            Instead of requiring using blocks, use the ~ operator in front of variable. Call dispose when the object goes out of scope.

            ~DataContect myDB = ....
            ~TextReader myfile = ...

            1 vote
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
            • null-conditional operator should initialize out var

              aa?.bb(out var cc)

              is a legal syntax, but you end up with a 'cc' that you cannot access since it can be uninitialized.

              If null-conditional operator is used, I think there would be no harm if compiler initializes out var variables to the default value (null).

              1 vote
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
              • new namespace

                namaspace vsualbasic

                1 vote
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                • Make C# local functions stand out in the editor

                  C# local functions is a nice feature that I like to use. But I find it difficult to visually identify such a function within a method. I would be nice to make them stand-out, using a different background, a border, or a left bar...

                  2 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                  • Add the "isnt" keyword

                    Simple suggestion, please add a new keyword: "isnt"

                    This would make code clearer and more readable. So rather than

                    if (!(myObject is ClassType)) { ... }

                    you would write

                    if (myObject isnt ClassType) { ... }

                    Looks clearer and provides a positive match rather than a negative match.

                    2 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                    • Please provide the ability to open a class by name

                      Missing the ability to have a window with all classes and to open a class by name like eclipse has

                      1 vote
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                      • Allow null-coalescing event chains in C# (var.someEvent += this.Event?.Invoke())

                        Please add syntatic sugar to easily chain compatible events from a member or variable to invoke an event on the current class.

                        Binding directly to the event works, but is not null safe.

                        c.ChildEvent += ParentEvent.Invoke;

                        Having a lambda expression works, but is unnecessarily verbose.

                        c.ChildEvent += (sender, e) => ParentEvent?.Invoke(sender, e);

                        A null-coalescing operator would be useful here, even if just syntactic sugar.

                        c.ChildEvent += ParentEvent?.Invoke;

                        https://dotnetfiddle.net/Zbx0wq

                        using System;

                        public class Parent
                        {
                        public event EventHandler ParentEvent;


                        public void DoSomething() {
                        var c = new Child();

                        //Works, but not null-safe.
                        c.ChildEvent += ParentEvent.Invoke;

                        //Null safe, but verbose.
                        c.ChildEvent +=…

                        1 vote
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                        • Replicate the TSQL 'IN' Clause

                          Instead of adding several Or clauses to an if statement that all check the value of the same variable, it would be great if you could write some syntax similar to the TSQL 'In' clause.

                          So, instead of writing this:

                          int test = 5;
                          if (test == 6 || test == 17 || test == 82)
                          {
                          //code
                          }

                          You could write something like this:

                          int test = 5;
                          if (test in (6 || 17 || 82))
                          {
                          //code
                          }

                          https://docs.microsoft.com/en-us/sql/t-sql/language-elements/in-transact-sql?view=sql-server-2017

                          1 vote
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                          • Don't make a coding standard default behaviour.

                            I have a visual impairment that means I cannot see as clearly as other people and some parts of my vision are patchy. I would like a way to switch off the automatic variable names as this is causing me a lot of problems. Due to my eyesight I am not able to view the difference between lower case and upper case lettering. Visual Studio C# automatically 'corrects' my local variables to lowercase even after I have prefixed them with a letter L (L for local). I know this default behaviour is a coding standard that most people use but…

                            1 vote
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                            • Fix the "Quick Find", “Find” and "Find and Replace" dialogs

                              Please fix the "Quick Find", “Find” and "Find and Replace" dialogs, as follows:

                              Change "Look In" GUI, from a drop-down list to radio buttons. Doing this will reduce the number of mouse clicks from 2 to 1.

                              This is important, because I use this dialog quite often (as I expect do other programmers).

                              1 vote
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                              • Generic class type inference

                                Implement what's known as "The Diamond" in Java:

                                Box<Integer> integerBox = new Box<>();

                                Replace the type arguments required to invoke the constructor of a generic class with an empty set of type arguments (<>) as long as the compiler can determine, or infer, the type arguments from the context.

                                0 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                • Enhanced generic constraints: Interfaces, Enums, numerics

                                  This rolls up various requests and adds some more.

                                  Quite simply, generic constraints are beautiful - but incomplete.

                                  Please fill in the gaps and let a class be declared with constraints as follows:

                                  public class Subclass<TInterface, TEnum, TNumeric>
                                  where TInterface : interface
                                  where TEnum : enum
                                  where TNumeric : double, float, int, long // or some metaword for these
                                  { ... }

                                  9 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Bitarray CopyTo long or uint

                                    Add a BitArray.CopyTo(uint[]) and BitArray.CopyTo(ulong[]) overloading.
                                    I have the problem that i have a BitArray with 48bit, which can have all bits to true. If i want to copy it to a ulong it's not a simple converting. A uint or a ulong are a naturally representation of a BitArray.

                                    0 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Help visual studio refactor assist by marking classes or namespaces as "don't suggest adding here"

                                      TL;DR - Is there a mark down or way to tell Intellisense that I'd rather it not suggest adding public fields in internals only shared project?

                                      I have a shared project that contains internals that I'd rather not have exposed to developers. I have multiple public nuget packages that inherit this shared project.
                                      I need to re-factor a complex generic class between these two now (but it can't be exposed to users, they shouldn't know the details of our async structures, just a single method call). The final generic constructor that accepts base classes that need to be derived in…

                                      1 vote
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Dynamically enum's

                                        My proposition is to make a dynamicaly defined enums, or possibility to set enums integer value dynamically.

                                        Example:

                                        I have document status in many customer systems.
                                        In one of them I have statuses represented as enum:

                                        Created=1,
                                        InRealisation=2,
                                        Closed=3

                                        In other one i have:

                                        Created=31,
                                        InRealisation=33,
                                        Closed=35

                                        but i want to get this id statuses from database, and assign them to existing enum. But now its impossible.

                                        1 vote
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Ternary for a method call and not only for a return value

                                          I would like to see this idea imlplemented if possilbe, as I actually typed it in twice so far thinking it would work but I found that it is wrong.

                                          Currently, ternary returns a value that should be captured by a variable.

                                          var x = y? z1 : z2;

                                          What I would like to do is

                                          y? Z1() : Z2();

                                          instead of

                                          if (y)
                                          {
                                          Z1();
                                          }
                                          else
                                          {
                                          Z2();
                                          }

                                          Or maybe even

                                          y? return z1 : return z2;

                                          6 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

                                          Feedback and Knowledge Base