oleg-shilo / cs-script

C# scripting platform
http://www.cs-script.net
MIT License
1.56k stars 234 forks source link

Installation Failed Because of Missing .Net Framework #341

Open HiFei4869 opened 10 months ago

HiFei4869 commented 10 months ago

I'm using Linux 20.04. I've already installed .Net 7.0.10. However, when I try to install and unpack cs-script, it gives me warning messages on missing .Net framework.

Error message:

Preparing to unpack cs-script_4.2-0.deb ...
You must install or update .NET to run this application.

App: /usr/local/bin/cs-script/cscs
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '5.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
  7.0.10 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=ubuntu.20.04-x64
Unpacking cs-script (4.2-0) over (4.2-0) ...
Setting up cs-script (4.2-0) ...
You must install or update .NET to run this application.

App: /usr/local/bin/cs-script/cscs
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '5.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
  7.0.10 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=ubuntu.20.04-x64
You must install or update .NET to run this application.

App: /usr/local/bin/cs-script/cscs
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '5.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
  7.0.10 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=ubuntu.20.04-x64
dpkg: error processing package cs-script (--install):
 installed cs-script package post-installation script subprocess returned error exit status 150
Errors were encountered while processing:
 cs-script

I've check the intallation of .Net 7.0.10 by dotnet --info. It gives me:

`.NET SDK:
 Version:   7.0.400
 Commit:    73bf45718d

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /usr/share/dotnet/sdk/7.0.400/

Host:
  Version:      7.0.10
  Architecture: x64
  Commit:       a6dbb800a4

.NET SDKs installed:
  7.0.400 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found`

Does anyone know why? Thanks for any comment!

oleg-shilo commented 10 months ago

The problem is caused by missing the required SDK (v5.0). Even though a newer one is found.

Solution (either of):