dotnet-script icon indicating copy to clipboard operation
dotnet-script copied to clipboard

release 0.13.0 does not run on Linux Subsystem for Windows

Open BryanWilhite opened this issue 8 years ago • 8 comments

release 0.13.0 does not run on Ubuntu bash for Windows.

Steps to reproduce:

Follow setup guide that verifies the PATH modification in ~/.profile.

Enter this command in bash (Windows): dotnet script You should get:

No executable found matching command "dotnet-script"
Segmentation fault (core dumped)

Enter this command in bash (Windows): dotnet script.cmd You should get nothing (but this actually works on full-blown Ubuntu Desktop: dotnet script.sh).

Enter this command in bash (Windows): dotnet exec /mnt/e/your/path/to/dotnet-script/dotne t-script.dll. You should get dotnet-script command-line args/help.

Enter this command in bash (Windows): dotnet exec /mnt/e/your/path/to/dotnet-script/dotne t-script.dll helloworld.csx. When you are running the above command from the same folder where helloworld.csx is, you should get: The command dotnet nuget locals global-packages -l failed to execute or it might actually work. Looking into nuget issues on my machine---also there might be issues with dotnet trying to do initial-run metrics setup but the segmentation fault stuff looks bigger than these possibilities.

I am sure with chocolatey and PowerShell it works fine.

BryanWilhite avatar Sep 25 '17 20:09 BryanWilhite

@BryanWilhite A lot of water under the bridge since 0.13.0. Appreciate if you could see if this works as expected with the latest version 👍

seesharper avatar May 19 '18 19:05 seesharper

Okay, on Windows in bash when I run this:

dotnet tool install -g dotnet-script

I am getting this:

No executable found matching command "dotnet-tool"

BryanWilhite avatar May 21 '18 18:05 BryanWilhite

Please note that you need the .Net Core 2.1 SDK to use global tools

seesharper avatar May 21 '18 18:05 seesharper

Ah, I see I need to install dotnet-sdk-2.1.300-preview2-008533. I have updated my setup guide.

Update: I installed the preview according to the guidance of this repo and am getting the same error.

BryanWilhite avatar May 21 '18 18:05 BryanWilhite

you should install rc1 not preview2 - they changed the installation process in rc1

Bryan Wilhite [email protected] schrieb am Mo., 21. Mai 2018, 20:41:

Ah, I see I need to install dotnet-sdk-2.1.300-preview2-008533. I have updated my setup guide https://github.com/BryanWilhite/dotnet-core/tree/master/dotnet-script-minimal .

Update: I installed the preview according to the guidance of this repo https://github.com/filipw/dotnet-script#net-core-21-global-tool and am getting the same error.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/filipw/dotnet-script/issues/133#issuecomment-390744674, or mute the thread https://github.com/notifications/unsubscribe-auth/ABoZISlQta7fBA2ZQJftZn1dzt6Fs9weks5t0wpDgaJpZM4PjUu4 .

filipw avatar May 21 '18 18:05 filipw

Also, make sure you are really using the latest .NET Core 2.1 SDK by running dotnet --info. It should print Version: 2.1.300-rc1-008673

filipw avatar May 21 '18 18:05 filipw

I followed the install instruction in “Install .NET Core SDK 2.1.300-rc1 on Linux Ubuntu 16.04.”

Here is my dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.300-rc1-008673
 Commit:    f5e3ddbe73

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.1.300-rc1-008673/

Host (useful for support):
  Version: 2.1.0-rc1
  Commit:  eb9bc92051

.NET Core SDKs installed:
  1.0.4 [/usr/share/dotnet/sdk]
  2.0.0 [/usr/share/dotnet/sdk]
  2.1.200 [/usr/share/dotnet/sdk]
  2.1.300-preview2-008533 [/usr/share/dotnet/sdk]
  2.1.300-rc1-008673 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-preview2-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-preview2-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-preview2-26406-04 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-rc1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

For dotnet install -g dotnet-script, I am getting the same error as aforementioned. Did I miss a step?

BryanWilhite avatar May 21 '18 20:05 BryanWilhite

BTW: works just fine on full Ubuntu (for dotnet tool install -g dotnet-script):

Tools directory '/home/user/.dotnet/tools' is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:

cat << \EOF >> ~/.bash_profile
# Add .NET Core SDK tools
export PATH="$PATH:/home/user/.dotnet/tools"
EOF

You can add it to the current session by running the following command:

export PATH="$PATH:/home/user/.dotnet/tools"

You can invoke the tool using the following command: dotnet-script
Tool 'dotnet-script' (version '0.24.0') was successfully installed.

BryanWilhite avatar May 22 '18 04:05 BryanWilhite