coravel icon indicating copy to clipboard operation
coravel copied to clipboard

CLI not working with .NET 6

Open adrum opened this issue 1 year ago • 0 comments

Describe the bug On macOS 12.4 Intel, a fresh install of the CLI globally on .NET 6.0.301 (and .NET 6.0.3) fails to execute the CLI, resulting in the following error message:

It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' (x64) was not found.
  - The following frameworks were found:
      6.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
      6.0.6 at [/usr/local/share/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.1.0&arch=x64&rid=osx.12-x64

Affected Coravel Feature CLI

Expected behaviour The CLI to function with the .NET 6 runtime installed.


I was able to clone and build the project by changing:

# coravel/Src/Coravel.Cli/Coravel.Cli.csproj

<TargetFramework>net6.0</TargetFramework>

Then running a build and calling the generated dll. Everything worked here. I was able able to change the same file to:

<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>

and repeat the same steps with similar success.

I can create a PR with the change, but I feel like something else would be required to make this properly publish on NuGet with the targeted framework versions.

adrum avatar Jul 04 '22 16:07 adrum