We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Hi! 👋
The documentation, in the section
https://github.com/filipw/dotnet-script#running-scripts
says that
Scripts can be executed directly from the shell as if they were executables.
How can I do that in Windows? I have tried, and the running ./helloworld.csx opens Visual Studio Code for me.
./helloworld.csx
I have tried both from CMD and PowerShell.
It makes sense it opens VS Code, since that's what it says if I right click > properties any .csx that they will open with.
If I change it to open with dotnet-script.exe instead, at the paths of
Then it kind of works.
System.Console.ReadKey()
helloworld.csx
I can understand that if you run it with double click from the explorer, it closes as soon as it finishes. That makes sense.
But it would be nice if it could be run directly from the powershell, instead of opening the CMD.
Any thoughts on how to achieve that behaviour? The documentation I linked at the beginning explains nothing about it.
P.S: I have already tried adding the shebang #!/usr/bin/env dotnet-script at the top of the file
#!/usr/bin/env dotnet-script
Thanks in advance!
The text was updated successfully, but these errors were encountered:
There is no way on Windows AFAIK, the documentation should explain that this is for Unix only.
On Windows you can run dotnet script register which will do the following registry scaffolding https://github.com/filipw/dotnet-script/blob/114aed0792045559eddc05a860a7c34841b37397/src/Dotnet.Script.Core/Scaffolder.cs#L79-L88 but it would effectively do what you already did manually and just register dotnet.exe with dotnet-script global tool as the execution handler.
dotnet script register
Sorry, something went wrong.
aah I see. I misunderstood the documentation and thought it should be possible on windows too. Thanks for the quick answer! 👍
Improve documentation to answer dotnet-script#664
01490c2
Merge branch 'master' into improve-documentation-dotnet-script#664
ef0ae23
Merge pull request #665 from Maximetinu/improve-documentation-#664
f562a6c
Improve documentation to answer #664
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Hi! 👋
The documentation, in the section
https://github.com/filipw/dotnet-script#running-scripts
says that
How can I do that in Windows? I have tried, and the running
./helloworld.csx
opens Visual Studio Code for me.I have tried both from CMD and PowerShell.
It makes sense it opens VS Code, since that's what it says if I right click > properties any .csx that they will open with.
If I change it to open with dotnet-script.exe instead, at the paths of
Then it kind of works.
System.Console.ReadKey()
at the end of the script./helloworld.csx
from powershell, it does the same, it opens another CMD window and runs in there, to instantly close it afterwards.helloworld.csx
directly from the CMD, it works as intendedI can understand that if you run it with double click from the explorer, it closes as soon as it finishes. That makes sense.
But it would be nice if it could be run directly from the powershell, instead of opening the CMD.
Any thoughts on how to achieve that behaviour? The documentation I linked at the beginning explains nothing about it.
P.S: I have already tried adding the shebang
#!/usr/bin/env dotnet-script
at the top of the fileThanks in advance!
The text was updated successfully, but these errors were encountered: