Visual Studio 2022 17.12.4 can't connect test runner process

Shi, Jason (Shanghai) 50 Reputation points
2025-02-07T02:18:20.4766667+00:00

After upgrading visual studio 2022 to 17.12.4, for .net 8 test project which is using MSTest and Xunit at same time, it always fails to execute tests from test explorer. The error message is like below:

"Unable to connect to testing platform runner process [xxxTests.dll]"

If turn off the preview feature flag, test can be executed from test explorer again.User's image

Is there a bug in the preview feature?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,447 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
360 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 33,391 Reputation points Microsoft External Staff
    2025-02-07T08:34:38.1733333+00:00

    Hi @Shi, Jason (Shanghai) ,

    Is there a bug in the preview feature?

    It’s possible that this is a potential issue. I noticed that some developers also get the same error, see this Github thread: Unable to connect to testing platform runner process when using testing platform server mode.

    I did some tests on my side, changing the project file, using the MSTest and the Xunit test, restarting VS, checking/unchecking the preview feature, but failed to reproduce this issue.

    User's image

    I doubt that this issue appears in some specific situations.

    I suggest you follow up that Github ticket, add comments and wait for the latest update.

    Thanks for helping us make Visual Studio better.

    Have a great day!

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.