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
Unsupported Platform target x86 in version 17.7.0? #4650
Comments
vstest.console S:\t\mstest77\bin\x86\Debug\net7.0\mstest77.dll --diag:logs Starting test execution, please wait... Additionally, path to test adapters can be specified using /TestAdapterPath command. Example /TestAdapterPath:. |
I am having this issue in CI builds, using the MS hosted agents. It's a multi-targeted NUnit project that also targets netcoreapp3.1. I have installed the netcoreapp3.1 runtime in x86 using the dotnet-install script and run the test using
I end up with a |
@smkanadl are you hitting this with just 17.7.0 or 17.6.3 as well? Because needing x86 runtime is a normal behavior of a .NET application that is built via any SDK (no matter if x64, x86 or arm64), and x86 runtime is not installed by default IIRC. You can check "C:\Program Files (x86)\dotnet\dotnet.exe" --info, and see if you have the runtime listed in your list of x86 runtimes. |
@nohwnd I am hitting this with 17.7.0 only. My pipeline was working fine with 17.6.1 before. When I upgraded to 17.7.0 it stopped working. Going back to 17.6.3 fix the problems. The matching x86 runtime was always installed. I also tried to install the full x86 SDK to get 17.7.0 working, but that didn't help either. |
Thanks for the info, will try it. |
I don't see it, do you have more output in that console? How I do it:
<!-- file mstest78.csproj -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>
</Project>
|
Yes, I can still reproduce with an xUnit project.
As far as I can see, |
Found it. We have been doing full rewrite of how we package the app in 17.7.0 to build via the common build system Arcade, and the testhost we shipped in testhost.x86 is running as x64. I can see it fail in the same callstack when loading the dll into a plain x64 .net 7 console app. Surprisingly this error message is not mentioning anything about wrong image format, which is unexpected to me.
|
Fixes are building, if tests pass I will backport to 17.7.x and we should release patch on Tuesday. |
Fixed in 17.7.1 that is now released and we will be inserting into net7 and next servicing of VS. cc @cvpoienaru |
Description
I have an issue where my unit tests are not executed on upgrading Micosoft.NET.Test.Sdk from version
17.6.3
to17.7.0
. My test project has the Platform target set tox86
.The tests are shown in Visual Studio 2022 - Test Explorer, but they are not running on execution.
Steps to reproduce
The issue is reproducible by creating a new test project (xUnit or MSTest Test Project) in Visual Studio 2022. From there...
Working version
17.6.3
x86
Not working version
17.7.0
Expected behavior
The same behavior as in version
17.6.3
that the tests are executed.Actual behavior
The unit tests are not executed. The logs say that they were not discovered...
Diagnostic logs
Executed from MSTest Test Project
Executed from xUnit
Environment
OS: Windows 10 Version 22H2 (Build 19045.3271)
IDE: Visual Studio 2022 17.6.5
Installed .NET SDKs: .NET 6, 7
vstest.console.dll, Version: 17.6.3-release-20230616-01
The text was updated successfully, but these errors were encountered: