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

Microsoft.WindowsDesktop.App missing on 'windows-2022' #8859

Closed
2 of 10 tasks
PeterBenko opened this issue Nov 21, 2023 · 15 comments
Closed
2 of 10 tasks

Microsoft.WindowsDesktop.App missing on 'windows-2022' #8859

PeterBenko opened this issue Nov 21, 2023 · 15 comments

Comments

@PeterBenko
Copy link

PeterBenko commented Nov 21, 2023

Description

With the new image of windows-2022, DotNetCoreCLI@2 test runs fail for a x86 project.

Platforms affected

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

Runner images affected

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

Image version and build link

Image: windows-2022
Version: 20231115.2.0
Included Software: https://github.com/actions/runner-images/blob/win22/20231115.2/images/windows/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20231115.2

Is it regression?

YES - same pipeline passed with windows-2022 20231029.1.0

Expected behavior

DotNetCoreCLI@2 test runs should be possible for x86 based projects.

Actual behavior

The test run fails due to missing .NET 6 x86 Microsoft.WindowsDesktop.App

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process for source(s) 'D:\a\1\s\src\<redacted>\bin\x86\Debug\<redacted>.dll' exited with error: You must install or update .NET to run this application.
App: D:\a\1\s\src\<redacted>\bin\x86\Debug\testhost.x86.exe
Architecture: x86
Framework: 'Microsoft.WindowsDesktop.App', version '6.0.0' (x86)
.NET location: C:\Program Files (x86)\dotnet\
The following frameworks were found:
  8.0.0 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=6.0.0&arch=x86&rid=win-x86&os=win10
. Please check the diagnostic logs for more information.
Results File: D:\a\_temp\VssAdministrator_fv-az289-77_2023-11-21_14_46_39.trx
Html test results file : D:\a\_temp\TestResult_VssAdministrator_fv-az289-77_20231121_144639.html

Test Run Aborted.

With further investigation by logging dotnet --info in the pipeline it becomes evident that x86 toolkit on 20231115.2.0 doesn't match the x64 one:

dotnet --info:

.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.8d38d0cc

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.20348
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100\

.NET workloads installed:
 Workload version: 8.0.100-manifests.8d38d0cc
 [maui-windows]
   Installation Source: VS 17.8.34309.116
   Manifest Version:    8.0.3/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.3\WorkloadManifest.json
   Install Type:              Msi

 [maccatalyst]
   Installation Source: VS 17.8.34309.116
   Manifest Version:    17.0.8478/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.0.8478\WorkloadManifest.json
   Install Type:              Msi

 [ios]
   Installation Source: VS 17.8.34309.116
   Manifest Version:    17.0.8478/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.0.8478\WorkloadManifest.json
   Install Type:              Msi

 [android]
   Installation Source: VS 17.8.34309.116
   Manifest Version:    34.0.43/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.43\WorkloadManifest.json
   Install Type:              Msi

 [wasm-tools]
   Installation Source: VS 17.8.34309.116
   Manifest Version:    8.0.0/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.0\WorkloadManifest.json
   Install Type:              Msi


Host:
  Version:      8.0.0
  Architecture: x64
  Commit:       5535e31a71

.NET SDKs installed:
  6.0.125 [C:\Program Files\dotnet\sdk]
  6.0.203 [C:\Program Files\dotnet\sdk]
  6.0.320 [C:\Program Files\dotnet\sdk]
  6.0.417 [C:\Program Files\dotnet\sdk]
  7.0.114 [C:\Program Files\dotnet\sdk]
  7.0.203 [C:\Program Files\dotnet\sdk]
  7.0.311 [C:\Program Files\dotnet\sdk]
  7.0.404 [C:\Program Files\dotnet\sdk]
  8.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

C:"Program Files (x86)"\dotnet\dotnet.exe --info

Host:
  Version:      8.0.0
  Architecture: x86
  Commit:       5535e31a71
  RID:          win-x86

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.25 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.25 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x64   [C:\Program Files\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Repro steps

Execute unit test for a project targetting net6.0-windows framework and x86 platform with DotNetCoreCLI@2 on windows-2022 20231115.2.0

@vpolikarpov-akvelon
Copy link
Contributor

Hey @PeterBenko, thank you for reporting. We will investigate it.

@fredrikloch
Copy link

We are having the same issue with our build pipelines both when we try UseDotnet in a separate installation path

  - task: UseDotNet@2
    displayName: 'Use .Net 6.0 SDK'
    inputs:
      version: 6.x
      installationPath: $(Agent.TempDirectory)/dotnet
      performMultiLevelLookup: false

  - script: |
      dotnet --info
    displayName: 'dotnet info'
2023-11-22T06:43:29.4654452Z ##[section]Starting: dotnet info
2023-11-22T06:43:29.4721937Z ==============================================================================
2023-11-22T06:43:29.4722153Z Task         : Command line
2023-11-22T06:43:29.4722256Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2023-11-22T06:43:29.4722571Z Version      : 2.229.0
2023-11-22T06:43:29.4722646Z Author       : Microsoft Corporation
2023-11-22T06:43:29.4722777Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2023-11-22T06:43:29.4723070Z ==============================================================================
2023-11-22T06:43:30.7515830Z Generating script.
2023-11-22T06:43:30.7580101Z Script contents: shell
2023-11-22T06:43:30.7585111Z dotnet --info
2023-11-22T06:43:30.7810598Z ========================== Starting Command Output ===========================
2023-11-22T06:43:30.7972710Z ##[command]"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "C:\a\_temp\2941a07b-8a7c-4f84-8885-97976a3b8da4.cmd""
2023-11-22T06:43:31.2324474Z .NET SDK (reflecting any global.json):
2023-11-22T06:43:31.2324875Z  Version:   6.0.417
2023-11-22T06:43:31.2325049Z  Commit:    04fde1d2e3
2023-11-22T06:43:31.2325147Z 
2023-11-22T06:43:31.2325271Z Runtime Environment:
2023-11-22T06:43:31.2333645Z  OS Name:     Windows
2023-11-22T06:43:31.2333866Z  OS Version:  10.0.20348
2023-11-22T06:43:31.2341326Z  OS Platform: Windows
2023-11-22T06:43:31.2471906Z  RID:         win10-x64
2023-11-22T06:43:31.2472215Z  Base Path:   C:\a\_temp\dotnet\sdk\6.0.417\
2023-11-22T06:43:31.2480161Z 
2023-11-22T06:43:31.2480572Z global.json file:
2023-11-22T06:43:31.2480760Z   Not found
2023-11-22T06:43:31.2480820Z 
2023-11-22T06:43:31.2482865Z Host:
2023-11-22T06:43:31.2483023Z   Version:      6.0.25
2023-11-22T06:43:31.2483204Z   Architecture: x64
2023-11-22T06:43:31.2483355Z   Commit:       492abbeef0
2023-11-22T06:43:31.2483469Z 
2023-11-22T06:43:31.2483586Z .NET SDKs installed:
2023-11-22T06:43:31.2483759Z   6.0.417 [C:\a\_temp\dotnet\sdk]
2023-11-22T06:43:31.2483887Z 
2023-11-22T06:43:31.2484813Z .NET runtimes installed:
2023-11-22T06:43:31.2485299Z   Microsoft.AspNetCore.App 6.0.25 [C:\a\_temp\dotnet\shared\Microsoft.AspNetCore.App]
2023-11-22T06:43:31.2485894Z   Microsoft.NETCore.App 6.0.25 [C:\a\_temp\dotnet\shared\Microsoft.NETCore.App]
2023-11-22T06:43:31.2486499Z   Microsoft.WindowsDesktop.App 6.0.25 [C:\a\_temp\dotnet\shared\Microsoft.WindowsDesktop.App]
2023-11-22T06:43:31.2486873Z 
2023-11-22T06:43:31.2486983Z Download .NET:
2023-11-22T06:43:31.2487375Z   https://aka.ms/dotnet-download
2023-11-22T06:43:31.2487564Z 
2023-11-22T06:43:31.2487684Z Learn about .NET Runtimes and SDKs:
2023-11-22T06:43:31.2487972Z   https://aka.ms/dotnet/runtimes-sdk-info
2023-11-22T06:43:31.2680830Z ##[section]Finishing: dotnet info
    - task: DotNetCoreCLI@2
      displayName: 'Test HSH'
      inputs:
        command: 'custom'
        custom: 'test'
        arguments: '--logger:trx --collect:"XPlat Code Coverage" -s "coverlet.runsettings"'
Testhost process for source(s) 'C:\a\1\s\tests\[REDACTED]\bin\x86\Debug\[REDACTED].dll' exited with error: You must install or update .NET to run this application.
App: C:\a\1\s\tests\HWST.Tools.Configurator.Tests\bin\x86\Debug\testhost.x86.exe
Architecture: x86
Framework: 'Microsoft.WindowsDesktop.App', version '6.0.0' (x86)
.NET location: C:\Program Files (x86)\dotnet\
The following frameworks were found:
  8.0.0 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=6.0.0&arch=x86&rid=win-x86&os=win10
. Please check the diagnostic logs for more information.

@ilia-shipitsin
Copy link
Contributor

@fredrikloch

can you please run dotnet --list-sdks twice (i.e. before and after DotNetCoreCLI@2 task)

@fredrikloch
Copy link

The issue might be unrelated to the images, since we se the same issue both on our self-hosted agents (azure scale-sets using server 2022 image) and when running this image. The issue is the same regardless of which version of dotnet we try to add (tested 6,7 and 8)

Before:

2023-11-22T10:42:38.4026366Z ##[section]Starting: PowerShell
2023-11-22T10:42:38.4099187Z ==============================================================================
2023-11-22T10:42:38.4099454Z Task         : PowerShell
2023-11-22T10:42:38.4099576Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2023-11-22T10:42:38.4099851Z Version      : 2.231.0
2023-11-22T10:42:38.4099954Z Author       : Microsoft Corporation
2023-11-22T10:42:38.4100118Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-11-22T10:42:38.4100479Z ==============================================================================
2023-11-22T10:42:39.4826469Z Generating script.
2023-11-22T10:42:39.5107051Z ========================== Starting Command Output ===========================
2023-11-22T10:42:39.5287461Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\a\_temp\d6ad6d39-f08f-4952-9fcd-7c2677398400.ps1'"
2023-11-22T10:42:40.1766541Z ##[section]Finishing: PowerShell

After:

2023-11-22T10:43:00.9380808Z ##[section]Starting: PowerShell
2023-11-22T10:43:00.9457788Z ==============================================================================
2023-11-22T10:43:00.9458054Z Task         : PowerShell
2023-11-22T10:43:00.9458175Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2023-11-22T10:43:00.9458443Z Version      : 2.231.0
2023-11-22T10:43:00.9458544Z Author       : Microsoft Corporation
2023-11-22T10:43:00.9458713Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-11-22T10:43:00.9459082Z ==============================================================================
2023-11-22T10:43:01.8660949Z Generating script.
2023-11-22T10:43:01.8941119Z ========================== Starting Command Output ===========================
2023-11-22T10:43:01.9117988Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\a\_temp\00a27c6e-7216-41c9-a980-7825e75118a2.ps1'"
2023-11-22T10:43:02.1057345Z 6.0.417 [C:\a\_temp\dotnet\sdk]
2023-11-22T10:43:02.3757500Z ##[section]Finishing: PowerShell

Running the images we get:

2023-11-22T11:03:32.1549840Z ##[section]Starting: PowerShell
2023-11-22T11:03:32.1659518Z ==============================================================================
2023-11-22T11:03:32.1659847Z Task         : PowerShell
2023-11-22T11:03:32.1659990Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2023-11-22T11:03:32.1660471Z Version      : 2.231.0
2023-11-22T11:03:32.1660587Z Author       : Microsoft Corporation
2023-11-22T11:03:32.1660793Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-11-22T11:03:32.1661259Z ==============================================================================
2023-11-22T11:03:33.4928841Z Generating script.
2023-11-22T11:03:33.5783611Z ========================== Starting Command Output ===========================
2023-11-22T11:03:33.5997596Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\8fec37d3-9fec-40b6-98d4-ac7d03e60607.ps1'"
2023-11-22T11:03:34.2163147Z 6.0.125 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2163966Z 6.0.203 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2164556Z 6.0.320 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2165065Z 6.0.417 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2165540Z 7.0.114 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2166028Z 7.0.203 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2167248Z 7.0.311 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2168064Z 7.0.404 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.2168559Z 8.0.100 [C:\Program Files\dotnet\sdk]
2023-11-22T11:03:34.4299632Z ##[section]Finishing: PowerShell

After:

2023-11-22T11:03:53.9156369Z ##[section]Starting: PowerShell
2023-11-22T11:03:53.9314740Z ==============================================================================
2023-11-22T11:03:53.9315083Z Task         : PowerShell
2023-11-22T11:03:53.9315251Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2023-11-22T11:03:53.9315642Z Version      : 2.231.0
2023-11-22T11:03:53.9315784Z Author       : Microsoft Corporation
2023-11-22T11:03:53.9316000Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-11-22T11:03:53.9316500Z ==============================================================================
2023-11-22T11:03:54.9221744Z Generating script.
2023-11-22T11:03:54.9626528Z ========================== Starting Command Output ===========================
2023-11-22T11:03:54.9836798Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\d2e40dbc-b01a-4fff-b8ad-7e4554fd3ab0.ps1'"
2023-11-22T11:03:55.1677080Z 6.0.417 [D:\a\_temp\sdk]
2023-11-22T11:03:55.3764120Z ##[section]Finishing: PowerShell

@ilia-shipitsin
Copy link
Contributor

looks like there's something wrong with DotNetCoreCLI@2

@ilia-shipitsin
Copy link
Contributor

DotNet SDKs installed by image are located at C:\Program Files\dotnet\sdk (as seen in your output and that matches my expectation).

somehow after using DotNetCoreCLI@2 DotNet SKD was installed to different path.

what was installed and why it does not work as expected, I'd say is "somewhere on DotNetCoreCLI@2 side"

@fredrikloch
Copy link

I might add that running build works just fine, the issue only arises when running tests targeting x86.
When running on our own build agents we get:

Testhost process for source(s) 'C:\a\1\s\tests\[REDACTED]\bin\x86\Debug\HWST.Core.ServiceHubModules.Tests.dll' exited with error: You must install or update .NET to run this application.
App: C:\a\1\s\tests\[REDACTED]\bin\x86\Debug\testhost.x86.exe
Architecture: x86
Framework: 'Microsoft.WindowsDesktop.App', version '6.0.0' (x86)
.NET location: C:\Program Files (x86)\dotnet\
No frameworks were found.
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=6.0.0&arch=x86&rid=win10-x86
. Please check the diagnostic logs for more information.

Compared to when running using the hosted images:

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process for source(s) 'D:\a\1\s\tests\[REDACTED]\bin\x86\Debug\HWST.Tools.ConfigurationConverter.Tests.dll' exited with error: You must install or update .NET to run this application.
App: D:\a\1\s\tests\[REDACTED]\bin\x86\Debug\testhost.x86.exe
Architecture: x86
Framework: 'Microsoft.WindowsDesktop.App', version '6.0.0' (x86)
.NET location: C:\Program Files (x86)\dotnet\
The following frameworks were found:
  8.0.0 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=6.0.0&arch=x86&rid=win-x86&os=win10
. Please check the diagnostic logs for more information.

@mikhailkoliada
Copy link
Member

@fredrikloch we do not provide any x86 dotnet runtimes/sdks in the image (and never did), whatever is installed for x86 being installed in your pipeline runtime, I'd say there is a need to report this problem to the https://github.com/microsoft/azure-pipelines-tasks repository

@fredrikloch
Copy link

@mikhailkoliada I will check there, however the last run output suggests that there is something installed for x86 in this image.

The following frameworks were found:
  8.0.0 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]

Is from a run where I've used no separate "UseDotnet" step in the setup.

@ilia-shipitsin
Copy link
Contributor

@fredrikloch ,

can you please collect msbuild binlog from you build ?
it might be collected by adding /bl arg after dotnet build

it should produce msbuild.binlog file in current folder, which is really interesting to have a look at

@PeterBenko
Copy link
Author

looks like there's something wrong with DotNetCoreCLI@2

I've received a second hand confirmation of this from someone working with a MS Support engineer

@jonekdahl
Copy link

@PeterBenko Is there a public bug report that we can follow?

@fredrikloch
Copy link

fredrikloch commented Nov 24, 2023

@ilia-shipitsin here is a build log of the failing steps for us:
issue8859-msbuild-log.zip
With this yml:

trigger: none
jobs:
##
# Configuration
##
- job: Build_HSH
  pool:
    vmImage: 'windows-latest'
  steps:

    - checkout: self  # self represents the repo where the initial Pipelines YAML file was found
      clean: true  # whether to fetch clean each time
      submodules: true

    - task: UseDotNet@2
      inputs:
        packageType: 'sdk'
        version: 6.x
        performMultiLevelLookup: true

    - task: UseDotNet@2
      inputs:
        packageType: 'runtime'
        version: 6.x
        performMultiLevelLookup: true

    - powershell: |
        dotnet --info
      displayName: 'dotnet info'

    - powershell: dotnet tool restore
      displayName: 'dotnet tool restore'

    - powershell: |
        dotnet --info
      displayName: 'dotnet info'
      
    - task: DotNetCoreCLI@2
      displayName: 'Test HSH'
      inputs:
        command: 'test'
        arguments: "--logger:trx /bl"   
    - task: PublishBuildArtifacts@1
      displayName: 'Publish Artifact: build-log'
      condition: always()
      inputs:
        PathtoPublish: '$(Build.Repository.LocalPath)/msbuild.binlog'
        ArtifactName: 'build-log'

