![](/img/trans.png)
[英]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.