Cannot Run with Only .NET 6 Installed
See original GitHub issueDescribe the bug Attempting to run this in a project using GitHub actions with ONLY .NET 6 installed results in an error.
Expected Behavior
Expected support to work with .NET 6, without installing additional frameworks.
Actual Behavior
The following error is displayed
Run gittools/actions/gitversion/execute@v0.9.7
Command: dotnet-gitversion /home/runner/work/icg-website/icg-website /output json /output buildserver /config GitVersion.yml
/home/runner/.dotnet/tools/dotnet-gitversion /home/runner/work/icg-website/icg-website /output json /output buildserver /config GitVersion.yml
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '5.0.0' (x64) was not found.
- The following frameworks were found:
6.0.0 at [/home/runner/.dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
Possible Fix
Installation of .NET 5 in addition to 6 works, but adds to build times etc.
Steps to Reproduce
Run the commend on a machine with only .NET 6 installed. As example, the following is the first part of our GitHub action that generated the above.
name: CI/CD
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Build and Publish
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Ensure .NET Installed
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install EF Tools
run: dotnet tool install --global dotnet-ef
- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
Context
This blocks our transition of all .NET projects from upgrading to .NET 6, as the added runtime and “temporary” change of the workaround makes an upgrade not feasible.
Your Environment
GitHub Actions environment, I’ve added the CI pipeline above
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Can I run a program that targets .net core 6 when I only ...
I have a library that was complied on .net 6, and I'm trying to run an app on my pc that only has...
Read more >Install .NET on Windows
In this article, you'll learn how to install .NET on Windows. .NET is made up of the runtime and the SDK. The runtime...
Read more >How to make exe built on .NET Core 3.1 run on a system ...
I have a Desktop application which has TargetFramework in the csproj file as netcoreapp3.1 One of our new customer has installed .NET 6...
Read more >"You must install .NET Desktop Runtime 6.0.4 (x64)" error
The application is a WPF application that targets the .NET 6.0 framework. There is no code, just a "Hello World" TextBlock in MainWindow.xaml...
Read more >Detect the absence of .NET 6 runtime and ask user to ...
NET 6 app won't be able to start and even less detect something unless the .NET 6 runtime is installed on the machine...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As a workaround you can set the environment variable
DOTNET_ROLL_FORWARD
toMajor
until .NET 6 support is released.Actually there is no need for a new action to be released, as the actions can install by specifying a version number. There is no exact release date yet, there are some infrastructure changes needed to be done. I hope in a week or 2 to have everything solved and a 5.8.0 release to be done