Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net Core tests take a long time to report a missing SDK. #1692

Closed
AbhitejJohn opened this issue Jul 16, 2018 · 7 comments
Closed

.Net Core tests take a long time to report a missing SDK. #1692

AbhitejJohn opened this issue Jul 16, 2018 · 7 comments

Comments

@AbhitejJohn
Copy link
Contributor

Description

When I run a .Net Core test where the sdk being targeted is not installed on the box we do nothing for about a minute after which we show the following message in the output pane

 Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.1.0-preview2-26406-04' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.0-preview1-25929-02 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure(Int32 connTimeout)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)
[7/6/2018 4:08:48 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.1.0-preview2-26406-04' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.0-preview1-25929-02 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure(Int32 connTimeout)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)

This is precise and helpful messaging. Is there a way we could report this earlier then having to wait for the connection timeout? This isn't very important but would give a better experience.

@singhsarab
Copy link
Contributor

@pvlakshm Please triage.

@pvlakshm
Copy link
Contributor

>> This isn't very important but would give a better experience.
To be honest, given the other issues open, I would not think this would get prioritized. That said, i will retain the up-for-grabs tag on this issue.

@smadala smadala self-assigned this Jul 30, 2018
@jainaashish
Copy link

jainaashish commented Sep 6, 2018

I also raised this feedback ticket for the same issue. And IMHO this feels like a broken scenario. I installed the latest VS 15.8 and opened an existing solution and tried to run tests. If Test explorer window has hard dependency on some sdk version then shouldn't that be included as part of installer or Test explorer should take dependency on latest sdk which is part of the installer itself...? either way we shouldn't expect customers to install those specific sdk versions separately for us to be working properly...

@AbhitejJohn
Copy link
Contributor Author

@jainaashish : Test Explorer or the platform does not take a hard dependency on an sdk. It picks up whatever the test app specifies. The VS installer AFAIK downloads only the latest stable sdk. you might want to look at additional components to install 1.* sdks or pull the one the app requires from the downloads page.

@singhsarab
Copy link
Contributor

@AbhitejJohn Is this still an issue? I thought this was fixed a long time ago.

@AbhitejJohn
Copy link
Contributor Author

@singhsarab : Tried this out on a simple MSTest .NET Core project and I did not see the delay. So I guess this is fixed - Don't really know what fixed this though.

@singhsarab
Copy link
Contributor

Thanks for the confirmation. I think I remember we rolled our a fix for this.
Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants