none
Will search / replace ever be fixed in Visual Studio?

Answers

All replies

  • https://social.msdn.microsoft.com/Forums/vstudio/en-US/8423990f-bb35-4bde-8d12-017c9b85adb0/in-what-version-of-visual-studio-has-search-replace-been-fixed?forum=visualstudiogeneral#b0241bb4-44db-4fe5-a306-651b9ea29670
    Its been about a year now, and visual studio has become so bloated with features that it needs a module to manage its own load time.  In the meantime, one of the most basic and needed features of the IDE remains completely broken.
    I've been notified a couple of times that this has been fixed however the code runs exactly the way it did the day I reported it about a year ago.

    I take it it's still the same in the latest 2017 update version? :(

    What was the conclusion of your Connect bug report on this?

    Although I can search for the report by its ID (2745850), following its link results in a "Page Not Found" error, so I'm unable to
    see for myself.

    Dave

    Sunday, April 16, 2017 11:31 PM
  • Hi SWheaties,

    Welcome to MSDN forum.

    1.        you click Find Next to get” ConsoleApp1”, “ConsoleApp1” turns to “ConsoleApp1.new” and then visual studio find next “ConsoleApp1” automatically after you click Replace, so you don’t need to click Find Next again. (Replace contains the two steps: replace and find next)
    2.        after you replace “ConsoleApp1” with “ConsoleApp1.new”, “ConsoleApp1.new” is new namespace and because the new namespace still have “ConsoleApp1”, so visual studio will search it again(when you click Find Next). If you replace “ConsoleApp1” with “ConsoleApp2”, visual studio will not search it again.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 17, 2017 7:21 AM
  • >>I take it it's still the same in the latest 2017 update version? :(

    Yes, VS2017 RTW last weeks release.

    >>What was the conclusion of your Connect bug report on this?

    I received several emails that it was fixed.  I posted a while back asking what release it was fixed in.  Even more recently I got an email saying it was fixed in VS2017.
    Monday, April 17, 2017 3:03 PM
  • Thank you Joyce,

           after you replace “ConsoleApp1” with “ConsoleApp1.new”, “ConsoleApp1.new” is new namespace and because the new namespace still have “ConsoleApp1”, so visual studio will search it again(when you click Find Next). If you replace “ConsoleApp1” with “ConsoleApp2”, visual studio will not search it again.

    This is the bug.  VS should search all files before repeating the search.  Otherwise, if you click "Find Next" you just go around in a circle - i.e. re-finding items which you have previously chosen to not replace (which is the current functionality)


    The Find Next button - and its functionality when called by Replace - should mean "Find the next occurrence that has never been found before".
    • Edited by SWheaties Monday, April 17, 2017 3:16 PM
    Monday, April 17, 2017 3:07 PM
  • I take it it's still the same in the latest 2017 update version? :(

    Yes, VS2017 RTW last weeks release.

    Could you post your repro steps here again please, I can't access your Connect bug report.

    Dave

    Monday, April 17, 2017 4:53 PM
  • Search/replace a common term and skip a few occurrences. You will see that VS finds the terms you skip again and again and again before it finishes searching the project.
    Tuesday, April 18, 2017 1:03 AM
  • Hi,

    >>This is the bug.  VS should search all files before repeating the search.  Otherwise, if you click "Find Next" you just go around in a circle - i.e. re-finding items which you have previously chosen to not replace (which is the current functionality)

    It’s hard to say it is a bug, but I will submit it to Microsoft.

    If you replace “ConsoleApp1” with “ConsoleApp1.new”, I recommend you could click Replace instead of Find Next.

    If you replace “ConsoleApp1” with “ConsoleApp2”, you could choose to click Find Next.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 18, 2017 10:18 AM
  • Hi Joyce, It is absolutely a bug and a very frustrating one at that.  I have stated the steps to reproduce this bug over and over and over and over and over in the numerous posts I've made about it.  I even posted a screen cap video!   

    This bug is very straightforward and easy to reproduce - the only requirement is that you  have to take about three minutes to actually do it.

    Yet again here is how to reproduce the bug:

    Search/replace a common term and skip a few occurrences. You will see that VS finds the terms you skip again and again and again before it finishes searching the project.

    >>I recommend you could click Replace instead of Find Next.

    Joyce, I understand you to say that you recommend you could click Replace instead of Find Next.

    Can you imagine how you would feel if you took to your car to the mechanic and said to him "The air conditioner does not work" and he said "Well don't try to turn it on and you wont have anything to worry about".   

    When you search a large project for a given term is quite common that you will not want to replace every instance of that term - rather you will want to replace only selected instances.  That is why the Find Next button exists. 

    Let me explain to you word-by-word why this is a bug:
    You want to replace certain occurrences of X with Y in your large project.  There are 81 instances of X in the project.
    You Ctrl+H type your terms and click find next.
    VS starts searching from the first occurrence.
    You click replace to replace to replace a found instance (there are 80 more you have not found yet).
    You click replace to replace to replace a found instance (there are 79 more you have not found yet).
    You click Find Next to skip an occurrence you do not want to replace (there are 78 more you have not found yet).
    VS starts searching from the first occurrence.
    You click Find Next to skip an occurrence you previously found (there are 78 more you have not found yet).
    You click Find Next to skip an occurrence you do not want to replace (there are 77 more you have not found yet).
    VS starts searching from the first occurrence.
    You click Find Next to skip an occurrence you previously found (there are 77 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 77 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 77 more you have not found yet).
    You click replace to replace to replace a found instance (there are 76 more you have not found yet).
    You click Find Next to skip an occurrence you do not want to replace (there are 75 more you have not found yet).
    VS starts searching from the first occurrence.
    You click Find Next to skip an occurrence you previously found (there are 75 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 75 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 75 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 75 more you have not found yet).
    You click Find Next to skip an occurrence you do not want to replace (there are 74 more you have not found yet).
    VS starts searching from the first occurrence.
    You click Find Next to skip an occurrence you previously found (there are 74 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 74 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 74 more you have not found yet).
    You click Find Next to skip an occurrences you previously found (there are 74 more you have not found yet).
    You click Find Next to skip an occurrence you previously found (there are 74 more you have not found yet).
    You click Find Next to skip an occurrence you do not want to replace (there are 73 more you have not found yet).

    Hopefully at this point it is clear why this is a bug (???).  Please let me know if you need further explanation.

    Tuesday, April 18, 2017 2:09 PM
  • One other thing - the "Skip File" button is also broken.  So if you think you can bypass some of the frustration of skipping all the occurrences you found previously, you are wrong :).

    Tuesday, April 18, 2017 2:14 PM
  • Also, if you are only searching a portion of your solution, remember to reset your search scope when VS changes it as per this thread:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/20632949-e3f4-41ab-8682-987a0918b859/vs-2013-find-and-replace-changes-look-in-to-all-open-after-a-search-in-current-document?forum=visualstudiogeneral

    I've long felt this was a bug also but have not reported it for reasons that should be obvious.

    Tuesday, April 18, 2017 2:20 PM
  • >Search/replace a common term and skip a few occurrences. You will see that VS finds the terms you skip again and again and again before it finishes searching the project.

    OK, thanks for the refresher.

    I see what you mean, and it's still the same in the latest preview version of 2017.

    Dave

    Tuesday, April 18, 2017 7:58 PM
  • Hi SWheaties,

    Thank you for your update.

    I have submitted it to Microsoft, please check it here: https://developercommunity.visualstudio.com/content/problem/46044/find-and-replace-in-visual-studio-2017.html, I have vote and comment to it.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by SWheaties Wednesday, April 19, 2017 1:53 PM
    Wednesday, April 19, 2017 9:20 AM
  • Thank you Joyce and Dave.
    Wednesday, April 19, 2017 1:53 PM