C
C#11mo ago
Caeden

Github actions failing to run project (dotnet run)

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

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

In the github workflow
> dotnet version
8.0.101
> 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>
<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
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
5 Replies
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
Caeden
CaedenOP11mo ago
Hey, thanks for responding Sorry for getting back to you late This was fixed (I believe?) by removing <BaseOutputPath>D:\Github\Evolution\bin</BaseOutputPath> in the csprog? The point of running dotnet run was just as a base test before dotnet test Probably not conventional there
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
Caeden
CaedenOP11mo ago
Yeah much apologies for that, didnt test that change Yeah it was auto generated
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server