appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 66 forks source link

.NET Core 3.1 x86 is missing in VS2022 image #3768

Closed rseanhall closed 2 years ago

rseanhall commented 2 years ago

Please put back the .NET Core 3.1 x86 runtime on the VS2022 image.

My repo is at https://github.com/rseanhall. The last successful build with the VS2022 image was https://ci.appveyor.com/project/SeanHall/wix4/builds/41790360. A build that failed is https://ci.appveyor.com/project/SeanHall/wix4/builds/42045409.

Test run for C:\projects\wix4\build\api\Release\netcoreapp3.1\win-x86\WixToolsetTest.Mba.Core.dll (.NETCoreApp,Version=v3.1)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' (x86) was not found.
  - The following frameworks were found:
      6.0.0 at [C:\Program Files (x86)\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=3.1.0&arch=x86&rid=win10-x86
. Please check the diagnostic logs for more information.
Test Run Aborted.
Command exited with code 1
rseanhall commented 2 years ago

I had worked around this by letting that test project roll forward to a later version after filing this issue. I am now again trying to have something in my build process that requires x86 .NET Core 3.1 and it's still not installed. Since no one else is complaining, maybe it can just stay this way and I can workaround it again. It's curious that this was put into the vs2019-image-update-2011-01-06 when the issue is the vs2022 image.

FeodorFitsner commented 2 years ago

You can easily install .NET Core 3.1 x86 during the build with the following PS script:

Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
& $env:temp\dotnet-install.ps1 -Architecture x86 -Version '3.1.417' -InstallDir "$env:ProgramFiles\dotnet"

More info about dotnet-install.ps1 is here.