And the following output for dotnet --info:

2023-11-24T09:50:28.6536204Z ##[section]Starting: dotnet info
2023-11-24T09:50:28.6676650Z ==============================================================================
2023-11-24T09:50:28.6677003Z Task         : PowerShell
2023-11-24T09:50:28.6677144Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2023-11-24T09:50:28.6677501Z Version      : 2.231.4
2023-11-24T09:50:28.6677625Z Author       : Microsoft Corporation
2023-11-24T09:50:28.6677824Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-11-24T09:50:28.6678274Z ==============================================================================
2023-11-24T09:50:29.9021182Z Generating script.
2023-11-24T09:50:29.9523124Z ========================== Starting Command Output ===========================
2023-11-24T09:50:29.9811360Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\9cc35d75-1f40-4c79-a546-808ad62abec1.ps1'"
2023-11-24T09:50:30.3610306Z .NET SDK:
2023-11-24T09:50:30.3611127Z  Version:           8.0.100
2023-11-24T09:50:30.3611764Z  Commit:            57efcf1350
2023-11-24T09:50:30.5050183Z  Workload version:  8.0.100-manifests.e3b0c442
2023-11-24T09:50:30.5050822Z 
2023-11-24T09:50:30.5051320Z Runtime Environment:
2023-11-24T09:50:30.5091478Z  OS Name:     Windows
2023-11-24T09:50:30.5091986Z  OS Version:  10.0.20348
2023-11-24T09:50:30.5094342Z  OS Platform: Windows
2023-11-24T09:50:30.5238606Z  RID:         win-x64
2023-11-24T09:50:30.5239322Z  Base Path:   C:\Program Files\dotnet\sdk\8.0.100\
2023-11-24T09:50:30.5239915Z 
2023-11-24T09:50:30.5240213Z .NET workloads installed:
2023-11-24T09:50:30.5982204Z  Workload version: 8.0.100-manifests.e3b0c442
2023-11-24T09:50:30.5982940Z There are no installed workloads to display.
2023-11-24T09:50:30.6008027Z 
2023-11-24T09:50:30.6009018Z global.json file:
2023-11-24T09:50:30.6011323Z   Not found
2023-11-24T09:50:30.6011603Z 
2023-11-24T09:50:30.6011876Z Host:
2023-11-24T09:50:30.6012131Z   Version:      6.0.25
2023-11-24T09:50:30.6012455Z   Architecture: x64
2023-11-24T09:50:30.6012755Z   Commit:       492abbeef0
2023-11-24T09:50:30.6012995Z 
2023-11-24T09:50:30.6013242Z .NET SDKs installed:
2023-11-24T09:50:30.6013679Z   6.0.125 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6014108Z   6.0.203 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6014649Z   6.0.320 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6015044Z   6.0.417 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6015499Z   6.0.417 [C:\hostedtoolcache\windows\dotnet\sdk]
2023-11-24T09:50:30.6015978Z   7.0.114 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6016370Z   7.0.203 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6016779Z   7.0.311 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6017184Z   7.0.404 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6017585Z   8.0.100 [C:\Program Files\dotnet\sdk]
2023-11-24T09:50:30.6017900Z 
2023-11-24T09:50:30.6018325Z .NET runtimes installed:
2023-11-24T09:50:30.6019060Z   Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-11-24T09:50:30.6020217Z   Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-11-24T09:50:30.6021175Z   Microsoft.AspNetCore.App 6.0.25 [C:\hostedtoolcache\windows\dotnet\shared\Microsoft.AspNetCore.App]
2023-11-24T09:50:30.6022242Z   Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-11-24T09:50:30.6024518Z   Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-11-24T09:50:30.6026073Z   Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2023-11-24T09:50:30.6027255Z   Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2023-11-24T09:50:30.6029244Z   Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2023-11-24T09:50:30.6035487Z   Microsoft.NETCore.App 6.0.25 [C:\hostedtoolcache\windows\dotnet\shared\Microsoft.NETCore.App]
2023-11-24T09:50:30.6036638Z   Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2023-11-24T09:50:30.6037668Z   Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2023-11-24T09:50:30.6038510Z   Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2023-11-24T09:50:30.6039415Z   Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
2023-11-24T09:50:30.6041063Z   Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
2023-11-24T09:50:30.6042198Z   Microsoft.WindowsDesktop.App 6.0.25 [C:\hostedtoolcache\windows\dotnet\shared\Microsoft.WindowsDesktop.App]
2023-11-24T09:50:30.6043288Z   Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
2023-11-24T09:50:30.6044660Z   Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
2023-11-24T09:50:30.6045767Z   Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
2023-11-24T09:50:30.6046339Z 
2023-11-24T09:50:30.6046575Z Download .NET:
2023-11-24T09:50:30.6047038Z   https://aka.ms/dotnet-download
2023-11-24T09:50:30.6047312Z 
2023-11-24T09:50:30.6047561Z Learn about .NET Runtimes and SDKs:
2023-11-24T09:50:30.6048149Z   https://aka.ms/dotnet/runtimes-sdk-info
2023-11-24T09:50:30.8723349Z ##[section]Finishing: dotnet info

