question

PaulYoung-1428 avatar image
0 Votes"
PaulYoung-1428 asked PaulYoung-1428 commented

Find (CTRL+F) / Find & Replace (CTRL+H) Fails During Use Of SQL Server Object Explorer In Visual Studio 2019

There is broken functionality when using Find (CTRL+F) or Find & Replace (CTRL+H) in .sql files opened via SQL Server Object Explorer. It appears to work correctly when used against .cs files. When using Find, the text is highlighted in the editor window as if the text was found but when the ENTER button is pressed, the results are always “The following specified text was not found”. Attempts with various different settings (Match Case, Match Whole Word, etc.) does not change the erroneous outcome.

116145-b1f1b640df7864073877e67ce8725c95563755433088098112.png



I launched VS in safe mode and opened a SQL file from the local drive. The find functionality works correctly so it appears that it is not a Visual Studio issue but an extension / tool one. I opened an instance of VS with all tools / extensions active and tried an experiment with multiple SQL files. I opened (CTRL+O) one file from the local drive and another from the SQL Server Object Explorer. As indicated, both files are .sql, the only difference is how they were opened and where they reside. I attempted a search using Find (CTRL+F) and selected the “All Open Documents” option. I searched for a text string that was in all of the documents. The strings located in the local file were found. The strings located in the file opened via the SQL Server Object Explorer were not. It would appear that the issue is related to the Explorer, which I believe is part of the Microsoft SQL Server Data Tools. I am using:

Microsoft Visual Studio Enterprise 2019
Version 16.10.2
VisualStudio.16.Release/16.10.2+31410.357
Microsoft .NET Framework
Version 4.8.03761

Installed Version: Enterprise

ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools

ASA Service Provider 1.0

ASP.NET and Web Tools 2019 16.10.526.50910
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019 16.10.526.50910
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 16.10.526.50910
Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.6.1000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Stream Analytics Tools for Visual Studio 2.6.1000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Azure HDInsight Azure Node 2.6.1000.0
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.6.1000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service 2.6.1000.0
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.40423.1

Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 2.1.113+g422d40002e.RR
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Process Editor 1.0
Process Editor for Microsoft Visual Studio Team Foundation Server

Microsoft Visual Studio Tools for Containers 1.2
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

NuGet Package Manager 5.10.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Razor (ASP.NET Core) 16.1.0.2122504+13c05c96ea6bdbe550bd88b0bf6cdddf8cde1725
Provides languages services for ASP.NET Core Razor.

Redgate SQL Change Automation 4.3.21147.25898
Extend DevOps processes to your SQL Server databases and safely automate database deployments.

Visit https://www.red-gate.com/sca/productpage for more information.

Copyright (C) Red Gate Software Ltd 2011-2021. All rights reserved.

This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation.
Visual Studio is a registered trademark of Microsoft Corporation.

SQL Change Automation contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
SemVer https://github.com/maxhauser/semver
Serilog https://serilog.net/
StringTemplate https://github.com/antlr/stringtemplate4
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the SQL Change Automation application folder.


Redgate SQL Prompt 10.3.7.15732
Write, format, and refactor SQL effortlessly

Redgate SQL Search 3.5.5.2703
Search functionality for SQL Server databases, from within Visual Studio

SQL Server Data Tools 16.0.62105.04180
Microsoft SQL Server Data Tools

SQL Server Integration Services 15.0.2000.166
Microsoft SQL Server Integration Services Designer
Version 15.0.2000.166

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript Tools 16.0.30429.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions 1.0
View, manage, and diagnose containers within Visual Studio.

Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
Microsoft SQL Server Data Tools

vs-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PengGe-MSFT avatar image
0 Votes"
PengGe-MSFT answered

Hi @PaulYoung-1428

Welcome to Microsoft Q&A!

I created a sql file but cannot reproduce your issue. Can you provide more detailed information such as a video?

Besides, I also suggest you directly suggest this feature to Visual Studio Product Team in our Developer Community, and if you do suggest this feature, please share the link here, other forum members, who are interested or needed this feature will go to vote for this thread.

Sincerely,
Peng

If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PaulYoung-1428 avatar image
0 Votes"
PaulYoung-1428 answered

Did you deploy the file to a SQL Server and open it via SQL Server Object Explorer? The problem is only reproducible if the file is stored in a SQL Server database and opened via SSOE. If the file is created locally, stored locally, and opened from a local location, the problem does not exist and cannot be reproduced. You must deploy and open via SSOE in order to reproduce.

116653-image.png

Yes, I have already taken this to Visual Studio support. They referred me to you.

https://developercommunity.visualstudio.com/t/Find-CTRLF---Find--Replace-CTRLH/1411944


image.png (6.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PaulYoung-1428 avatar image
0 Votes"
PaulYoung-1428 answered PaulYoung-1428 commented

How does one submit a video?

116702-image.png



image.png (12.2 KiB)
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @PaulYoung-1428
You can upload your video to https://onedrive.live.com/ and share the link here. (Please select Visible to the original poster & Microsoft option if you collect the log file and want to post the link as/in a comment)

0 Votes 0 ·

Hi, @PaulYoung-1428
We found you have submitted a same issue here https://developercommunity.visualstudio.com/t/Find-CTRLF---Find--Replace-CTRLH/1411944, can you add a comment to explain this issue is not resolved for you? So that we can reactivate this feedback ticket and assign it to proper engineers to track.

0 Votes 0 ·

I cannot add a comment at the Developer Community. The Issue is closed and read-only.

0 Votes 0 ·

Hi, @PaulYoung-1428
Please click "Show reactions" to expand it and there is a "Add reaction" button. After clicking it, a "Add comment" text box will show up where you can add a new comment.

0 Votes 0 ·
Show more comments