locked
Visual Studio Upgrade Wizard unexpectedly deletes junctions and symbolic links RRS feed

  • Question

  • I have a problem with the Visual Studio Upgrade Wizard (on both Visual Studio 2008 and Visual Studio 2010) as I very commonly use junction points for linking to directories containing subprojects :

    If the Upgrade Wizard finds a subproject in a subdirectory linked using a junction point or a symbolic link, it immediately deletes the junction point or the symbolic link before even starting the upgrading.

    This is very annoying because, as the Visual Studio 2010 project file format has completely changed from Visual Studio 2008, I expect to recurrently use the Upgrade Wizard for synchronizing between Visual Studio 200x and Visual Studio 2010 project files that I need to maintain and modify concurrently.

    Steps to reproduce:

    1. Open Visual Studio 2005 or 2008 (without any solution).
    2. Select "New" -> "Project".
    3. Choose Project Type, for example "Win32 project".
    4. Choose project name: "Upgrade_Wizard_Bug_Prj".
    5. Select a directory for creating the project/solution.
    6. Choose solution name: "Upgrade_Wizard_Bug_Sln".
    7. Make the option "Create directory for solution" CHECKED.
    8. Click "Ok", and "Terminate".
    9. Close the solution.
    10. Go inside the "Upgrade_Wizard_Bug_Sln" directory (using Windows Explorer).
    11. Create a new directory inside it: for example "test".
    12. Move the whole directory "Upgrade_Wizard_Bug_Prj" (with contents) inside the "test" directory.
    13. Copy the whole solution directory with files and subfolders on another computer with a more recent version of Visual Studio installed (you can bypass this if you have a more recent version of Visual Studio installed on the same computer) .
      Next we will work with the copy .
    14. Create a junction point (or alternatively a symbolic link on Windows Vista or Windows 7) from the new "Upgrade_Wizard_Bug_Prj" to the old location, in order to make it like if the original "Upgrade_Wizard_Bug_Prj" was still there. This can be done using "linkd", "mklink", "Junction " (from Mark Russinovitch Winternals) or "Link Shell Extension " (I use the latter).
    15. Now open Visual Studio 2008 or 2010 (anyone which is more recent than the previous one).
    16. Open, with this newer Visual Studio, the "Upgrade_Wizard_Bug_Sln.sln" solution file created with the older Visual Studio Version.

    (note that actual VS menu and command names may be a little different because here I am translating back from French)


    As the solution and project files comes from an older version, you can note that a wizard window opens for converting the project .

    At this point, even without proceeding with project conversion, you can verify that the junction point or symbolic link that you created before HAS COMPLETELY DISAPPEARED.
    Of course, if you try to complete the conversion, there will be an error because the project directory will not be found.

    I checked this now on Windows Vista Home Premium SP2 and Windows 7 Ultimate x64, but I think it would happen on Windows XP Professional SP3 as well (because I remember having had unexpected junction disappearing in Windows XP in the past that I now begin to understand better) .

    So I would like to know:

    Is there any compelling reason for the Upgrade Wizard to delete junction points or symbolic links that it find in its paths?

    Is there a way for preventing the Visual Studio Upgrade Wizard from making this deletion?

    As a workaround, is there a way to set permissions on junction points or symbolic links for denying rights to Visual Studio Upgrade Wizard from deleting them, while still leaving full access to the linked directory contents? (I tried various methods for doing that but I failed in finding a working one. In that case, it is not evident to tell if permissions settings apply to the junction point or to the working directory, whereas in that case I very want to apply them to the junction point!)

    Best regards,

    Gilles Reeves

     

     

     

    • Moved by YiChun Chen Monday, August 16, 2010 9:03 AM C++ issue (From:Visual Studio Setup and Installation)
    Friday, August 13, 2010 10:01 AM