It also seems to be unrelated to issues in DotNetCoreCLI@2 since there is no change in version of that task between the runs before and after this issue both use version 2.221.0

@kerrywicks
Copy link

kerrywicks commented Nov 25, 2023

I'm also seeing this issue - even when attempting to ensure that .net 6 is installed, the installation fails, then the test fails:

Run actions/setup-dotnet@v[3](https://github.com/domino-printing-sciences/DA-development/actions/runs/6955435598/job/19015263623#step:3:3)
  with:
    dotnet-version: 6.0.x
    cache: false
  env:
    Solution_Name: .\Mozart\DominoAutomation.sln
    VSTEST_CONNECTION_TIMEOUT: 180
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command & 'D:\a\_actions\actions\setup-dotnet\v3\externals\install-dotnet.ps1' -Channel 6.0
dotnet-install: .NET Core SDK with version '6.0.417 is already installed.

Run dotnet test ".\Mozart\Domino.UnitTests.LabelFacade\bin\x[8](https://github.com/domino-printing-sciences/DA-development/actions/runs/6955435598/job/19015263623#step:19:9)6\Release\net6.0-windows\Domino.UnitTests.LabelFacade.dll" --verbosity m
Testhost process for source(s) 'D:\a\DA-development\DA-development\.\Mozart\Domino.UnitTests.LabelFacade\bin\x86\Release\net6.0-windows\Domino.UnitTests.LabelFacade.dll' exited with error: You must install or update .NET to run this application.
App: D:\a\DA-development\DA-development\Mozart\Domino.UnitTests.LabelFacade\bin\x86\Release\net6.0-windows\testhost.x86.exe
Architecture: x86
Framework: 'Microsoft.WindowsDesktop.App', version '6.0.0' (x86)
.NET location: C:\Program Files (x86)\dotnet
The following frameworks were found:
  8.0.0 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=6.0.0&arch=x86&rid=win-x86&os=win[10](https://github.com/domino-printing-sciences/DA-development/actions/runs/6955435598/job/19015263623#step:19:11)
. Please check the diagnostic logs for more information.
Microsoft (R) Test Execution Command Line Tool Version [17](https://github.com/domino-printing-sciences/DA-development/actions/runs/6955435598/job/19015263623#step:19:18).8.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Test Run Aborted.

Error: Process completed with exit code 1.

@mikhailkoliada
Copy link
Member

Closing as non-image connected:

  1. we so not provide any non-amd64 dotnet installations in the images
  2. both UseDotNet & setup-botnet tasks are not using dotnet (and I am afraid there is now mix of used methods exhibited in the issue) we provide for images (they install dotnet in runtime) all the tasks specific bugs should be reported to either https://github.com/actions/setup-dotnet or https://github.com/microsoft/azure-pipelines-tasks repos (for gh and ado respectively)

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

7 participants