Closed fredrikloch closed 6 months ago
I have exactly the same thing, my unit tests were working fine with this version of the image (windows-2022).
Agent name: 'Hosted Agent'
Agent machine name: 'WIN-KLF4QQQF2O2'
Current agent version: '3.218.0'
Operating System
Microsoft Windows Server 2022
10.0.20348
Datacenter
Runner Image
Image: windows-2022
Version: 20230326.1
However, since this version:
Agent name: 'Hosted Agent'
Agent machine name: 'fv-az407-160'
Current agent version: '3.230.0'
Operating System
Microsoft Windows Server 2022
10.0.20348
Datacenter
Runner Image
Image: windows-2022
Version: 20231126.1.0
That type of error is occurring:
##[error]Testhost process for source(s) 'D:\a\1\s\LightingSequence.ImagesCombineLib.UnitTests\bin\x86\Release\net6.0-windows\ImagesCombineLib.UnitTest.dll' exited with error: You must install or update .NET to run this application.
##[error]App: D:\a\1\s\LightingSequence.ImagesCombineLib.UnitTests\bin\x86\Release\net6.0-windows\testhost.x86.exe
##[error]Architecture: x86
##[error]Framework: 'Microsoft.WindowsDesktop.App', version '6.0.0' (x86)
##[error].NET location: C:\Program Files (x86)\dotnet
##[error]The following frameworks were found:
##[error] 8.0.0 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
##[error]Learn more:
##[error]https://aka.ms/dotnet/app-launch-failed
##[error]To install missing framework, download:
##[error]https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=6.0.0&arch=x86&rid=win-x86&os=win10
##[error]. Please check the diagnostic logs for more information.
##[error]Testhost process for source(s) 'D:\a\1\s\LightingSequence.ImagesCombineLib.UnitTests\bin\x86\Release\net6.0-windows\ImagesCombineLib.UnitTest.dll' exited with error: . Please check the diagnostic logs for more information.
##[error]System.InvalidOperationException: The provided manager was not found in any slot.
Hi all, I noticed there hasn't been any recent changes done from the task side to be causing this issue all of a sudden. Going by the logs, this might be from windows-images
@v-mohithgc hey, we do not install any x86 components of dotnet to the image, so what is usually used for x86 Brough by the ado/gh tasks
@v-mohithgc we do se the same issue both on self hosted and vmss agents, the only workaround so far is to manually install .NET Desktop Runtime or more specifically the visual studio component for .Net Desktop development. Which solves the issue, leading me to believe that there might be some change in how either the UseDotnet task or the DotNetCoreCLI looks for or registers runtimes in the path
can anyone send the debug logs (system.debug=true) of the failure run to v-mohithgc @microsoft.com
can anyone send the debug logs (system.debug=true) of the failure run
@v-mohithgc Aren't those already included by the OP under the section "Full task logs with system.debug enabled"?
can anyone send the debug logs (system.debug=true) of the failure run
@v-mohithgc Aren't those already included by the OP under the section "Full task logs with system.debug enabled"?
Hi, those attached logs isn't helping us here, as it has incomplete logs of a task, we might require the full debug logs of both success and failure run, if possible, please follow this doc to download the full logs and send to v-mohithgc@microsoft.com.
Thanks
@v-mohithgc I will email the failing logs to you, sadly we can't produce a log for the completed build. There was a limit on how many rows I was allowed to upload in the original issue
Hi @v-mohithgc , I have just sent you our logs as well. Thank you.
@v-mohithgc the only workaround so far is to manually install .NET Desktop Runtime or more specifically the visual studio component for .Net Desktop development.
I am hitting this issue as well and trying to implement this workaround. How can I "manually install the visual studio component for .Net Desktop development" in a YAML pipeline working with a Microsoft-hosted environment?
I ended up switching over to a self-hosted environment and installing Visual Studio.
Hi @v-mohithgc, would you mind sharing how this problem was resolved?
New issue checklist
Task name
DotNetCoreCLI@2
Breaking task version
No response
Last working task version
No response
Regression Description
Description: This has been an issue since Monday 20nd November. DotNet test runs fail for a projects with an error message stating that Microsoft.WindowsDesktop.App (net core 6) is missing on windows-latest, self-hosted and VMSS agents.
This issue was raised here: https://github.com/actions/runner-images/issues/8859 (reported as an Azure devops issue), but was closed with a claim that it is not image related, and it was recommended to raise the issue here. I'm hoping this is the right place to raise this! If I should raise this elsewhere, please let me know and feel free to close this.
We see no change in version between failing and successful runs, our current workaround is to run a self hosted agent where we've manually installed dotnet desktop sdk.
To trigger the issue, we've used the following csproj settings: "Code project"
"Test project"
msbuild.zip for failing build
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows 11, Windows Server 2022
Relevant log output
Full task logs with system.debug enabled
UNSUCCESSFUL RUN
SUCCESSFUL RUN
Repro steps