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. 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 →
    • Allow simple formatting in comments

      Allow simple formatting such as bold and italic in comments so that certain parts of a code file can be highlighted.

      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 →
      • Inline deconstructed variable

        It would be nice if I can inline deconstructed variables.

        Example:

        Current code:
        var (username, password) = smtpCredProvider.GetCredentials();

        return new SmtpClient(opts.SMTPAddress, opts.SMTPPort)
        {
        EnableSsl = opts.SMTPUseSSL,
        Credentials = new NetworkCredential(username, password)
        };

        Expected code:

        return new SmtpClient(opts.SMTPAddress, opts.SMTPPort)
        {
        EnableSsl = opts.SMTPUseSSL,
        Credentials = new NetworkCredential(smtpCredProvider.GetCredentials())
        };

        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 methods to clone an object tree or a part of it

            Creating objects similar to others already existing is a common pattern that requires a lot of typing and bore just to map the properties of one into the other.
            There should exist an extension method on the "object" object that could allow to create an object just cloning another one, with it's entere tree, or even better, until a determinate level of depth.

            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 →
            • "throw return" pattern as alternative to "async-await"

              What I think would be a nice addition to C# would be recognize return as a special keyword of throw, so that you can completely unwind the stack upto the point where UI entered and return a value without raising an exception. This would allow a user to start an async task, add a few continuations to this task, then "throw return" back to the top of the stack to the UI...without using the async keyword at all. Example:
              void XYZ_Click(…) {
              if (DeeplyNestedFunction() == 1) {
              ...
              }
              else {
              ...
              }
              }

              int DeeplyNestedFunction() {
              if (...) { …

              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 →
              • c#

                Na minha opinião acho que seria melhor quando nos instalamos uma referencia uma .dll quando instalar ou executar o programa em outro
                computador que não tenha o git hub ou algo que precise ser instalado para o programa funcionar invés de aparecer uma mensagem de erro direcionar com link para instalar o que falta o computador ficaria mais fácil de descobrir o que necessita para o programa funcionar corretamente em outro computador sou iniciante ainda e as mensagens de erro que aparecem no computador novo a ser executado nao são muito claras para mim.
                Obrigado!

                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 user to modify HTTP Accept and User Agent headers when using UriImageSource with caching

                  This is regarding using the compiler for Xamarin Cross-development in C#. For me to use avail myself of the downloaded image caching (UriImageSource) from the site I frequently download images, I would need to modify 2 HTTP header fields : User Agent and Accept. The header fields both have static information either identifying the app/Version and the acceptable returned data format. It would be very useful to allow the program to request these changes prior to the page appearing.

                  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 →
                  • Customize icons in the Class View / Object Browser

                    Right now there's basically three icons in the Class View/Object Browser: the Blue Icon, the Purple Icon, and the Beige Icon. ^^

                    Well, it's true that when you look closer, you can notice some differences in the shape. The enum icon shape is different from the class icon one or from the folder icon one. However, you need to look closer to see it. It's not something that strikes you in a quick look, and that makes navigating those views less useful.

                    I would say that a good usability test would be to blur the icons, and yet to be…

                    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 →
                      • Create a case expression

                        Add an expression syntax of the type:
                        var a = <select symbol> (expression)
                        {
                        <case symbol> <constant>: <expression>;
                        <case symbol> <constant>: <expression>;
                        }
                        Where a is assigned the expression result associated selected case. Of course every case expression would need to evaluate to the same type.

                        I believe this syntax would be more elegant than:
                        int a;
                        select (b)
                        {
                        case "One":
                        a = 1;
                        break;
                        case "Two":
                        a = 2;
                        break;
                        }

                        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 →
                          • StringAssert.Equals should throw an exception just like Assert.Equals.

                            Right now it resolves to Object.Equals. However it looks a lot like string.Equals, which compares strings instead of identities.
                            Of course i got this when reading the manual, but it would still prevent confusion to make StringAssert.Equals behave like Assert.Equals instead of like Object.Equals.

                            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 →
                            • abstract inhertaible enums

                              Example;

                              public abstract enum AnimalType; //acts as a Base Class & interface

                              public enum CatType : AnimalType
                              {
                              Burmese,
                              Siamese,
                              Tabby,
                              ...
                              }

                              public enum DogType : AnimalType
                              {
                              Alsatian,
                              Beagle,
                              ...
                              }

                              Then use this Abstract enum as a Generic Type Constraint.

                              This then allows a family of enums to be created and avoids use of non-matching enums.

                              e.g.
                              public abstract class BaseClass<TAnimalEnum>
                              where TAnimalEnum : AnimalEnum
                              {
                              // do animal stuff
                              }

                              then
                              public class CatClass : BaseClass<CatEnum>
                              {
                              // do cat stuff
                              ...
                              }

                              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 →
                              • Type safety in actions defined using lambda functions

                                There's a small problem when it comes to actions defined through lambda functions. I'm showing it in the screencap.

                                Let's say we have two methods: HellowWorld(), which returns a string, and DoNothing(), which doesn't return anything. There's no type safety problems when we use them through anonymous methods: Actions only accept anonymous methods that doesn't return any a value, while Func<string> only accept anonymous methods that return a string.

                                Now let's use lambda functions. No problem here with Func<string>: when the lambda function doesn't return a string, it shows an error, which it's OK.

                                The problem appears when you declare…

                                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 →
                                • aiiiiiiudaaaaaaaa!!!!

                                  llamen a la polisiA!!

                                  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 →
                                  • Add the ability to convert the use of "var" to the expanded declaration:

                                    Add the ability to convert the use of "var" to the expanded declaration:

                                    var i = 5;

                                    hovering over i, intellisense tells us this is an int. Please add the ability to convert the "var" to it's expanded declared type (i.e int in this example).

                                    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 →
                                    • Automatic string null coallesce with if

                                      Rather than

                                      if (str != null) { ... }

                                      simply:

                                      if (str) { ... }

                                      Like C++

                                      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 →
                                      • 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 →
                                        • LINQ to SQL: Error Reporting Via Generated SQL With 0 = 1 Clause

                                          LINQ to SQL error reporting is currently implemented by generating random SQL with a clause 0 = 1 (usually in a WHERE statement.)
                                          My understanding is this typically happens when there's an out of sync between the definition of a class in LINQ vs the actual entity in SQL.

                                          I believe Microsoft's intentions were to return no results in this case, but the following issues arise by this implementation:

                                          1) This is unintuitive to the developer, since generally no actual error occurs, just a change in the results being returned. The change in results being returned, could coincidentally be the…

                                          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 →

                                          Feedback and Knowledge Base