Port BasicAddMissingReference.InvokeSomeFixesInVisualBasicThenVerifyReferences to the new test framework#57626
Merged
sharwell merged 6 commits intodotnet:mainfrom Nov 12, 2021
Merged
Conversation
…eferences to the new test framework
734f5bf to
b2e1d2f
Compare
c66ecb5 to
8bb0dcf
Compare
sharwell
commented
Nov 10, 2021
39257f7 to
7ada47d
Compare
dibarbet
approved these changes
Nov 12, 2021
| await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); | ||
|
|
||
| var filePath = await GetAbsolutePathForProjectRelativeFilePathAsync(projectName, relativeFilePath, cancellationToken); | ||
| VsShellUtilities.OpenDocument(ServiceProvider.GlobalProvider, filePath, VSConstants.LOGVIEWID.Code_guid, out _, out _, out _, out var view); |
Member
There was a problem hiding this comment.
iirc there is an async document open service now - https://devdiv.visualstudio.com/DevDiv/_git/VS.RPC.Contracts?path=%2Fsrc%2FMicrosoft.VisualStudio.RpcContracts%2FOpenDocument%2FIOpenDocumentService.cs&_a=contents&version=GBmain
It might more reliably set the focus and there are options to activate it, set selection, set visible ranges, etc.
Contributor
Author
There was a problem hiding this comment.
I have no idea how one would use this. @olegtk ?
dibarbet
approved these changes
Nov 12, 2021
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.
Roslyn's integration tests use a custom harness, where test code executes in a separate process (testhost.x86.exe or similar) and use .NET Remoting to invoke methods on objects within a Visual Studio instance. This pull request creates a second integration test project using the new test harness from microsoft/vs-extension-testing. In addition to moving maintenance of the test harness infrastructure to a common repository, this change significantly reduces integration test reliance on .NET Remoting in hopes of improving test performance and reliability by executing test code directly within the Visual Studio instance. It also standardizes diagnostics collection (screenshots, Windows event logs, the activity log, and IDE state at point of failure).
This change ports one notoriously flaky test from Roslyn's harness to the new harness, along with its required supporting methods. The new code differs primarily in the following ways:
The goal of the new test project in the current limited form is twofold: