Skip to content

VS Test Explorer fails to run tests, stating that it failed to find compatible framework version #280

Closed

Description

@Gnbrkm41

After opening a project with usual build -vs command, attempts to run tests in the test explorer result in testhost exiting with error It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '5.0.0' was not found., listing available 32-bit runtimes installed on my PC.

cc @ViktorHofer

Activity

  1. added
    untriaged
    on Nov 26, 2019
  2. ViktorHofer commented on Nov 26, 2019

    @ViktorHofer
    Member

    Taking a look now.

  3. ViktorHofer commented on Nov 26, 2019

    @ViktorHofer
    Member
  4. ViktorHofer commented on Nov 26, 2019

    @ViktorHofer
    Member
  5. ManishJayaswal commented on Nov 26, 2019

    @ManishJayaswal

    @jfleisher @singhsarab - can you guys please discuss this to see if this needs a fix in IDE or in the test platform?

  6. singhsarab commented on Nov 27, 2019

    @singhsarab

    @ViktorHofer Let's move this to vstest repo and track it there.

  7. ViktorHofer commented on Nov 27, 2019

    @ViktorHofer
    Member

    The fix is to set the correct Processor Architecture in the VS Test Explorer:

    image

    I think we should change the defaults in VS to not default to x86, cc @ManishJayaswal

  8. Gnbrkm41 commented on Nov 27, 2019

    @Gnbrkm41
    ContributorAuthor

    That did seem to fix it indeed.

  9. Gnbrkm41 commented on Dec 30, 2019

    @Gnbrkm41
    ContributorAuthor

    Not sure if something changed or I'm doing something wrong, but it suddenly stopped working again even after changing the architecture. Ran build.cmd before build -vs System.Private.Xml. This time it is listing the x64 runtimes installed on the machine.

    Testhost 프로세스가 종료되었습니다(오류: It was not possible to find any compatible framework version
    The framework 'Microsoft.NETCore.App', version '5.0.0' was not found.
      - The following frameworks were found:
          2.1.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.14 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          3.0.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          3.1.0-preview2.19525.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          3.1.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          5.0.0-alpha.1.19554.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          5.0.0-alpha.1.19564.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    You can resolve the problem by installing the specified framework and/or SDK.
    The specified framework can be found at:
      - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=win10-x64
    ). 자세한 내용은 진단 로그를 확인하세요.
    [2019-12-31 1:34:11.328 오전] ========== Run aborted: 0 tests run (0:00:02.6419119) ==========
    
  10. sasha-gud commented on Jan 3, 2020

    @sasha-gud

    Just installed everything from scratch using latest Visual Studio 2019, latest source code from repository and available instructions. Have the same issue, selecting processor architecture in VS Test explorer doesn't help.

    [3.1.2020 10.13.26.156 ip.] Interrupt: Enqueueing RunSelectedOperation
    [3.1.2020 10.13.26.157 ip.] Enqueue operation 'RunSelectedOperation', hashcode:16706379 
    [3.1.2020 10.13.26.157 ip.] Operation left in the the queue: 1
    [3.1.2020 10.13.26.157 ip.] 	'RunSelectedOperation', hashcode:16706379
    [3.1.2020 10.13.26.157 ip.] 
    
    [3.1.2020 10.13.26.157 ip.] Operation Dequeue : 'RunSelectedOperation'
    [3.1.2020 10.13.26.334 ip.] Starting programmatic build of containers... 
    [3.1.2020 10.13.26.509 ip.] Completed programmatic build of containers.
    [3.1.2020 10.13.26.509 ip.] TestContainer update (build) complete : 174 ms
    [3.1.2020 10.13.26.529 ip.] DiscoveryOperation<RunSelectedOperation> FinishedChangedCotainers, changed container count is 1
    [3.1.2020 10.13.26.529 ip.] Discovering the following containers :
    [3.1.2020 10.13.26.530 ip.] 	C:\src\runtime\artifacts\bin\System.IO.Pipes.Tests\netcoreapp5.0-Windows_NT-Debug\System.IO.Pipes.Tests.dll
    [3.1.2020 10.13.26.650 ip.] ---------- Discovery started ----------
    [3.1.2020 10.13.26.650 ip.] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/RunSettingsProvider/FileSelection 
    [3.1.2020 10.13.26.651 ip.] Event:VS/UnitTest/TestWindow/RunSettingsProvider/FileSelection key: VS.UnitTest.TestWindow.RunSettingsProvider.UserFile value:False
    [3.1.2020 10.13.26.651 ip.] Event:VS/UnitTest/TestWindow/RunSettingsProvider/FileSelection key: VS.UnitTest.TestWindow.RunSettingsProvider.SolutionFile value:False
    [3.1.2020 10.13.26.651 ip.] Event:VS/UnitTest/TestWindow/RunSettingsProvider/FileSelection key: VS.UnitTest.TestWindow.RunSettingsProvider.AutoDetect value:False
    [3.1.2020 10.13.26.677 ip.] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettingsService 
    [3.1.2020 10.13.26.677 ip.] Event:VS/UnitTest/TestWindow/Ext/RunSettingsService key: VS.UnitTest.TestWindow.RunSettingsService.Name value:VSTest Run Configuration
    [3.1.2020 10.13.26.678 ip.] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettingsService 
    [3.1.2020 10.13.26.678 ip.] Event:VS/UnitTest/TestWindow/Ext/RunSettingsService key: VS.UnitTest.TestWindow.RunSettingsService.Name value:Fakes
    [3.1.2020 10.13.26.678 ip.] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettingsService 
    [3.1.2020 10.13.26.678 ip.] Event:VS/UnitTest/TestWindow/Ext/RunSettingsService key: VS.UnitTest.TestWindow.RunSettingsService.Name value:Dynamic Code Coverage
    [3.1.2020 10.13.26.678 ip.] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettings 
    [3.1.2020 10.13.26.678 ip.] Event:VS/UnitTest/TestWindow/Ext/RunSettings key: VS.UnitTest.TestWindow.RunSettings.Services value:3
    [3.1.2020 10.13.26.678 ip.] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/RunSettingsProvider/FileSelection 
    [3.1.2020 10.13.26.678 ip.] Event:VS/UnitTest/TestWindow/RunSettingsProvider/FileSelection key: VS.UnitTest.TestWindow.RunSettingsProvider.ProjectFileCount value:0
    [3.1.2020 10.13.26.678 ip.] Event:VS/UnitTest/TestWindow/RunSettingsProvider/FileSelection key: VS.UnitTest.TestWindow.RunSettingsProvider.ContainerCount value:1
    [3.1.2020 10.13.26.679 ip.] Grouped C:\src\runtime\artifacts\bin\System.IO.Pipes.Tests\netcoreapp5.0-Windows_NT-Debug\System.IO.Pipes.Tests.dll : (X64, FrameworkCore10, netcoreapp5.0, )
    [3.1.2020 10.13.26.679 ip.] Test discovery settings for C:\src\runtime\artifacts\bin\System.IO.Pipes.Tests\netcoreapp5.0-Windows_NT-Debug\System.IO.Pipes.Tests.dll:
     <RunSettings>
      <RunConfiguration>
        <ResultsDirectory>C:\src\runtime\src\libraries\System.IO.Pipes\TestResults</ResultsDirectory>
        <SolutionDirectory>C:\src\runtime\src\libraries\System.IO.Pipes\</SolutionDirectory>
        <TargetPlatform>X64</TargetPlatform>
        <CollectSourceInformation>False</CollectSourceInformation>
      </RunConfiguration>
    </RunSettings>.
    [3.1.2020 10.13.27.119 ip.] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version
    The framework 'Microsoft.NETCore.App', version '5.0.0' was not found.
      - The following frameworks were found:
          2.0.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.0.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.0.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          2.1.14 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
          3.1.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    You can resolve the problem by installing the specified framework and/or SDK.
    The specified framework can be found at:
      - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=win10-x64
    . Please check the diagnostic logs for more information.
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowOnTestHostExited(Boolean testHostExited)
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings)
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
    [3.1.2020 10.13.27.161 ip.] ========== Discovery aborted: 0 tests found (0:00:00,4716197) ==========
    
  11. Gnbrkm41 commented on Jan 4, 2020

    @Gnbrkm41
    ContributorAuthor

    Figured out, Likely because eng/build.ps1 isn't updated to reflect 3b9abae:

    $env:DOTNET_ROOT="$PSScriptRoot\..\artifacts\bin\testhost\netcoreapp-Windows_NT-$configuration-$archTestHost";

    It's not netcoreapp-Windows_NT-$configuration-$archTestHost anymore; it's netcoreapp5.0-Windows_NT-$configuration-$archTestHost. Hardcoding the value in the script does seem to fix it. Not sure if it's good enough to make a PR, though.

  12. Gnbrkm41 commented on Jan 30, 2020

    @Gnbrkm41
    ContributorAuthor

    Appears that VS2019 16.5 P2 introduced an Auto option which seem to default to x64.

  13. ghost locked as resolved and limited conversation to collaborators on Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Infrastructure-librariesuntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions