Fix missing using directives in DiagnosticTest.cs#4079
Merged
cheenamalhotra merged 2 commits intodev/cheena/fix-diagnostic-testsfrom Mar 24, 2026
Merged
Fix missing using directives in DiagnosticTest.cs#4079cheenamalhotra merged 2 commits intodev/cheena/fix-diagnostic-testsfrom
cheenamalhotra merged 2 commits intodev/cheena/fix-diagnostic-testsfrom
Conversation
Co-authored-by: cheenamalhotra <13396919+cheenamalhotra@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/SqlClient/sessions/244c9288-ae91-4b54-8cd6-0837024e8792
Copilot
AI
changed the title
[WIP] [WIP] Address feedback on diagnostic tests and remote executor fixes
Fix missing using directives in DiagnosticTest.cs
Mar 24, 2026
cheenamalhotra
approved these changes
Mar 24, 2026
cc47b9d
into
dev/cheena/fix-diagnostic-tests
1 check passed
Contributor
There was a problem hiding this comment.
Pull request overview
Restores missing using directives in the manual diagnostics test file so it compiles again across all target frameworks (including net462, where implicit/global usings aren’t available).
Changes:
- Re-adds
SystemandSystem.Threading.Tasksusings needed for types likeEnvironment,Func<>, andTask<>. - Re-adds required test/framework and TDS server usings (
Xunit*,Microsoft.DotNet.RemoteExecutor,Microsoft.SqlServer.TDS*) referenced throughout the file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Restores required
usingdirectives toDiagnosticTest.csthat were inadvertently removed in #4078, causing compilation failures across all TFMs (particularly net462, where implicit/global usings are not available).Restored namespaces:
System—Environment,Console,Guid,FuncSystem.Threading.Tasks—Task<T>for async stdout/stderr readsXunit/Xunit.Abstractions—Assert,ConditionalFact,ITestOutputHelperMicrosoft.DotNet.RemoteExecutor—RemoteExecutor,RemoteInvokeOptions,RemoteInvokeHandleMicrosoft.SqlServer.TDS—TDSMessage,TDSMessageCollection,TDSMessageTypeMicrosoft.SqlServer.TDS.Done—TDSDoneToken,TDSDoneTokenStatusType,TDSDoneTokenCommandTypeMicrosoft.SqlServer.TDS.EndPoint—ITDSServerSessionMicrosoft.SqlServer.TDS.Error—TDSErrorTokenMicrosoft.SqlServer.TDS.SQLBatch—TDSSQLBatchTokenMicrosoft.SqlServer.TDS.Servers—TdsServer,TdsServerArguments,QueryEngineIssues
Addresses review feedback on #4078: #4078 (comment)
Testing
No logic changes — compilation fix only. The diagnostic tests themselves remain unchanged. Build validation across
net462,net8.0, andnet9.0confirms the file compiles correctly with all TFMs.Guidelines
Please review the contribution guidelines before submitting a pull request:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.