Forum Discussion

PhilU115's avatar
PhilU115
Brass Contributor
Jun 25, 2026

Simple request for Visual Studio's Find and Replace operation

Doing a Find + Replace operation in VS, I could wish there was an option, when selecting to do so over the whole project or solution, to choose which types of files to include or exclude. For example, in a classic Web Forms project, I'd like to omit the designer pages.  I've been caught out by this ore than once ... :(  (More fool I...)

 

2 Replies

  • If you are in Visual Studio 2026 (Community, Professional, Enterprise). From keyboard short-cut `ctrl+F` it will open the Find drop down in the the active file. Type your target keyword in the find box. Then hit `ctrl+H` from keyboard shortcut it will open replace interface window. For whole project or solution you can use `ctrl+shift+F` to check the all files at once about the search keyword you want. For replace all you can check with `ctrl+shift+H`.

  • saleha15's avatar
    saleha15
    Tin Contributor

    This would be a very useful enhancement. While Visual Studio allows filtering by file patterns in some search scenarios, having a more intuitive include/exclude option when performing Find and Replace across an entire project or solution would help prevent unintended changes.

    In Web Forms projects, designer files (*.designer.cs) are a perfect example of files that developers rarely want to modify during bulk replacements. Accidentally updating generated code can lead to unexpected issues and unnecessary cleanup work.

    A feature allowing users to specify exclusions such as *.designer.cs, bin, obj, generated files, or other custom patterns before executing a solution-wide replace would make the operation much safer and more flexible.

    Definitely a reasonable request, especially for larger legacy projects where generated files are common.