Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Failed Because of Missing .Net Framework #341

Open
HiFei4869 opened this issue Sep 8, 2023 · 1 comment
Open

Installation Failed Because of Missing .Net Framework #341

HiFei4869 opened this issue Sep 8, 2023 · 1 comment

Comments

@HiFei4869
Copy link

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
Copy link
Owner

oleg-shilo commented Sep 10, 2023

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

Solution (either of):

  • install cs-script_4.8-1.deb (depends on SDK v7.0.*)
    My preferred way of installing cs-script on Linux is, in fact, as .NET tool (dotnet tool install --global cs-script.cli). However in this case you will need to manually add alias (alias css='dotnet /usr/local/bin/cs-script/cscs.dll'+)
  • install older SDK .5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants