Visual Studio IDE

Announcement: Last fall, we migrated this forum to Visual Studio Developer Community to provide you one convenient and responsive system for all feedback. As the final step in the migration, this forum will be closed off completely on June 1st, 2019. We encourage you to visit Visual Studio Developer Community where you can now suggest new ideas, browse and vote on existing ideas, and engage with Visual Studio teams.

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. Syntax to check if a certain value is one of a list of values using the keyword "in".

    This is merely syntactic sugar. For example:
    if (val in [1, 2, 3])

    The compiler would translate that behind the scenes to:
    if (val == 1 || val == 2 || val == 3)

    I know I could create an array on the fly:
    if (new [] {1,2,3}.Contains(val))

    But I don't want to create an instance of an array and call a function. I think the compiler should be used to convert the "in" construct mentioned above to a list of OR'd conditionals for efficiency.

    20 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.
    - The Visual Studio Team

  2. Allow using params IEnumerable<T>

    Right now a very common pattern in code is::
    public void MyMethod<T>(params T[] objects)
    { ...
    }
    And another overload like public void MyMethod<T>(IEnumerable<T> objects)

    Where the first method would call the second method. Rarely do I actually want an array back and all I want is something that I can foreach over or use linq operators against. Under the covers it can still create an array, I don't care if it did much else, I just want the ease of the calling conventions.

    20 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  3. Equivalent of typeof(T) for members

    When throwing exceptions with messages, I'll sometimes include the name of the type via a formatted string e.g. string.Format("The {0} type does not support X.", typeof(Foo).Name);

    I do this so that if I ever rename a class with refactoring, I don't break any messages reliant on the name of the type.

    Similar functionality for parameters, methods and properties would allow similar usage which is more robust to refactoring changes, such as the name of a parameter used as the paramName argument to ArgumentNullException.

    20 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  4. Add min (<?) and max (>?) operators

    I would like min and max operators added.

    a <? b would expand to a < b ? a : b
    a >? b would expand to a > b ? a : b

    It would be more useful than Math.Min / Math.Max because it could work for more object types (anything that overloads < and >), and when selecting the min or max of more that two objects it would still look clean.
    a <? b <? c

    20 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  5. implement wrappers for catchnodes, finallynodes and other unimplemented fxcoptypes

    FxCop (Code Analysis), which is implemented in the latest Visual Studio versions; implements various wrappers which allow you to target the types and members that cause the rule to be violated.

    Not all types and attributes and other parts are implemented and can not be directly targeted and shown as "The error got generated here: {0}" (for example).

    A generic error gets shown saying the: "CCI wrapper for ...... has not been implemented yet".

    I want these to be implemented so that custom rulemaking improves greatly!

    20 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  6. returnif ( condition, value );

    Add "returnif(condition, value);" to C#.

    So if the condition is 'true' the functioned is exited and the value is returned.

    20 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  7. Support using for static classes, e.g. using static System.Math;

    Allow the static keyword to be applied in a using namespace directive, e.g. using static System.Math; allowing static classes to be treated as namespaces and avoid having to fully qualify every method call, i.e. Math.Max becomes just Max

    19 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  8. Complex constructor in where clause (Generics)

    That would be great to be able to specify a constructor with parameters in generic declaration:
    internal class TestClass<T> where T : new(string, bool)
    {
    // ...
    }

    19 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  9. Add standard xml documentation to auto-generated code

    We use Code Analysis, enabled XML documentation and set TreatWarningsAsErrors to true on all our projects. The problem of (almost all) auto-generated code that it does NOT contain any xml documentation (summaries etc.).

    Becuase of our settings, the build always fails on auto-generated code. What I suggest is to add some default xml documentation to auto-generated code (.g.cs files) or ignore auto-generated code (for the xml documentation).

    19 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we havenÕt acted on it. Looking at the VS Ò15Ó plans, weÕre not going to take action on this item, so weÕre going to close it. If the suggestion is still relevant, please either take a look to see if thereÕs another suggestion thatÕs similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  10. Introduce a not null constraint for parameters

    Getting a NullReferenceException is one of the worse error cases in my opinion, since the cause could be almost anywhere in the code.
    This is why I spend much time to make sure that I at least get a ArgumentNullException in these cases. I write unit tests to make sure they throw the ArgumentNullExceptions and I always check incoming parameters for null to throw these.
    If there was some kind of contraint telling the compiler that a specific parameter is not null, not only it could generate the code for throwing ArgumentNullExceptions, but also the compiler could check at compile…

    19 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  11. Allow multiple methods with same type signature (differentiated by argument name)

    Quite often you have code like the following:

    int id = 5;
    string username = "john";

    var user = Persistence.GetUser(id);
    var anotheruser = Persistence.GetUser(username);

    which is clear and readable.

    Unfortunately if the parameters are of the same type, the method call becomes ambiguous, and you have to start naming stuff like:

    Persistence.GetUserByXYZ(...)

    Would be nice if you were allowed to declare:

    User GetUser(string username) {}
    User GetUser(string id) {}

    And the compiler would force callers to specify the one you are asking for, like so:

    Persistence.GetUser(username = "john"); // works
    Persistence.GetUser("john"); // compiler error, ambiguous

    I know you can get…

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  12. Allow custom raise accessor of events in C#

    Currently, if you implement custom add/remove event accessors, you loose the ability to raise this event without using an external method.
    There should be an ability to implement custom raise accessor. Other .NET languages like VB.NET and C++/CLI already support this.

    public event SomeDelegate MyEvent
    {
    add
    {
    // add a delegate
    }
    remove
    {
    // remove a delegate
    }
    raise
    {
    // raise the event - NOT POSSIBLE
    }
    }

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  13. Allow option for ObservableCollection<T> to notify for changes if T implements INotifyPropertyChanged.

    At work we often find ourselves in a situation in which we have an ObservableCollection<T> where T implements INotifyPropertyChanged in some MyClass class. Further, T notifies when some property (e.g. "IsDirty") changes, and we would like to be able to detect those changes to re-evaluate some property in MyClass (e.g. AnyItemIsDirty).

    We used to not have to do this with BindingLists, but we don't really want to go back in time to those since we consider ObservableCollection a step up in terms of being WPF-y/pattern-y.

    We've tried hand-implementing a wrapped ObservableCollection, but it would be nice if that came out…

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we havenÕt acted on it. Looking at the VS Ò15Ó plans, weÕre not going to take action on this item, so weÕre going to close it. If the suggestion is still relevant, please either take a look to see if thereÕs another suggestion thatÕs similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  14. Typedef

    I think that typedef is a desperate need for C#.
    If you come from a C++ background, you know what I'm talking about.

    The only solutions are we can do in C# is have a using statement, but it applies only inside the file it was declared at, and you have to declare it like that in every single file (good luck maintaining).
    The other solution would be to create a class and inherit from the class you want to 'typedef'. I'm not sure how memory-wise that is, but anyways it's not a very good solution since sealed types began…

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.
    - The Visual Studio Team

  15. Provide a keyword for self-referencing generic class

    The current problem:

    abstract class Animal<T> where T : Animal<T>
    {
    public virtual void MakeFriends(T animal);
    }

    public class Cat : Animal<Cat> { } // Cat only make friends with a cat
    public class Dog : Animal<Dog> { } // Dog only makes friends with a dog
    public class EvilDog : Animal<Cat> { } // Dog making friends with cat... mass hysteria!

    What I suggest:

    abstract class Animal<T> where T : Animal<This>
    {
    public virtual void MakeFriends(T animal);
    }

    Note the capital T on "This". It would be a keyword to describe the generic type for the derived class.

    See…

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  16. Boolean coercion in c#

    Can't believe this isn't a request already, but probably my biggest annoyance.

    I really should be able to do

    if(someObj)
    someObj.Something();

    rather than having to do

    if(!Object.ReferenceEquals(null, someObj))
    someObj.Something();

    It doesn't have to do full javascript-style coercion (though extensiblity would be swell), just a simple != null check would cover 99% of scenarios.

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    7 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  17. Hyperlink in Standard Output SOnsole

    Currently Visual Studio doesnt support the feature of writing a text with hyperlink to the Standard Output Console.

    With System.Console.WriteLine it is possible only to add a text line to the Standard Output Console.

    It would be an added advantage to Visual Studio and helpful to automation engineers like me if this feature is incorporated in Visual Studio.

    I hope this is a needed requirement for both Software Porgrammers and Software Automation Engineers

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  18. Add Raise() extension method for EventHandler and EventHandler<T>

    Raising events in thread-safe manner with regards to avoiding NullReferenceException requires copying the event delegate before calling it (see http://stackoverflow.com/questions/786383/ for the discussion).

    This has generally been perceived as confusing and caused a lot of discussions, e.g.
    - http://stackoverflow.com/questions/231525/ 'We're all familiar with the horror that is C# event declaration',
    - http://stackoverflow.com/questions/840715/ 'Currently "Avoid checking for null event handlers" is at the top of the answers to the post titled Hidden Features of C# and it contains severely misleading information'
    - http://stackoverflow.com/questions/786383/
    etc.

    Please consider adding a Raise() extension method for EventHandler and EventHandler<T> to the System namespace in mscorlib…

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.
    - The Visual Studio Team

  19. Make a collapsed code node hide all Intellisense/Attribute data

    Currently when you select Outlining->Collapse To Definitions, the IDE hides the code inside of your method or class which makes navigating around a file much easier. However, if the method has attribute data or intellisense comments these items are not hidden and you get

    [/// <summary>]
    [SomeAttribute]
    [+] public void MethodName(int params)

    The extra lines are just visual noise that make the collapsed code slightly ****** to skim through and take up screen space that could be used to show more collapsed method nodes. Also, having the intellisense comments collapse to [/// <summary>...] in every case is not helpful.

    A…

    18 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  20. Assign delegates, lambdas or functions to events in a object initializer

    To be able to do something like this:

    var menuItem = () => new MenuItem()
    {
    Header = "audio & video",
    Click += (o, e) => lamba
    };

    To do this, please support event listing in the object initializer

    17 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

Feedback and Knowledge Base