Search

A bug in Visual Studio (vs2010 and earlier, probably with vs2012 also) by namtad

Closed

1
0
Sign in
to vote
Type: Bug
ID: 779272
Opened: 2/14/2013 9:38:13 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I've noticed this problem in Visual Studio 2010 and earlier versions and I would not be surprised that this problem exists in the latest version. The problem is the editing of the project configuration settings (e.g., "Debug", "Release" and so on that can be added or removed at

Menu > Build > Configuration Manager...

The problem I noticed was that when you remove an item or two (at the <Edit...> section of the
listbox labeled "Active solution configuration"), it will be gone from the solution list on the toolbar. However, the "deleted" configuration somehow continue to bother me in "Batch Build" section.

Today, I finally found the solution (which I guess should work but needs some more work to verify my new trick really solved the problem).

I've prepared a longer text to discuss this problem (how to create the problem) and solution.
I hope you guys can fix this problem. I've been living with extra configurations that I did not want but I could not figure out how to eliminate the unwanted items in the configurations. As a consequence, my batch-build sequence (which takes about 10 minutes each) wasted a few more minutes every time I did that (so, over the years, I've wasted many tens of hours waiting for the unnecessary build --- all because of the bug in Visual Studio. Now, I hope I can do it right by knowing how to remove the extra configurations and also telling you how to reproduce this problem and you can fix the Visual Studio bug at the source. Thank you for your attention.

(I'm pasting the entire report that I prepared at the "Steps to reproduce" section below.)

Kan Yabumoto

630-369-7112

Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce


From:     Kan Yabumoto <yabumoto @ datman.com> 630-369-7112
To:        Microsoft Visual Studio developer team
Subject: A bug in Configuration setting
Date:     2013-02-14
===================================================================================

Here's a sequence with Visual Studio 2010 (and earlier versions
and also possibly with VS2012 which I have not tested) that causes
a nagging inconvenience that I believe is a bug in VS2010.

* * *

The problem is with regard to a semi-deleted "configuration" settings
that causes funny things and inconveniences if not a fatal problem.

It is something to do with a deleted "configuration" that could not
be completely removed (until today when I succeeded in cleaning the
situation up).

* * *

The steps to create a new project (solution) of a brand new "myproject" product.
    
    Steps

         1. Visual Studio 2010 (without an argument)

         2. File > New > Project > Win32_Console_Application
                Location: c:\mydir (can be any directory, select this first )
                Name:     myproject (the name of the desired project)
                    [ ] Create directory for solution
                    [ ] Add to source control

            The directory (c:\mydir) should exist but should not
            contain a directory whose name is the same as the desired project name
            (or, if it exists, it should be empty). This new directory will be
            temporary anyway. You may move the entire project directory to anywhere
            else because all project-related files are relative to the project directory.
            which is completely "portable".
            Click [OK]

         3. Win32 Application Wizard > Application Settings

         4. (o) Console Application
            [v] Empty project
            Click Finish

         5. At this point, you will find the following files created by VS
            in the newly created project directory:

                c:\mydir\myproject\myproject.sdf
                c:\mydir\myproject\myproject.sln
                c:\mydir\myproject\myproject.suo
                c:\mydir\myproject\myproject.vcxproj
                c:\mydir\myproject\myproject.vcxproj.filters
                c:\mydir\myproject\myproject.vcxproj.user
                c:\mydir\myproject\myproject.opensdf        (will go away when vs2010 is closed)

         8. Now, let's set up the solution configuration and platforms
            for all the variations in the product with minor variations
            which will be differentiated via a few complile-time variables
            (such as NDEBUG, _DEBUG, FREE_VERSION, PRO_VERSION)

                Build > Configuration Manager...

            Here's the initial settings (provided by VS2010 by default)

                Active solution configuration:     Active solution platform:
                    Debug                             Win32
                    Release                             <New...>
                    <New...>                            <Edit...>
                    <Edit...>

                That is, there are two entries (Debug and Release) for solutions
                and one entry (Win32) for platforms.

To be continued to Part 2

Product Language

English

Operating System

Any

Operating System Language

English

Actual results


