[英]How to fix the error “Windows SDK version 8.1” was not found?
[英]Installing the Windows SDK 8.1 version in Azure Pipelines
我想将我的 Azure 管道 vmImage 升级到“windows-2019”,以便使用 Visual Studio 2019 编译我的项目。
pool:
vmImage: 'windows-2019'
variables:
solution: '**/*.sln'
buildConfiguration: 'Release'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
steps:
- task: VSBuild@1
displayName: 'Build the project'
inputs:
solution: '$(solution)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload'
- task: VSTest@2
但是,Windows SDK 8.1 似乎不包含在此图像中。 当我尝试编译我的 C++ 项目时:
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v150\Microsoft.Cpp.WindowsSDK.targets(46,5):错误MSB8036:Windows ZF20E3C5E54C0AB3D375D660B3ZF896F6版本8.1 没找到。 安装所需版本的 Windows SDK 或在项目属性页面中更改 SDK 版本或右键单击解决方案并选择“重新定位解决方案”。
如何在此映像中安装它?
有关的:
我使用 choco 来获得 Windows 8.1 SDK:
- task: PowerShell@2
displayName: 'Install the win 8.1 SDK'
inputs:
targetType: 'inline'
script: |
choco install windows-sdk-8.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.