Answers

  • I have shared your latest notes with our developers here, and also made them aware of the report on the Connect site. Just to help keep the loop closed, here is the reply that is currently the latest on Connect: "This would appear to be a bug, however at this time the bug does not meet our bar. We are prioritizing bugs with a greater number of customer votes. It seems possible to work around this issue and there is no data loss. We will monitor this connect ticket for up votes and reassess the issue should more people feel it important. "

    I finally found a workaround on this by using the command line upgrade :

    devenv.exe <Solution File Name> /Upgrade

    Like this, there is no problems with junction points (this probably means also that the bug doesn't actually come from the upgrade itself, but rather from the process that determines if an upgrade is needed) .

    I hope nevertheless that Microsoft will remember this bug, at least for fixing it in the next Visual Studio edition …… er …… 2012? 2013?

    At least for not letting us thinking that it is useless to try to report this kind of bug.

    Gilles

     

    Saturday, August 21, 2010 10:32 PM

All replies

  • Hi Gilles,

    I am moving this thread from Base "Visual Studio Setup and Installation" forum to the "Visual C++ General" forum, since the issue is related to C++ project. There are more C++ experts in the "Visual C++ General" forum.

    Thanks!

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, August 16, 2010 9:02 AM
  • >I have a problem with the Visual Studio Upgrade Wizard (on both Visual Studio 2008 and Visual Studio 2010) as_I very commonly use junction points for linking to directories containing subprojects_ :

    I suggest that you sumbit a bug report against VS2010 on the MS
    connect site to ensure MS look at this.

    Dave

    Monday, August 16, 2010 10:25 AM
  • I suggest that you sumbit a bug report against VS2010 on the MS
    connect site to ensure MS look at this.

    Ok, I just made a report like this .

    In the meantime, can you suggest me a way for setting permissions on junction points or symbolic links in order to deny rights to Visual Studio Upgrade Wizard from deleting them, while still leaving full access to the linked directory contents?

    Gilles

    Tuesday, August 17, 2010 11:05 PM
  • Ok, I just made a report like this <https://connect.microsoft.com/VisualStudio/feedback/details/587027/visual-studio-upgrade-wizard-unexpectedly-deletes-junctions-and-symbolic-links> .

    Good.

    In the meantime, can you suggest me a way for setting permissions on junction points or symbolic links in order to deny rights to Visual Studio Upgrade Wizard from deleting them, while still leaving full access to the linked directory contents?

    Unfortunately, no. Given the nature of the issue, this may be
    something only MS can answer adequately - hence why I suggested the
    bug report.

    Dave

    Wednesday, August 18, 2010 7:19 AM
  • I have engaged the relevant developers and testers here at Microsoft.  So far, attempts to reproduce the probelm have not been successful, "Interesting … I am not able to repro this. My junction point is staying intact; it’s not disappearing. "

    If we can't get it to reproduce, we may ask you to open a regular support case through CSS.


    Developer Support Engineer
    Wednesday, August 18, 2010 11:16 PM
  • I have engaged the relevant developers and testers here at Microsoft.  So far, attempts to reproduce the probelm have not been successful, "Interesting … I am not able to repro this. My junction point is staying intact; it’s not disappearing. "

    This is really surprising.

    The problem that I described is fully reproducible for me, and I can't even find a way to run in the above steps without getting the junction deletion.

    Since then, I made other tries on different computers with the same results.

    Especially, I just made another try inside a VMWare virtual machine with a fresh Windows XP x64 installed (with all Windows Updates applied) English edition (previous ones were French) with a freshly installed Visual C++ 2008 Express Edition in English language (previously I used Visual Studio 2008 or 2010, Express or Professional, all French Editions), and no other programs installed, not even the Hard Link Shell Extension (I used the Mark Russinovitch "Junction" program for creating junctions) and even there I got the same result: the junction point was deleted.

    Now the only thing I can think about is that in their tests, the developers may not have strictly followed the steps list that I wrote for reproducing the bug.

    Please note that it is very necessary that the Upgrade Wizard uses the junction point for going from the Solution File to the Project File to upgrade: if you just create dummy or unrelated junctions inside the project directories, this will not trigger the bug.

    I also tried to use Process Monitor for tracking the deletion. This clearly shows that the junction was deleted from the devenv.exe module. If you want to check yourself, you can watch at the Process Monitor's logfile (using Process Monitor of course) that I generated (the deletion occurred exactly at time 09:14:31,6034365 ).

    Gilles

     

    Thursday, August 19, 2010 7:28 PM
  • >This is really surprising.

    ... you might want to copy the note you've posted here to a comment in
    the Connect bug report too.

    Dave

    Thursday, August 19, 2010 8:07 PM
  • I have shared your latest notes with our developers here, and also made them aware of the report on the Connect site. Just to help keep the loop closed, here is the reply that is currently the latest on Connect: "This would appear to be a bug, however at this time the bug does not meet our bar. We are prioritizing bugs with a greater number of customer votes. It seems possible to work around this issue and there is no data loss. We will monitor this connect ticket for up votes and reassess the issue should more people feel it important. "

     


    Developer Support Engineer
    Thursday, August 19, 2010 11:52 PM
  • I have shared your latest notes with our developers here, and also made them aware of the report on the Connect site. Just to help keep the loop closed, here is the reply that is currently the latest on Connect: "This would appear to be a bug, however at this time the bug does not meet our bar. We are prioritizing bugs with a greater number of customer votes. It seems possible to work around this issue and there is no data loss. We will monitor this connect ticket for up votes and reassess the issue should more people feel it important. "

    I finally found a workaround on this by using the command line upgrade :

    devenv.exe <Solution File Name> /Upgrade

    Like this, there is no problems with junction points (this probably means also that the bug doesn't actually come from the upgrade itself, but rather from the process that determines if an upgrade is needed) .

    I hope nevertheless that Microsoft will remember this bug, at least for fixing it in the next Visual Studio edition …… er …… 2012? 2013?

    At least for not letting us thinking that it is useless to try to report this kind of bug.

    Gilles

     

    Saturday, August 21, 2010 10:32 PM
  • Thanks for sharing your workaround, Gilles.  I'll pass that on, as well.  It may provide more clues.

     


    Developer Support Engineer
    Wednesday, August 25, 2010 1:57 AM