Part 2

         9. Let me add a new entries into the solution configuration (and also
            remove the "Debug" and "Release" configurations (that becomes
            inconsistent to our configuration-naming convention).

             Note: sometimes, the listbox for Active solution configuration (or for
                    that matter, the listbox for Active solution platform) stops
                    responding to your mouse-clicks. If so, click some empty spot
                    within the Project context table, first, to bring back the "focus".

                    This is also a (minor) bug of VS2010 that annoys us. This seems to
                    happen when you open the Configuration Manager dialog box
                    (by Build > Configuration Manager...) and then, go elsewhere on
                    the Desktop (say, open an Internet Explorer display and browse
                    a site by mouse clicks elsewhere) and come back by clicking the
                    the word "Debug" on the listbox labeled "Active solution configuration:".
                    While the listbox changes color as if it has the "focus" but
                    the listbox does not drop down with the list.


            Inside the Active solution configuration listbox, selct <New...> and

                    Name:                 dbg_FreeVersion
                    Copy settings from:     Debug
                    [v]Create new project configurations
                    click [OK]

            Inside the Active solution configuration listbox, selct <New...> and

                    Name:                 dbg_ProVersion
                    Copy settings from:     Debug
                    [v]Create new project configurations
                    click [OK]

            Inside the Active solution configuration listbox, selct <New...> and

                    Name:                 rel_FreeVersion
                    Copy settings from:     Release
                    [v]Create new project configurations
                    click [OK]

            Inside the Active solution configuration listbox, selct <New...> and

                    Name:                 rel_ProeVersion
                    Copy settings from:     Release
                    [v]Create new project configurations
                    click [OK]

            At this point, we have added four configurations that bring up the total
            to be six including the original Debug and Release configurations.
            You may verify this at the listbox of "Active solution configuration".

                The listbox drops down as follows:

                    dbg_FreeVersion
                    dbg_ProVersion
                    Debug
                    rel_FreeVersion
                    rel_ProVersion
                    Release
                    <New...>
                    <Edit...>

                The same list can be viewed inside the Project contexts table below.
                At this point, there is only one raw in the table that lists
                "myproject" under the project column. And, you can see the
                currently selected configuration in the Configuration column.
                Here, you should be able to view the existing configurations by
                clicking on the colume. The list is identical to what was shown
                above...

                    dbg_FreeVersion
                    dbg_ProVersion
                    Debug
                    rel_FreeVersion
                    rel_ProVersion
                    Release
                    <New...>
                    <Edit...>

        10. Now, the six configurations within the project can also be examined in
            the Batch Build list.

                Build > Batch Build...

                (You can see the six configurations (when we add the x64 platform),
                the total number doubles with the counterparts under the x64 platform.)

To be continued to Part 3

Expected results


Part 3

        11. Here is a sequence that creates the funny (buggy) limbo state that
            has plagued me for years with Visual Studio.

                Let us delete the default configuration settings under
                "Debug" and "Release". To do so,

                Build > Configuration Manager...

                    Inside Active solution configuration listbox, select <Edit...>
                    and highlight "Debug" and click [Remove].
                    Dismiss the confirmation prompt by clicking [Yes].

                    Do the same thing for the "Release" configuration by selecting
                    <Edit...> in the Active solution configuration listbox and
                    select "Release" and click [Remove]. Again, click [Yes]
                    at the confirmation prompt.

                    Now, there are only four configurations left, right?

                    Well, we are not sure about that at this point.

                Let's finalize the change by exiting Visual Studio 2010.

                    File > Exit

                    This will give me another warning prompt for saving the change
                    on the following items:

                        myproject.sln
                         myproject

                    Click [Yes] and that is that.



        12. The above sequence has been what I have been dealing with. But, you may
            know something is wrong with the setting as a result of the above sequence.
            Let us bring up the previous state by running VS2010 with the save sln file
            (myproject.sln).

            By examining the "configuration" listbox in the ToolBar section, you can
            confirm there are only four configurations in this project.

            However, in the Batch Build section, there are still six configurations.

                    Build > Batch Build...

                The list in the Batch Build dialog clearly shows that the
                "Debug" and "Release" configurations are not gone!!!

        13. Today, with more tests and analysis, I finally figure out the way to remove
            the "Debug" and "Release" configuration from the project. Here is how...

                    Build > Configuration Manager...

                Confirm that there are only four configurations in the project by
                expanding the listbox at Active solution configuration:

                But, you can find all six configurations inside the Project context table.
                Click at the item of Configuration column inside the Project Context
                (right hand side to the project name, "myproject"). There, you can
                see a total of six configurations including "Debug" and "Release" that
                we thought we killed.

                The solution has now become obvious. Expanding the listbox and select
                <Edit...> and proceed to remove them. Highlight "Debug", click [Remove]
                and dismiss the confirmation dialog (this time, the dialog box is not
                as elaborate as before,.. Oh, well.)

                You can confirm the result by visiting the Batch Build dialog.

                    Build > Batch Build...

                You can now see only four entries in the configurations.

        Kan Yabumoto
        Pixelab, Inc.
        
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/28/2013 at 2:31 PM
Thank you for your feedback. We have investigated this issue and determined that it is not a regression from previous versions of Visual Studio. As this issue is not a regression we will consider it in planning for future versions of Visual Studio if we receive a significant volume of customer feedback pertaining to the issue.
Posted by Microsoft on 2/19/2013 at 7:02 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 2/14/2013 at 9:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.