I'm trying to build .NET 8 Blazor Hybrid MAUI App in GitHub Actions. Here is the repo that I have used.
name: build on: push: branches: - master pull_request: branches: - master jobs: build-and-test: runs-on: windows-latest steps: # Checkout the code - uses: actions/checkout@v3.4.0 # Install .NET Core SDK - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: dotnet-version: 8.0.x # Install dotnet wasm buildtools workload - name: Install .NET WASM Build Tools run: dotnet workload install wasm-tools # Install dotnet maui buildtools workload - name: Install .NET MAUI Build Tools run: dotnet workload install maui # Restore Dependencies - name: Restore dependencies run: dotnet restore # Build Project - name: Build Solution run: dotnet build ./BlazorHybrid.sln --configuration Release --no-restore When I used the above I got the following error:
Error: C:\Program Files\dotnet\sdk\8.0.201\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'. [D:\a\BlazorHybrid\BlazorHybrid\MAUI\MAUI.csproj::TargetFramework=net8.0-windows10.0.19041.0] Error: C:\Program Files\dotnet\sdk\8.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1047: Assets file 'D:\a\BlazorHybrid\BlazorHybrid\MAUI\obj\project.assets.json' doesn't have a target for 'net8.0-maccatalyst/maccatalyst-arm64'. Ensure that restore has run and that you have included 'net8.0-maccatalyst' in the TargetFrameworks for your project. You may also need to include 'maccatalyst-arm64' in your project's RuntimeIdentifiers. [D:\a\BlazorHybrid\BlazorHybrid\MAUI\MAUI.csproj::TargetFramework=net8.0-maccatalyst] Here is the complete run link for the error.
So I tried the following,
- answer from Stackoverflow.. Didn't work.
- maui-sample Didn't work.
Please can you assist me on what I'm missing?
Источник: https://stackoverflow.com/questions/780 ... windows-ag