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. Unmanaged generic type constraint + generic pointers

    Add an "unmanaged"/"blittable" generic type constraint and use it to allow generic pointers and related features. Related post by Eric Lippert:
    http://stackoverflow.com/questions/7551461/c-sharp-generic-constraint-where-is-not-class/7557040#7557040

    The end result would allow this sort of code:

    unsafe void DoSomeStuff<T>() where T : unmanaged
    {
    T t = new T();
    T* tPointer = &t;
    T* aBunchOfT = stackalloc T[100];
    var tSize = sizeof(T);
    byte* aBunchOfBytes = stackalloc byte[tSize * 100];
    T* aBunchOfCastedT = (T*)bunchOfBytes;
    }

    Performance critical generic data structures, particularly those using preallocated pools of memory, would be a good example use case for this.

    Currently, a data structure using pointers to represent data would…

    367 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    9 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  2. Support refactoring in razor views

    Basic refactoring operations doesn't work in razor views.

    IMHO, the most useful cases are :
    - The "Find all references" menu should search in razor files too
    - The "Rename" refactoring should work in razor files

    360 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    16 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  3. Return Multiple values from functions effortlessly without creating new classes for everything

    When you think of it, its silly that methods by default can only return one value, but can take many arguments. Often times you want many return values, but it would be too painful to create classes/structs for each set, so often developers decide to then use ref or out parameters.

    Instead what if method/function calls could return many values without the need to define a class/struct.
    This example is a bit contrived but this shows the power of the fact that error information and values can easily be returned al at once.

    Syntaxt like:

    private {int index, bool IsError=false,…

    353 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    53 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  4. Add Class Diagram Support to .Net Core Projects

    Currently Class Diagrams, it appears, are not supported by .Net Core projects. Class Diagrams are a valuable tool, particularly for us visual thinkers.

    This tool can assist with documentation and can also accelerate the process of creating classes.

    332 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    13 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  5. Enable turning off Roslyn Code Fixes

    I would like to speed up Visual Studio 2015 by disabling the analysis of my sourcecode by Roslyn (code analysis, code fixes, analyzers, etc) when I am working in C# projects. In previous releases of Visual Studio there were two options in the Tools menu >> Options >> Text Editor >> C# >> Advanced:

    - Underline errors in the editor
    - Show live semantic errors

    I am a user of ReSharper, so I do not need this functionality. The reason I think Roslyn is causing the slow-down is that when I use the same version of ReSharper in VS2013, I…

    324 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  6. Enable Go To Definition (F12) should go to source if source symbols are available

    Right now, source code integration for framework sources (or any other source-indexed PDB) is clunky. You have to be in a debug session for it to pull down the source.

    If you're not in a debug session and use Go To Definition/Ctrl-Click/F12 on a Type/Method/Property, it'll take you to the object browser, or a code view that shows just the signatures.

    I propose that VS check for a source PDB in the symbol path first, then if available, use the source code directly. This would be an option, of course, so people can retain the current behavior. It would also…

    320 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  7. Stop Autoformatting my code

    Visual Studio has always had options to stop the editor from autoformatting our code. They are found in Options > Text Editor > C# > Formatting > Defaults.

    In Visual Studio 2015, you decided to add a bunch of new actions that cause Autoformatting to happen. And you didn't add the option to turn it off to this screen.
    Some of the cases where it now happens:
    - When I press colon
    - When I press {
    - Some cases with the using block.

    It would be even better to just have a NEVER autoformat my code option - And…

    298 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  8. Compliable strings

    If you're writing a tracing and logging component you may well want to pass the current method name to your logging component. Rather than hard code it (then forget to change it when you change the method name) you can use reflection and the MethodBase class to retrieve the name:
    System.Reflection.MethodBase currentMethod = System.Reflection.MethodBase.GetCurrentMethod();
    System.Diagnostics.Debug.WriteLine(currentMethod.Name);
    System.Diagnostics.Debug.WriteLine(currentMethod.DeclaringType.Name);
    System.Diagnostics.Debug.WriteLine(currentMethod.DeclaringType.Namespace);

    In C # 4.5 you can use attributes System.Runtime.CompilerServices.CallerMemberNameAttribute, System.Runtime.CompilerServices.CallerFilePathAttribute and System.Runtime.CompilerServices.CallerLineNumberAttribute for such purposes.

    Frequent use of reflection dramatically reduces performance. Using special attributes is a contentious issue. Because attributes inherently are declarative. They obviously do not provide full support for the…

    277 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    9 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  9. Build List, Dictionary and Tuple into the language

    List and Dictionary are used extensively when developing in C# and although Tuple is relatively new it's a very useful class.

    Other languages such as Python and Ruby make these constructs part of the language implementation which makes it incredibly easy to use them and reduces the amount of typing required.

    I would imagine the syntax could look something like this:

    var myList = {1,2,3,4}; // List
    var myDict = {(1,"A"),(2,"B"),(3,"C")}; // Dictionary
    var myTuple = (1,2,3,4) // Tuple

    268 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    11 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  10. (Editor) Disable adding a new line after C# [Attributes] when auto-formatting

    This thread pretty much says it all >> http://social.msdn.microsoft.com/Forums/vstudio/en-US/9e5dd395-afd7-46d7-845d-5345a3268961/dont-let-the-editor-insert-a-new-line-after-a-c-attribute?forum=visualstudiogeneral <<

    What I want is:

    Auto format ->

    [MyAttribute1] [MyAttribute2] Stuff MyStuff;
    [MyAttribute1] OtherStuff MyOtherStuff;

    But what I get is:

    Auto format ->

    [MyAttribute1]
    [MyAttribute2]
    Stuff MyStuff;

    [MyAttribute1]
    OtherStuff MyOtherStuff;

    which is quite annoying.

    There is no option anywhere to disable adding a new line - This should be a very basic built-in option.

    Thanks.

    259 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  11. Add support for ISupportInitialize on object initializers

    Quite often, it's necessary to validate an object state when it's initialized. With constructor arguments, this is easy to do as it can be done at the end or begining of ctor code. With object initializers, it's nearly impossible, as there's no way to know programatically when the object initialization is finished.

    There's a built-in mechamis for this that is being used in WinForms and WPF: the ISupportInitialize interface. The initialization code generated by both toolkits checks to determine if the object implements the interface. If it does, it will call BeginInit() before invoking all property setters, and EndInit() at…

    252 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  12. Structure All Nullable Values

    .NET Framework already has Nullable<T> but it could also have ToNullable<T> as a struct.

    If you wanted to keep reference-types null and turn value-types to null you could make this:

    class someGenericClass<T>
    {
    T? value; /* = Nullable<T> value; but this gives error
    because T may already be null */

    T$ value; /* = ToNullable<T> value; this doesn't give error,
    what you wnat is keep what's null null,
    and turn non-null into null */
    }

    The only problem is that this does not exist!
    If you don't understand anything about this, contact jmcf125@gmail.com.

    249 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    15 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  13. Make Intellisense snappier

    Intellisense for VB, C#, C++ should be faster.

    248 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  14. Make namespace configurable for folder

    The namespace for new files created are automatically determined by the folder structure.
    This often creates a problem if you wish to make a logical group of files (by placing them in a folder) that is not supposed to be a new namespace.
    Creating the folder and moving the files is not a problem, but the trouble starts as soon as someone uses 'add class' on the folder.
    Now the new file does not sit in the same namespace as the other files in the folder.

    One example would be to use a folder to store partials of a big…

    243 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    13 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  15. Add in support for Enum and Delegate constraints

    Currently C# disallows constraints for
    System.Enum,
    System.ValueType,
    System.Delegate,
    System.Array,
    System.Object

    However, the CLR has support for classes constrained to All 5 types.
    It could be very useful to have this constrain.
    To constraint a method to enum we can just use:
    where T:struct,Enum
    Allowing us to specify only to be called on enum instances and not those boxed as Enum.

    Delegate is less strict unfortunately, as there is no way to specify that a T must be an inheritor of a class. A simple solution would be to add an interface to Delegate like `IDelegate` so that we can easily…

    241 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  16. Allow delegates and generics to be used in attributes

    Alter section 17.1.3 of the C# language specification to allow for additional language features to be used in attributes. For example, being able to specify a delegate (anonymous or not) would allow one to look up a member-specific validation method using a static method:

    public static bool NameValidator(string name) {
    return !string.IsNullOrEmpty(name);
    }

    [StringValidation(NameValidator)]
    public string Name { get; set; }

    One better would be to allow anonymous delegates or lambda expressions:

    [StringValidation(str => !string.IsNullOrEmpty(str))]
    public string Name { get; set; }

    Better yet would be to allow for generics in attributes:

    [Validation<string>(str => !string.IsNullOrEmpty(str))]
    public string Name { get;…

    221 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    8 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  17. Allow readonly modifier on local variables, not just properties.

    Readonly modifiers shouldn't be canned for just instance-level properties on a class. Readonly isn't always to explicitly prevent subsequent code from changing a value. I would argue readonly modifiers can significantly improve code comprehension and readability:

    Imagine the following code in a method definition, where prod_count would be a local:

    int prod_count = (List<Product>) prods.Count;

    If the compiler would allow this:
    readonly int prod_count = (List<Product>) prods.Count;

    All of a sudden, I know as a developer reading the code that I don't have to scan for prod_count getting reassigned to something...I can mentally write it off as, okay that's just…

    221 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    13 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  18. New VS option to have fully qualified using definitions inside the namespace

    It would be nice it there were an option to specify if using definitions, added inside a namespace, should be added fully qualified or shortened using the "Quick Fix" command.
    Current it's only possible to add shortened usings, which leads to a strange sorting order for sub-namespaces (and doesn't give that good of an overview what namespaces are used in that scope).
    Also the current Visual Studio 2015 feature removes the empty line that separates the using definitions and the class documentation comment, that should probably just be fixed.

    For details and some screenshots of the current behavior see: https://social.msdn.microsoft.com/Forums/en-US/visualstudiogeneral/thread/8673cc0c-679c-493a-baa3-611a33acdc18/

    221 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  19. Add mixins to C#

    Adding mixin functionality enables true duck typing within the language and makes things like IOC and Dependency Injection so much easier. It's the next logical progression from the dynamic type.

    217 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    8 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  20. Add range operator

    USING:
    1.
    Range operator with three operands:
    bool b1 = 5 ? 1 .. 9 // true
    bool b2 = 100 ? 1 .. 9 // false

    2.
    Second syntax of the for loop:
    for(i = 0 .. 99) // loop 0 to 99 step 1
    http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2591753-second-syntax-of-the-for-loop

    3.
    Second syntax of the switch statement:
    switch(i)
    {
    ....case(5 .. 10)
    ....{
    ........Console.WriteLine(">=5 AND <=10");
    ....}
    }
    http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2591758-second-syntax-of-the-switch-statement

    4.
    Slicing:
    var list = new List() { 1, 3, 3, 7, 8, 9 };
    var slice = list[0..3];
    // suggested by Chris M.
    // http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2213037-c-slices-support

    199 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    15 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

Feedback and Knowledge Base