Closed DanielGoehler closed 11 months ago
We analyzed BCCH. Yet another "hardcoded exception" .. one of many 🤔.
And it also seems solved with new generic image, but that doesn't exist yet.
Is it ok for you to wait for the new generic? meanwhile, you could add a "DockerExec" step to install it, something like:
Write-Host "Patching container to install dotnet 8.0.0"
Invoke-WebRequest -Uri "[https://download.visualstudio.microsoft.com/download/pr/2a7ae819-fbc4-4611-a1ba-f3b072d4ea25/32f3b931550f7b315d9827d564202eeb/dotnet-hosting-8.0.0-win.exe"](https://download.visualstudio.microsoft.com/download/pr/2a7ae819-fbc4-4611-a1ba-f3b072d4ea25/32f3b931550f7b315d9827d564202eeb/dotnet-hosting-8.0.0-win.exe%22) `
-UseBasicParsing `
-OutFile "c:\run\my\dotnet-win8.exe"
Start-Process -Wait -FilePath "c:\run\my\dotnet-win8.exe" -ArgumentList /quiet
Remove-Item "c:\run\my\dotnet-win8.exe" -Confirm:$false -Force:$true
Thank you! :-) Sure, this temporary solution is enough for us. We added it after creating the Docker container. The compiler works fine now.
We also expect that .NET 8 is added to the generic image.
[...]
- task: ALOpsDockerStart@1
displayName: 'Start Docker Container'
inputs:
memory_gb: '8'
- task: ALOpsDockerWait@1
displayName: 'Wait for Docker Container'
inputs:
search_string: 'Ready for connections!'
- template: InstallNet8.yml # Temp. Fix: Install .NET 8 in Docker Container
parameters:
selectVersion: '${{selectVersion}}'
- task: ALOpsAppCompiler@1
displayName: 'App Compiler'
inputs:
usedocker: true
targetproject: 'MainApp/app.json'
al_analyzer: '${{parameters.alcodeanalyzer}}'
nav_app_version: '${{parameters.appversiontemplate}}'
publish_artifact: false
[...]
parameters:
selectVersion: ''
steps:
- task: ALOpsDockerExec@1
displayName: 'Install DotNet 8 in Docker Container'
condition: eq('${{parameters.selectVersion}}', 'NextMajor')
inputs:
inline_script: |
Write-Host "Patching container to install dotnet 8.0.0"
Invoke-WebRequest -Uri "https://download.visualstudio.microsoft.com/download/pr/2a7ae819-fbc4-4611-a1ba-f3b072d4ea25/32f3b931550f7b315d9827d564202eeb/dotnet-hosting-8.0.0-win.exe" `
-UseBasicParsing `
-OutFile "c:\run\my\dotnet-win8.exe"
Start-Process -Wait -FilePath "c:\run\my\dotnet-win8.exe" -ArgumentList /quiet
Remove-Item "c:\run\my\dotnet-win8.exe" -Confirm:$false -Force:$true
Describe the bug When you compile your application with ALOpsAppCompiler version 1 in the NextMajor Container, you get the error message You must install or update .NET to run this application.
For ALOpsAppCompiler version 2, where NextMajor also failed, we installed .NET 8.0 Runtime on each build agent, but I guess it is also missing in Docker Container.
the used yaml please provide the yaml that you used. It helps you put the yaml like this:
the output Also the complete output is necessary for us to see what is going on. Also use backtics: