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

Cannot run .net 5 unit tests #7303

Closed
3 of 10 tasks
acsyanqinglu opened this issue Mar 17, 2023 · 2 comments
Closed
3 of 10 tasks

Cannot run .net 5 unit tests #7303

acsyanqinglu opened this issue Mar 17, 2023 · 2 comments

Comments

@acsyanqinglu
Copy link

Description

Getting the following error when run unit test in azure pipeline:
2023-03-17T15:49:01.9977122Z ##[error]Testhost process exited with error: You must install or update .NET to run this application.
2023-03-17T15:49:01.9980337Z ##[error]App: D:\a\1\s\ACS.DP.SocietyDonationsBatching\Tests\bin\Debug\net5.0\testhost.exe
2023-03-17T15:49:01.9983986Z ##[error]Architecture: x64
2023-03-17T15:49:01.9986249Z ##[error]Framework: 'Microsoft.AspNetCore.App', version '5.0.0' (x64)
2023-03-17T15:49:01.9988850Z ##[error].NET location: C:\Program Files\dotnet
2023-03-17T15:49:01.9991495Z ##[error]The following frameworks were found:
2023-03-17T15:49:01.9993964Z ##[error] 3.1.4 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-03-17T15:49:01.9996627Z ##[error] 3.1.6 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-03-17T15:49:01.9999296Z ##[error] 3.1.20 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-03-17T15:49:02.0001959Z ##[error] 3.1.32 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-03-17T15:49:02.0004724Z ##[error] 6.0.5 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-03-17T15:49:02.0007661Z ##[error] 6.0.14 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-03-17T15:49:02.0008964Z ##[error]Learn about framework resolution:
2023-03-17T15:49:02.0010185Z ##[error]https://aka.ms/dotnet/app-launch-failed
2023-03-17T15:49:02.0012407Z ##[error]To install missing framework, download:
2023-03-17T15:49:02.0014890Z ##[error]https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=x64&rid=win10-x64
2023-03-17T15:49:02.0018063Z ##[error]. Please check the diagnostic logs for more information.
2023-03-17T15:49:02.3181331Z Results File: D:\a_temp\TestResults\VssAdministrator_WIN-PKB0999TB7N_2023-03-17_15_49_02.trx
2023-03-17T15:49:02.3290419Z Attachments:
2023-03-17T15:49:02.3291217Z D:\a_temp\TestResults\98b6949a-8c9f-4213-97fd-7f78dd2f6f40\VssAdministrator_WIN-PKB0999TB7N_2023-03-17.15_49_01.coverage
2023-03-17T15:49:02.3414521Z ##[error]Test Run Aborted.
2023-03-17T15:49:02.3690570Z Vstest.console.exe exited with code 1.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Image: windows-2019
Version: 20230314.1
Included Software: https://github.com/actions/runner-images/blob/win19/20230314.1/images/win/Windows2019-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win19%2F20230314.1

Is it regression?

no

Expected behavior

Expect .net 5 framework should exist and unit test runs

Actual behavior

Expect .net 5 framework doesn't exist and unit test fails

Repro steps

**************** Starting test execution *********************
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@d:\a_temp\0gx5qupi5ed.tmp"
Microsoft (R) Test Execution Command Line Tool Version 16.11.0
Copyright (c) Microsoft Corporation. All rights reserved.
vstest.console.exe "D:\a\1\s\ACS.DP.SocietyDonationsBatching\Tests\bin\Debug\net5.0\Tests.dll"
/TestCaseFilter:"TestCategory=System"
/Settings:"D:\a_temp\z4kdc0ctpgj.tmp.runsettings"
/EnableCodeCoverage
/Logger:"trx"
/TestAdapterPath:"D:\a\1\s"
Starting test execution, please wait...
3.279
A total of 1 test files matched the specified pattern.
##[error]Testhost process exited with error: You must install or update .NET to run this application.
##[error]App: D:\a\1\s\ACS.DP.SocietyDonationsBatching\Tests\bin\Debug\net5.0\testhost.exe
##[error]Architecture: x64
##[error]Framework: 'Microsoft.AspNetCore.App', version '5.0.0' (x64)
##[error].NET location: C:\Program Files\dotnet
##[error]The following frameworks were found:
##[error] 3.1.4 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
##[error] 3.1.6 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
##[error] 3.1.20 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
##[error] 3.1.32 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
##[error] 6.0.5 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
##[error] 6.0.14 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
##[error]Learn about framework resolution:
##[error]https://aka.ms/dotnet/app-launch-failed
##[error]To install missing framework, download:

@acsyanqinglu
Copy link
Author

acsyanqinglu commented Mar 17, 2023

Why was .net 5 framework removed from azure build pipeline? How to get it back?

@erik-bershel
Copy link
Contributor

@acsyanqinglu it is not a bug. Version 5.0 of .net framework was removed from images due to reaching EOL. Read more here: #6840.

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

3 participants