Предварительная версия .NET 6.0, пакет dotnet, сбой действия Github
Учитывая этот (сокращенно) рабочий процесс Github
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.100-preview.4.21255.9'
include-prerelease: true
- uses: darenm/Setup-VSTest@v1
- name: Build
run: dotnet publish SendExplorerPlus.sln /p:Configuration=Release /p:PublishProfile=local /verbosity:minimal
Я получаю сообщение об ошибке при попытке запустить
dotnet bundle
Run dotnet publish SendExplorerPlus.sln /p:Configuration=Release /p:PublishProfile=local /verbosity:minimal
...
Determining projects to restore...
Restored D:\a\sendexplorer\sendexplorer\Portal2\Portal2.csproj (in 10.21 sec).
You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
Portal2 -> D:\a\sendexplorer\sendexplorer\Portal2\bin\Release\net6.0\Portal2.dll
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
- The following frameworks were found:
6.0.0-preview.4.21253.7 at [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\shared\Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.0&arch=x64&rid=win10-x64
D:\a\sendexplorer\sendexplorer\Portal2\Portal2.csproj(148,5): error MSB3073: The command "dotnet bundle" exited with code -2147450730.
Error: Process completed with exit code 1.
Я поиграл с рабочим процессом последние пару часов и не могу найти обходного пути. Любые идеи?
1 ответ
Я решил эту проблему, добавив конкретную версию .NET SDK. А именно
2.2.106
. Пробовал другие версии SDK, но это была единственная работающая.
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.2.106'
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.100-preview.4.21255.9'
include-prerelease: true