- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个带有代理的 Azure DevOps 管道,步骤如下:
pool:
vmImage: 'windows-latest'
# ....
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '5.x'
代理解析为 Windows 2022,MSDN 链接为 this list of installed software其中包括 5.0.406
作为 dotnet 的最新 5.x 版本。因此,我认为该步骤会看到该软件已经可用并且不会执行任何操作。
相反,该步骤需要 25 秒才能下载?以下是 Azure DevOps 的输出:
2022-03-31T09:32:37.5205829Z ##[section]Starting: UseDotNet
2022-03-31T09:32:37.5326189Z ==============================================================================
2022-03-31T09:32:37.5326523Z Task : Use .NET Core
2022-03-31T09:32:37.5327080Z Description : Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks. Additionally provides proxy support.
2022-03-31T09:32:37.5327618Z Version : 2.198.0
2022-03-31T09:32:37.5327838Z Author : Microsoft Corporation
2022-03-31T09:32:37.5328057Z Help : https://aka.ms/AA4xgy0
2022-03-31T09:32:37.5328346Z ==============================================================================
2022-03-31T09:32:38.1175143Z Tool to install: .NET Core sdk version 5.x.
2022-03-31T09:32:40.3450298Z Found version 5.0.406 in channel 5.0 for user specified version spec: 5.x
2022-03-31T09:32:40.3901604Z Version 5.0.406 was not found in cache.
2022-03-31T09:32:40.3902218Z Getting URL to download .NET Core sdk version: 5.0.406.
2022-03-31T09:32:40.3903044Z Detecting OS platform to find correct download package for the OS.
2022-03-31T09:32:40.3919001Z [command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& 'D:\a\_tasks\UseDotNet_b0ce7256-7898-45d3-9cb5-176b752bfea6\2.198.0\externals\get-os-platform.ps1'"
2022-03-31T09:32:40.7335953Z Primary:win-x64
2022-03-31T09:32:40.7337064Z Detected platform (Primary): win-x64
2022-03-31T09:32:40.7357212Z Downloading: https://download.visualstudio.microsoft.com/download/pr/aa30e704-a085-4ed4-bcbd-9f3491b7722b/05a1aefc5c841a1faa7eae08a5cec110/dotnet-sdk-5.0.406-win-x64.zip
2022-03-31T09:32:42.0180110Z Extracting downloaded package D:\a\_temp\33032e6d-ebd8-4f81-951e-779d5384477e.
2022-03-31T09:32:42.0188915Z Extracting archive
2022-03-31T09:32:42.0229477Z [command]C:\Windows\system32\chcp.com 65001
2022-03-31T09:32:42.0330177Z Active code page: 65001
2022-03-31T09:32:42.0554435Z [command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\33032e6d-ebd8-4f81-951e-779d5384477e', 'D:\a\_temp\99ba')"
2022-03-31T09:33:02.8364659Z Successfully installed .NET Core sdk version 5.0.406.
2022-03-31T09:33:02.8381246Z Creating global tool path and pre-pending to PATH.
2022-03-31T09:33:02.8488020Z ##[section]Finishing: UseDotNet
如何确保从 vmImage 已安装的软件或某种缓存中获取我的 dotnet
SDK?我很想在我的构建中重新获得这 25 秒...
最佳答案
在撰写本文时,似乎 this is an open issue in Azure Devops ,顺便说一句,就在这个 Stack Overflow 问题创建前几周 one user commented on GitHub :
Downloading .NET 5.x takes 30 seconds while it's already on the windows-latest image. This costs us time, and it costs Microsoft precious server resources.
这似乎是完全相同的问题。
我发布此“答案”是为了提高可见性。也许其他人(a)可以在答案中发布解决方法,或者(b)将来可以添加真正的答案?
关于.net - 在 Azure DevOps 中获取 UseDotNet@2 以使用 vmImage 的 dotnet SDK(或来自缓存的 SDK),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71690289/
我已经配置了一个基于在 Docker 容器中运行的 Ubuntu 20.04 的自托管 Linux 代理。它向代理池报告并正确运行。我将在 AWS Fargate 中运行代理。 我的问题是,在我的 D
我有一个带有代理的 Azure DevOps 管道,步骤如下: pool: vmImage: 'windows-latest' # .... steps: - task: UseDotNet@2
我有一个带有代理的 Azure DevOps 管道,步骤如下: pool: vmImage: 'windows-latest' # .... steps: - task: UseDotNet@2
我是一名优秀的程序员,十分优秀!