C#C
C#2y ago
Caeden

Github actions failing to run project (dotnet run)

> dotnet run
Failed to create CoreCLR, HRESULT: 0x80070057

In the github workflow

> dotnet version
8.0.101

This is the csproj which may be the problem
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

</Project>

Current on windows os and when running dotnet run in the dir it works perfectly fine - github action ran from ubuntu/

This is the github action
name: Test dotnet package

on:
    push:

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        dotnet-version: [ '8.0.x' ]

    steps:
      - uses: actions/checkout@v4
      - name: Setup dotnet ${{ matrix.dotnet-version }}
        uses: actions/setup-dotnet@v3
        with:
          dotnet-version: ${{ matrix.dotnet-version }}
      - name: Display dotnet version
        run: dotnet --version
      - name: Run project
        working-directory: ./simulation
        run: dotnet run
Was this page helpful?