我想使用 Windows 桌面(例如运行 Windows 10 或 11)作为构建服务器。我应该禁用哪些服务以及应该安装哪些功能来准备计算机以使用 Visual Studio 编译软件?
通常,我将使用 WinForms 编译 C# .NET Framework 4.8.1 作为桌面应用程序。
(这是作为一个问题提出的,但我找到了我想分享的资源)
微软在 GitHub windows runner 的设置脚本中为此提供了一个很好的答案:GitHub runner-images/images/windows。此脚本是为 Windows Server 2022 设计的,但应包含适用于其他版本的 Windows 的信息。如果某个步骤不适用,请随时跳过它。
基础镜像设置:Configure-BaseImage.ps1
Configure-PowerShell.ps1 - 安装 NuGet
Configure-WindowsDefender.ps1 - 禁用 Windows Defender
Install-WindowsUpdates.ps1 - 触发 Windows 更新应用