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. 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 →
  2. Create a StackSaver class to facilitate State Management

    Today the C# compiler is capable of creating a State Machine for us when a method returns IEnumerator or IEnumerable.
    But, the state machine itself can be useful for void methods, but that's not all. Methods written that way must have a specific return type. I think it can be better if a class is created that "saves the stack values" and returns to the caller when the "YieldReturn" method is called (it can have a void version and a generic version for the return type).

    Its usage could be like:
    var stackSaver = new StackSaver(someDelegate);
    At any point I…

    121 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 →
  3. C# Script window similar to LinqPad

    I want to be able to write scripts to try out things that I would normally create a console application for. It should be really easy to reference projects from the solution that I have currently open and all editor features should be enabled, such as refactoring and intelisense.

    Ideally after I have written code in a script I would then be able to easily move it into one of my projects.

    157 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 →
  4. Basic Refactoring Functionality needed

    Right now when I want to make a section of code a method or make some simple refactoring, its not in the box. Rename is there, but its local to the page and doesn't go deep enough. The top 5-10 refactoring types should come in the box.

    Merged from another idea: Improve the refactoring tools like code generation, rename, etc.

    487 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 →
  5. Make it possible to return a class and not only instances

    [This might be a Dotnet issue and not a C# one.]

    A property or method can only return instances.
    If it could return a Class we would be able to mock static stuff.

    Below I am using System.Class, a class most famous for System.Class.WriteLine.

    If we could declare

    private Func<System.Class> C => System.Class;

    we would be able to

    C.WriteLine("Hello world!");

    We cold then inject a new value for `C` and not be hindered by static in automatic tests.

    3 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  6. Add a default namespace prefix in visual studio options

    Currently, it is possible to define a base namespace for each project in a solution individually. However, I believe it would be extremely nice, to define a default namespace prefix for all projects in a solution/future solutions.
    RIght now it happens ever so often that you forget to change your namespace and you have to do it afterwards.

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  7. Add a default namespace prefix in visual studio options

    Currently, it is possible to define a base namespace for each project in a solution individually. However, I believe it would be extremely nice, to define a default namespace prefix for all projects in a solution/future solutions.
    RIght now it happens ever so often that you forget to change your namespace and you have to do it afterwards.

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  8. Use "private override sealed" to fully seal-off methods

    This would seem to be non-breaking.

    C# doesn't allow override to change the visibility (public/protected/private) of a virtual method. In reality there does not seem to be a problem with allowing the visibility to be reduced. In particular it would make for more "clean" code if "public virtual" (in particular) and "protected virtual" could be overridden with "private override sealed".

    If there is a concern regarding the larger overall reduction in visibility, consider limiting it to sealed-only.

    Right now an ugly kludge is required to "seal off" a virtual method through the use of "sealed" and then throwing an exception…

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  9. ApiInformation and ApiUriOf

    Use of ApiInformation is highly conducive to creating hard to discover errors. ApiInformation needs a method which accepts some form of "URI" like string which encapsulates all the information necessary for what the caller is asking about. Then the compiler should add an ApiUriOf() method very similar to nameof(), but it returns the "URI" which the new ApiInformation method accepts. Thus the ApiInformation call changes into a very clean and significantly less error prone:

    if (ApiInformation.IsUriPresent(ApiUriOf(ApplicationView.ViewMode)) {
    /* use ViewMode */
    }

    There is no question about whether the developer is compiling at an API level where the item to…

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

    Over time properties have adopted numerous constructs to free the programmer from having to code the backing field in addition to the property. One of the constructs missing is "readonly set".

    The community has been tending to use "private set" but that's not really the same thing. "readonly set" would limit setting the property (meaning the backing field) only during instantiation, and -- most importantly -- would tell other programmers the property will not be changed even by the owning class at any point later. Basically all the same arguments for why "readonly" exists for member fields.

    To what extent…

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  11. (Chinese)希望能够新增加一个控件。它可以打开unity3d文件,但只有启动后的3d画面,前面的可以自由添加,这样可以赋予unity3d多样性

    (Chinese)希望能够新增加一个控件。它可以打开unity3d文件,但只有启动后的3d画面,前面的可以自由添加,这样可以赋予unity3d多样性

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  12. need keyword 'implements' like in pascal

    need keyword 'implements' like in pascal

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  13. Suggestion: Add instance modifiers to C# (and other languages)

    I'd like to be able to do

    someFunctionReturningY(x){ somePropertyOfY=4; ... }.DoSomething();

    It should also support casting without needing parentheses in the following type of statement:

    Z zzz = (Z)functionReturningY{somePropertyOfZ=...; ... };

    The same pattern should work for enums too apart from object instances. It is inspired by initializers in C#, e.g. var x = new Test(){someProperty=…}. It’s just a generalization of the same pattern.

    E.g. at the scenario shown in the attached screenshots I want to modify an object that GetMetadataFromUI function returns and currently I’m forced to write it in a way that is much more verbose

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  14. IntelliTest only first seed value appears to be considered

    I think this is more of a bug report: According to the documentation, multiple PexArgument attributes should be able to be specified, eg

    [PexMethod]
    [PexArguments("with space")]
    [PexArguments("WIth CAps")]
    internal string ToTitleCaseTest(string str)
    {
    string result = FeatureExtensions.ToTitleCase(str);
    return result;
    }

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  15. 0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  16. Rule Set Adds Relative Path in CSProj

    When selecting your own defined rule set in a VS project, it adds the relative path in the .csproj file. Meaning, if I have a rule set stored at a certain location show below:

    C:\Team\TFS\Project\Team.ruleset

    The .csproj file will contain something like:

    <CodeAnalysisRuleSet>\..\..\TFS\Project\AlcMfgItMain.ruleset</CodeAnalysisRuleSet>

    I should be something like this:

    <CodeAnalysisRuleSet>C:\Team\TFS\Project\Team.ruleset</CodeAnalysisRuleSet>

    I would like the ability to set absolute path without have to unload project, edit the xml manually, reload the project. The reason is we may have extension templates (or the project may move locations) and the relative path is no longer valid.

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  17. if should accept bool?

    At TrackingCam app (http://TrackingCam.codeplex.com) I have the following WPF code, where cbTrackingPresenter is a CheckBox control defined in my MainWindow's XAML:

    private void cbTrackingPresenter_Checked(object sender, RoutedEventArgs e)
    {
    if (cbTrackingPresenter.IsChecked == true)
    StartTrackingPresenter();
    else
    StopTrackingPresenter();
    }

    note the (redundant in my opinion) == true pattern used there. If the == true is omitted, you get the compile-time error "CS0266", with message "Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?)"

    Why not make the "if" clause (and "while" and any clause accepts a boolean/condition) more clever and have it accept bool?…

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  18. Resolve Build output path as soon as the file is saved.

    When setting the Build output path of a VB or C# project, the absolute path is displayed. Then after closing and re-opening the project properties, the path is resolved to a relative path. Please update the value in the Project properties page immediately after save without requiring one to close and re-open the project properties.

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  19. Allow to initialize multiple fields to the same value in one statement at constructor call

    When using http://github.com/zoomicon/ZUI I would like to write:

    FloatingWindow window = new FloatingWindow()
    {
    Content = display,
    Title = IconText = title
    };

    but I have to write:

    FloatingWindow window = new FloatingWindow()
    {
    Content = display,
    Title = title,
    IconText = title
    };

    instead. For consistency, I'd prefer that it supported such assignment. Now it thinks IconText is some external field or similar

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

Feedback and Knowledge Base