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

Failed to launch testhost with error: System.IO.FileNotFoundException: Path does not exist #10759

Closed
Evangelink opened this issue Dec 17, 2024 · 3 comments

Comments

@Evangelink
Copy link
Member

Evangelink commented Dec 17, 2024

Clone dotnet/runtimelab branch feature/swift-bindings: https://github.com/dotnet/runtimelab/tree/feature/swift-bindings

Build from VS or from CLI:

Failed to launch testhost with error: System.IO.FileNotFoundException: Path does not exist: C:\src\runtimelab\artifacts\bin\Swift.Bindings.Tests\Debug\net9.0\dotnet.exe
File name: 'C:\src\runtimelab\artifacts\bin\Swift.Bindings.Tests\Debug\net9.0\dotnet.exe'
   at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.ProcessHelper.LaunchProcess(String processPath, String arguments, String workingDirectory, IDictionary`2 envVariables, Action`2 errorCallback, Action`1 exitCallBack, Action`2 outputCallBack) in /_/src/Microsoft.TestPlatform.PlatformAbstractions/common/System/ProcessHelper.cs:line 58
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.LaunchHost(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken) in /_/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs:line 749
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken) in /_/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs:line 221
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs:line 237
Failed to launch testhost with error: System.IO.FileNotFoundException: Path does not exist: C:\src\runtimelab\artifacts\bin\Swift.Bindings.Tests\Debug\net9.0\dotnet.exe
File name: 'C:\src\runtimelab\artifacts\bin\Swift.Bindings.Tests\Debug\net9.0\dotnet.exe'
   at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.ProcessHelper.LaunchProcess(String processPath, String arguments, String workingDirectory, IDictionary`2 envVariables, Action`2 errorCallback, Action`1 exitCallBack, Action`2 outputCallBack) in /_/src/Microsoft.TestPlatform.PlatformAbstractions/common/System/ProcessHelper.cs:line 58
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.LaunchHost(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken) in /_/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs:line 749
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken) in /_/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs:line 221
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs:line 237

Attaching diagnostic logs: diag.log

@Evangelink Evangelink added the bug label Dec 17, 2024
vitek-karas added a commit to vitek-karas/runtimelab that referenced this issue Dec 17, 2024
To run tests, do "dotnet test --settings ../empty.runsettings"

Workaround for microsoft/vstest#10759
@pavelhorak pavelhorak added sprint and removed sprint labels Jan 3, 2025
@pavelhorak pavelhorak added sprint and removed sprint labels Jan 4, 2025
@nohwnd
Copy link
Member

nohwnd commented Jan 6, 2025

The path to dotnet is specified by settings: DotnetTestHostmanager: User specified custom path to dotnet host: 'C:\src\runtimelab\artifacts\bin\Swift.Bindings.Tests\Debug\net9.0\dotnet.exe'./

<RunSettings>
  <RunConfiguration>
   
    <DotNetHostPath>C:\src\runtimelab\artifacts\bin\Swift.Bindings.Tests\Debug\net9.0\dotnet.exe</DotNetHostPath>

  </RunConfiguration>

it is generated by target coming from here: https://github.com/dotnet/runtimelab/blob/feature/swift-bindings/eng/testing/runsettings.targets#L27

The latest commit in that repo (on the mentioned branch) does not build for me , but the previous commit 0ba0707 shows this as the content, which seems correct.

Image

@vitek-karas
Copy link
Member

Thanks @nohwnd for finding out where it comes from - I tried... but obviously failed :-(

@vitek-karas
Copy link
Member

Please close this issue

@nohwnd nohwnd closed this as completed Jan 7, 2025
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

4 participants