Но когда я пытаюсь собрать его в Azure DevOps, я получаю ошибки: р>
Код: Выделить всё
C:\agent\_work\_tool\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(491,5):
Error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'win-x64'.
C:\agent\_work\_tool\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(491,5): Error NETSDK1112: The runtime pack for Microsoft.WindowsDesktop.App.Runtime.win-x64 was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'win-x64'.
Я использовал эти задачи для установки и проверки .NET 8 на машинах:
Код: Выделить всё
- task: UseDotNet@2
inputs:
version: '8.x'
- task: PowerShell@2
displayName: 'Check .NET Version and SDKs'
inputs:
targetType: 'inline'
script: |
dotnet --version
dotnet --list-sdks
dotnet --list-runtimes
Файл проекта содержит это (я не менял его с .NET 7)
Код: Выделить всё
net8.0-windows10.0.19041.0
win-x64
Код: Выделить всё
trigger:
branches:
include:
- master
stages:
- stage: Build
jobs:
- job: Build
displayName: "Build app and installer"
pool:
vmImage: 'windows-latest'
steps:
- task: VSBuild@1
inputs:
solution: 'TestApp.sln'
vsVersion: 'latest'
platform: 'x64'
configuration: 'Release'
msbuildArchitecture: 'x64'
msbuildArgs: ''
https://github.com/tripleacoder/MSIXTestApp/
Подробнее здесь: https://stackoverflow.com/questions/776 ... icrosoft-n