locked
Visual Studio 2017 .NET Core Test Project does not discover tests RRS feed

  • Question

  • Right out of the box the Visual Studio 2017 .NET Core Test Project does not work.


    Installed version:

    Microsoft Visual Studio Enterprise 2017 
    Version 15.4.3
    VisualStudio.15.Release/15.4.3+27004.2008
    Microsoft .NET Framework
    Version 4.7.02053

    To reproduce:

    Add a new .NET Core Unit Test Project to a solution.  Right away I am seeing this in the output window:

    [11/13/2017 12:41:42 PM Informational] PowerShellTestContainerDiscoverer:OnProjectItemChanged
    [11/13/2017 12:41:42 PM Informational] PowerShellTestContainerDiscoverer:IsTestFile - C:\..\UnitTestProject1\UnitTest1.cs
    [11/13/2017 12:42:20 PM Informational] ------ Discover test started ------
    [11/13/2017 12:43:22 PM Error] Failed to initialize client proxy: could not connect to test process.
    [11/13/2017 12:43:22 PM Informational] ========== Discover test finished: 0 found (0:01:02.0255285) ==========
    [11/13/2017 12:43:46 PM Informational] PowerShellTestContainerDiscoverer:OnProjectItemChanged

    Then any time I try and run the test, I get the same message "Failed to initialize client proxy: could not connect to test process."

    What needs to be done?


    Bill Behning

    Monday, November 13, 2017 7:02 PM

All replies

  • I'm also getting this error when executing a new Out of the Box .NET Core console application.

    Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing).

    Unhandled exception at 0x00007FF8617E0542 (coreclr.dll) in dotnet.exe: 0xC0000005: Access violation reading location 0x0000000000000000. occurred


    Bill Behning

    Monday, November 13, 2017 8:40 PM
  • Hi Bill,

    Just tested it in my side with the same environment as yours,  but it worked fine. It seems not a bug.

    Have you tried to run Visual Studio as administrator? This could be related to access rights.

    Please let me know if it works

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 14, 2017 6:21 AM
  • Yes, I do launch VS as administrator

    Bill Behning

    Tuesday, November 14, 2017 2:56 PM
  • Ok.  Uninstalled VS - Reinstalled.  Test Project is now behaving as exptected.

    Bill Behning

    • Proposed as answer by Fletch Zhou Wednesday, November 15, 2017 12:50 AM
    Tuesday, November 14, 2017 7:34 PM
  • Hi Bill, 

    I'm glad the issue has been resolved. 

    You could mark your reply as answer. 

    Have a good day:)

     

    Regards, 

    Fletcher 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Wednesday, November 15, 2017 12:53 AM
    Wednesday, November 15, 2017 12:53 AM
  • Nope - not an answer.  Wrote some more tests and am now getting the same error about discovering tests.



    Bill Behning

    Wednesday, November 15, 2017 3:50 PM
  • Hi Bill,

    Thanks for your feedback.

    It seems really a limitation of .NET Core unit test since VS2017 15.2, same issue has been reported here. AbhitejJohn gave some troubleshooting on that page, you may have a try.

    Also, I suggest you update VS 2017 to 15.5 and see if this issue is fixed yet. 

    After all, you could go to Help -> Send feedback ->  Report a problem  to VS developing team directly. They may fix this issue in the next update.

    And you will see the thread you post in the site below, where is the VS developing team collect the VS IDE issues.

    https://developercommunity.visualstudio.com/spaces/8/index.html

    Thanks for your understanding and cooperation.

      

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Thursday, November 16, 2017 2:43 AM
    • Proposed as answer by Fletch Zhou Friday, November 17, 2017 3:29 PM
    Thursday, November 16, 2017 2:43 AM