-
Notifications
You must be signed in to change notification settings - Fork 326
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
dotnet test
fails to find .NET Core 3.0 SDK when installed from script to custom location
#2189
Comments
Looks like this issue is related to x86 vs. x64, as it seems that a 32-bit PowerShell script will install the x64 version of .NET (because it looks at the machine's architecture), then the SDK will try and use 32-bit version of the SDK (which isn't installed) and then fail. At least, this is behaviour I'm seeing using TeamCity. |
I'm seeing this as well even with the x86 SDK being explicitly pulled down and installed by the script (by explicitly passing in An example of this failure (with public CI logs) can be found here: terrafx/terrafx.interop.vulkan#10 You may note that the only change is the upgrade from the last |
@martincostello Can you please provide more information on what is the exact scenario and how to repro this?
Let me know if I am missing anything. |
@vagisha-nidhi, I've simplified a repro to:
You can optionally change the |
I have also encountered this error but through Azure Devops Server (actually, TFS on-prem). I used .NET Core Installer Tool Task which downloads dotnet-sdk-3.0.100-win-x64.zip and installs (sets PATH) to the build agent folder (_work_tool\dncs\3.0.100\x64). The subsequent |
@jabberhams I have the exact same issue |
@tannergooding I'm having the same issue. But even when I downgrade to |
I have the same issue on AppVeyor |
I fix the issue downgrading Microsoft.Net.Test.Sdk 16.3.0 to 16.2.0, if this can help! |
Would it be reproducible if .NET Core 3.0 installed with MSI? |
Same issue here after installing visual studio 16.4 (that comes with .Net core 3.1). Downgrading Microsoft.Net.Test.Sdk solved the issue |
Tagging @cvpoienaru |
I think we are talking about multiple different issues. First is the inability to find dotnet because it is not in path. And the other is inability to find dotnet of another bitness than the executor because we don't have it installed. Both seem to be broken for 16.4.0 but partially fixed in 16.5.0 The original issue fails to locate the dotnet 3.0 because it was installed with -noPath, and then likely run as this The other issue (the simple repro above), uses one bitness of the console to execute a different bitness of the test host. I tried this on the latest and I think it was "fixed" in the meantime by taking the path to dotnet.exe from the parent process if it is dotnet.exe as well. This runs nicely, but does not do what is advertised because the test host ends up running as 32-bitwhile it should run as 64-bit. Or the other way around (64bit console and 32-bit host). |
By console do you mean The following should all be valid/invalid:
Running 64-bits from a 32-bit OS, even if the underlying hardware could support 64-bit is invalid (hardware will be in 32-bit mode, etc). Running a 32-bit app from a 64-bit OS is supported; largely via Having a 64-bit unit tests launched from a 32-bit host on a 64-bit OS is also fine. The unit tests would still be running in 64-bit mode and a 32-bit and 64-bit app can communicate with eachother over IPC or similar. Many of the Visual Studio Out of Process components work this way because VS itself is 32-bits, but compilers and other tools may need to be 64-bits. |
I meant bitness of the vstest.console / dotnet test. Invoking a 64-bit test project should start a 64-bit test host even if we start it via 32-bit dotnet test. I am not 100% sure what is happening in this case, because I did not analyze it deeper. But it should be pretty easy to see once you take time to create a test project for it.
Yup that is exactly how it works for vstest console as well. A 32-bit VS runs 64-bit TestWindowStoreHost that runs 32-bit vstest.console that then runs 32-bit or 64-bit test host and they all communicate via sockets 🙂 |
The issue is for a relatively old version of Test Platform. Are you still experiencing issues? @tannergooding @martincostello @rockfordlhotka @unaizorrilla @shaynevanasperen |
Hi @Evangelink nope! |
Thank you for the prompt reply @unaizorrilla! For the others, please feel free to let us know if you are still having some issue. |
I am not. |
Description
dotnet test
fails to find .NET Core SDK 3.0 when installed fromhttps://dot.net/v1/dotnet-install.ps1
into a custom install location with-NoPath
in Azure DevOps on Windows.This does not appear to be an issue with AppVeyor, Travis CI or Azure DevOps on Linux and macOS.
This worked with various versions of the .NET Core SDK up to and including 3.0.0 RC1, but appears to have been broken in 3.0.0 with 16.3.0.
Looking at the diff between
16.3.0
and16.3.0-preview-20190828-03
, this might be a regression caused by the changes in #2161.Steps to reproduce
Issue can be observed in this Pull Request from commit
612e825179e4b3435613926b513a7b9a07132753
: justeattakeaway/httpclient-interception#127Expected behavior
Tests run.
Actual behavior
dotnet test
fails with:Diagnostic logs
See here.
Environment
Azure DevOps Visual Studio 2019 image.
The text was updated successfully, but these errors were encountered: